ZFS snapdir readability (Crosspost) OT: mount -t zfs for snapshots
Jan Behrens
jbe-mlist at magnetkern.de
Fri Nov 22 14:16:17 UTC 2019
On Fri, 22 Nov 2019 09:09:52 +0100
Borja Marcos <borjam at sarenet.es> wrote:
> > On 21 Nov 2019, at 17:30, Martin Simmons <martin at lispworks.com> wrote:
> >
> >> I’ve never seen that and, indeed, on FreeBSD 12.1 it’s not possible. Or I am terribly
> >> sloppy today!
> >>
> >> Did I miss anything? Is it a new ZFS on Linux feature?
> >>
> >> root at micro1:~ # mount -t zfs -o ro pool/dataset at snapshot /mnt
> >> mount: unpul/wwwnfsen at antesinst: Device busy
> >> root at micro1:~ #
> >
> > It looks like unpul/wwwnfsen at antesinst is already mounted -- probably in .zfs :-)
>
> (This is a bit of off-topic now, the behavior of mount -t zfs)
>
> Yep, it’s only uglier!
>
> Whenever you access any of the directories below .zfs/snapshot the snapshot
> is automagically mounted. It’s also sort of invisible except when you run “mount -v”. In that
> case those snapshot mounts are visible. You can also unmount them.
I also just confirmed that once I manually mount a snapshot, I can't
access it through .zfs/snapshot anymore. Of course, this is doesn't
help with solving the original problem because in order to prohibit
snapshot access for non-privileged users, it would require all
snapshots to be mounted atomically at the same time the associated
filesystem is mounted.
> [...]
>
> Borja.
Regards,
Jan
More information about the freebsd-fs
mailing list