From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: linux-btrfs@vger.kernel.org, framstag@rus.uni-stuttgart.de
Subject: Re: generic name for volume and subvolume root?
Date: Sat, 9 Sep 2017 18:40:57 +0800 [thread overview]
Message-ID: <48008a58-a82e-d9f7-327e-eeb905e18aa1@gmx.com> (raw)
In-Reply-To: <20170909083551.GC22060@rus.uni-stuttgart.de>
On 2017年09月09日 16:35, Ulli Horlacher wrote:
> As I am writing some documentation abount creating snapshots:
> Is there a generic name for both volume and subvolume root?
>
> Example:
>
> root@fex:~# btrfs subvol show /mnt
> ERROR: not a subvolume: /mnt
>
> root@fex:~# btrfs subvol show /mnt/test
> /mnt/test is toplevel subvolume
>
> root@fex:~# btrfs subvol show /mnt/test/data
> /mnt/test/data
> Name: data
> UUID: b32a5949-dfd6-ef45-8616-34ae4cdf6fb8
> (...)
>
> root@fex:~# btrfs subvol show /mnt/test/data/sw
> ERROR: not a subvolume: /mnt/test/data/sw
>
>
> I can create snapshots of /mnt/test and /mnt/test/data, but not of /mnt
> and /mnt/test/data/sw
>
> Is there a simple name for directories I can snapshot?
>
>
Nope, subvolume (including snapshot) is not distinguished by its
filename/path/directory name.
And you can only do snapshot on subvolume (snapshot is one kind of
subvolume) boundary.
For user to determine where is the subvolume boundary, one should first
determine there is the btrfs mounted and then use "btrfs subvol show" to
determine the boundaries.
Or, in a btrfs test the directory inode number. Subvolume/snapshot in
btrfs will always have the same inode number 256, and regular
file/directories/special files will not use that magic number.
Thanks,
Qu
next prev parent reply other threads:[~2017-09-09 10:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-09 8:35 generic name for volume and subvolume root? Ulli Horlacher
2017-09-09 10:40 ` Qu Wenruo [this message]
2017-09-09 10:48 ` Ulli Horlacher
2017-09-09 10:58 ` Qu Wenruo
2017-09-09 11:06 ` Hugo Mills
2017-09-09 11:13 ` Hans van Kranenburg
2017-09-09 11:00 ` Hugo Mills
2017-09-10 14:21 ` Peter Grandi
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=48008a58-a82e-d9f7-327e-eeb905e18aa1@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--cc=framstag@rus.uni-stuttgart.de \
--cc=linux-btrfs@vger.kernel.org \
/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