Re: test if a subvolume is a snapshot?

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

 



On 8 September 2017 at 14:10, David Sterba <dsterba@xxxxxxx> wrote:
> 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 ]; ...

This oneliner shows how much really basic btrfs tools commands syntax
is broken by design :(
Looking on how so freakishly overcomplicated btrfs command syntax is
that command like above is completely unintuitive and unreadable
sometimes I'm really thinking about start rewrite btrfs-progs to make
btrfs basic tools syntax as similar as it is only possible to ZFS zfs,
zpool and zdb commands on using which in +90% cases you can guess how
necessary syntax must look like without looking on man pages.

Any volunteers want to join to help implement something like this?
Maybe someone already started doing this?

kloczek
-- 
Tomasz Kłoczko | LinkedIn: http://lnkd.in/FXPWxH
--
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