ZFS snapdir readability (Crosspost) OT: mount -t zfs for snapshots

Borja Marcos borjam at sarenet.es
Fri Nov 22 08:10:00 UTC 2019

> 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. 

But it’s rather opaque. Auto mounted snapshots are invisible to mount(8) unless the -v
option is used, regardless of the status of the snapdir property. However, when you mount them
explicitly they are visible.

Anyway, was this intended or is it a side effect of the general behavior of mount? I see it’s not
documented on the FreeBSD Manual, which only mentions mounting snapshots as clones. Which,
as far as I know, is consistent with the original ZFS design.

Thank you for all the explanations, I was convinced that cloning was the only way to
mount a ZFS snapshot. 


More information about the freebsd-fs mailing list