Re: any idea about auto export multiple btrfs snapshots?

Wang Yugui
2021-06-21T22:42:01Z

Hi,

>
> OK thanks for the information. I think they will just work in nfs-ganesha as
> long as the snapshots or subvols are mounted within an nfs-ganesha export or
> are exported explicitly. nfs-ganesha has the equivalent of knfsd's
> nohide/crossmnt options and when nfs-ganesha detects crossing a filesystem
> boundary will lookup the filesystem via getmntend and listing btrfs subvols
> and then expose that filesystem (via the fsid attribute) to the clients
> where at least the Linux nfs client will detect a filesystem boundary and
> create a new mount entry for it.

Not only exported explicitly, but also kept in the same hierarchy.

If we export
/mnt/test #the btrfs
/mnt/test/sub1 # the btrfs subvol 1
/mnt/test/sub2 # the btrfs subvol 2

we need to make sure we will not access '/mnt/test/sub1' through '/mnt/test'
from nfs client.

current safe export:
#/mnt/test #the btrfs, not exported
/mnt/test/sub1 # the btrfs subvol 1
/mnt/test/sub2 # the btrfs subvol 2

Best Regards
Wang Yugui (wangyugui@e16-tech.com)
2021/06/22