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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to