From: Zygo Blaxell <ce3g8jdj@umail.furryterror.org>
To: "miguel@rozsas.eng.br" <miguel@rozsas.eng.br>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: How to find the parent folder of a sub-volume ?
Date: Wed, 13 May 2020 08:41:46 -0400 [thread overview]
Message-ID: <20200513124146.GB10769@hungrycats.org> (raw)
In-Reply-To: <CAP5D+wYLQUh+XqBCU3MVq1vY41fbPgjabm7GkORmio+kFOYaqg@mail.gmail.com>
On Tue, May 12, 2020 at 02:17:19PM -0300, miguel@rozsas.eng.br wrote:
> Hi there !
>
> root@fenix:/home/miguel# btrfs --version
> btrfs-progs v5.2.1
> root@fenix:/home/miguel# btrfs subvolume list /home/miguel/tmp/
> ID 265 gen 20670 top level 5 path miguel
> ID 266 gen 23573 top level 265 path miguel/Documentos
> ID 267 gen 23575 top level 265 path miguel/Downloads
> ID 269 gen 23537 top level 265 path miguel/Misc
> ID 270 gen 23522 top level 265 path miguel/Musica
> ID 271 gen 23526 top level 265 path miguel/ProgramasRFB
> ID 272 gen 23574 top level 265 path miguel/tmp
> ID 273 gen 23509 top level 265 path miguel/Videos
> ID 274 gen 23574 top level 265 path miguel/R
> ID 275 gen 23557 top level 265 path miguel/Imagens
> ID 302 gen 23507 top level 265 path miguel/Tech
> ID 595 gen 23517 top level 265 path miguel/src/UPSData
> ID 596 gen 23510 top level 265 path miguel/bin/UPSData
> root@fenix:/home/miguel#
>
> How to find the parent folder (root tree?) of the above sub-volumes ?
> On this parent folder I expect to see the above sub-folders as regular folders.
If you want to have access to the root subvol, the easiest way is to
just mount it:
mkdir /mnt/root-subvol
mount /dev/... /mnt/root-subvol -o subvol=
(note the parameter "subvol" is set to "").
A btrfs subvol can be mounted multiple times in multiple places, so each
application that requires the root subvol can simply mount its own.
There is no general solution for accessing the root subvol through
an arbitrary existing mountpoint because the root subvol might not be
accessible to a process (e.g. chroot, different namespace, etc) or might
not be mounted at all (e.g. mount -o subvol=miguel /dev/... /path/...).
> best regards,
prev parent reply other threads:[~2020-05-13 12:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-12 17:17 How to find the parent folder of a sub-volume ? miguel
2020-05-13 8:27 ` David Pottage
2020-05-13 12:41 ` Zygo Blaxell [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200513124146.GB10769@hungrycats.org \
--to=ce3g8jdj@umail.furryterror.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=miguel@rozsas.eng.br \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox