Hello Brendon,
thanks a lot for your answer.
With reference to
https://openzfsonosx.org/wiki/FAQ ..
Q) How can I access the .zfs snapshot directories?
A) You need to set snapdir visible and manually mount a snapshot.
- Code: Select all
$ sudo zfs set snapdir=visible tank/bob
$ sudo zfs mount tank/bob@yesterday
$ ls -l /tank/bob/.zfs/snapshot/yesterday/
Q) Is .zfs snapdir auto-mounting supported?
A) No, not at this time. You must manually "zfs mount" snapshots manually to see them in the snapdir.
Q) OK, I manually mounted my snapshot but still cannot see it in Finder. What gives?
A) Currently mounted snapshots are only visible from Terminal, not from Finder.
- Code: Select all
$ ls -l /tank/bob/.zfs/snapshot/yesterday/
So, for my opinion ..
1) you are right, auto-mounting snapdir is not support
2) but to mount snapshots manually should work
My pool has 10 ZFS-Filesystems all with the same ZFS settings. I'm not using compression or dedup. The parameter snapdir has been set to visible.
Therefore I don't understand why it is not possible to mount some snapshots after creating snapshots for each of this 10 filesystems.
It is not reproducible which filesystem/snapshot is always a problem. Sometimes only for one or two filesystems it is not possible to mount the fresh created snapshots. Sometimes for three or for filesystems. But never for the same filesystems/snapshots at the next run.
For the most filesystems/snapshots it works and looks like this:
- Code: Select all
$ sudo zfs snapshot z_pool/data@data
$ sudo zfs mount z_pool/data@data
ZFS: snapshot mountpoint '/Volumes/z_pool/data/.zfs/snapshot/data'
$ ls -latr /Volumes/z_pool/data/.zfs/snapshot/data
total 300412
..
..
-rw-r--r-- 1 root wheel 239735 2 Mär 22:41 .VolumeIcon.icns
drwx------ 5 root wheel 5 2 Mär 22:41 .Spotlight-V100
d-wx-wx-wt 2 root wheel 2 2 Mär 22:41 .Trashes
drwxr-xr-x@ 21 root wheel 21 3 Mär 07:05 .
drwx------ 41 root wheel 41 31 Mär 22:32 .fseventsd
dr-xr-xr-x 3 root wheel 3 31 Mär 22:32 ..
Depending on the run for some filesystems/snapshots it looks like this:
- Code: Select all
$ sudo zfs snapshot z_pool/data@data
$ sudo zfs mount z_pool/data@data
cannot mount '/Volumes/z_pool/data/.zfs/snapshot/data': directory is not empty
$ sudo zfs destroy z_pool/data@data
$ sudo zfs snapshot z_pool/data@data
$ sudo zfs mount z_pool/data@data
ZFS: snapshot mountpoint '/Volumes/z_pool/data/.zfs/snapshot/data'
$ ls -latr /Volumes/z_pool/data/.zfs/snapshot/data
total 300412
..
..
-rw-r--r-- 1 root wheel 239735 2 Mär 22:41 .VolumeIcon.icns
drwx------ 5 root wheel 5 2 Mär 22:41 .Spotlight-V100
d-wx-wx-wt 2 root wheel 2 2 Mär 22:41 .Trashes
drwxr-xr-x@ 21 root wheel 21 3 Mär 07:05 .
drwx------ 41 root wheel 41 31 Mär 22:32 .fseventsd
dr-xr-xr-x 3 root wheel 3 31 Mär 22:32 ..
From time to time it is necessary to umount the filesystem to resolve the issue of unable to mount snapshot:
- Code: Select all
$ sudo zfs snapshot z_pool/data@data
$ sudo zfs mount z_pool/data@data
cannot mount '/Volumes/z_pool/data/.zfs/snapshot/data': directory is not empty
$ sudo zfs destroy z_pool/data@data
$ sudo zfs snapshot z_pool/data@data
$ sudo zfs mount z_pool/data@data
cannot mount '/Volumes/z_pool/data/.zfs/snapshot/data': directory is not empty
$ sudo zfs destroy z_pool/data@data
$ sudo zfs umount z_pool/data
Running process: '/usr/sbin/diskutil' 'unmount' '/Volumes/z_pool/data'
Unmount successful for /Volumes/z_pool/data
$ sudo zfs mount z_pool/data
$ sudo zfs snapshot z_pool/data@data
$ sudo zfs mount z_pool/data@data
ZFS: snapshot mountpoint '/Volumes/z_pool/data/.zfs/snapshot/data'
$ ls -latr /Volumes/z_pool/data/.zfs/snapshot/data
total 300412
..
..
-rw-r--r-- 1 root wheel 239735 2 Mär 22:41 .VolumeIcon.icns
drwx------ 5 root wheel 5 2 Mär 22:41 .Spotlight-V100
d-wx-wx-wt 2 root wheel 2 2 Mär 22:41 .Trashes
drwxr-xr-x@ 21 root wheel 21 3 Mär 07:05 .
drwx------ 41 root wheel 41 31 Mär 22:32 .fseventsd
dr-xr-xr-x 3 root wheel 3 31 Mär 22:32 ..
That is strange, and make it impossible to automate my preferred backup method to use snapshots to rsync mounted snapshot data to a different pool.
Because cloning snapshot takes double capacity into the zfs pool and needs much more time while creating.
At the moment I see no other choice a to try to find solution for backup using send/receive functionality.
Nevertheless it would be great to know the root cause of the strange behavior.
Maybe one of the "OpenZFS on OS X" developer have any idea. I would be very grateful.
Thanks and greetings
Sebastian