On Thu, 05 Jul 2018 at 11:05:08 +0200, Michal Humpula wrote: >> Since ZFS doesn't expose a block device one would need another >> documented way to resolve /sys/fs/zfs/$FS. Hopefully ‘tank/my/fs’ is >> unique and can't be aliased to something else, can it? > >> Do the slash characters in ‘tank/my/fs’ hint at a hierarchy, or is it a >> flat string? > > It's unique and designates the ZFS specific fs instance which is > hierarchical. > First level is the zpool name. As far as I know btrfs has something similar > with subvolumes. Below is an example of zfs list > > NAME USED AVAIL REFER MOUNTPOINT > tank 2,45T 189G 120K /tank > tank/backup 75,8G 189G 136K /tank/backup > tank/data 1,91T 189G 1,83T /tank/data > tank/home 122G 189G 42,2G /home > tank/root 148G 189G 13,9G /
If it's like btrfs subvolumes the zpool (‘tank’) denotes the FS itself, while the subhierarchy denotes different views of it. I guess ‘tank’, ‘tank/backup’, ‘tank/data’ etc. need to have the same set of features enabled, and that the same underlying devices? In that, case, I think FS="tank" would be better than FS="tank/my/fs". Conveniently this also trims the hierarchy :-) -- Guilhem.
signature.asc
Description: PGP signature

