Re: generic name for volume and subvolume root?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





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
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux