Re: test if a subvolume is a snapshot?

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

 



On Fri, Sep 08, 2017 at 10:54:46AM +0200, Ulli Horlacher wrote:
> How can I test if a subvolume is a snapshot?

The inode number is 256 on a btrfs filesystem:

if [ stat -f --format=%T $path = btrfs -a stat --format=%i $path = 256 ]; ...

The directory that's result of snapshotting a subvolume, also called
EMPTY_SUBVOL has inode number 2, but that's not considered a normal
subvolume.
--
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