Accessing snapshots via .zfs fails

All your general support questions for OpenZFS on OS X.

Accessing snapshots via .zfs fails

Postby zfsfan » Wed Apr 26, 2023 3:03 pm

Currently accessing snapshots via .zfs fails.

I can enter the directory .zfs, and content can be viewed:

Code: Select all
dr-xr-xr-x  0 root  wheel     0B 22 Apr 17:32 snapshot/


But after entering directory snapshot, the command ls results in the following, even as root:

Code: Select all
total 0
ls: fts_read: Invalid argument


It worked in the past (maybe this was on another computer).
What can I do?
And is it possible to make the directory .zfs (the snapshots) available to a regular user?
zfsfan
 
Posts: 16
Joined: Sun Mar 19, 2023 5:38 pm

Re: Accessing snapshots via .zfs fails

Postby lundman » Wed Apr 26, 2023 4:23 pm

You can always issue "zfs mount dataset@snapshot"

But access to .zfs works by sending an event to zed, to mount it for you, via the snapshot_mount.sh scripts. Could be worth checking that is all running as it should.
User avatar
lundman
 
Posts: 1335
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: Accessing snapshots via .zfs fails

Postby zfsfan » Thu Apr 27, 2023 8:41 am

lundman wrote:You can always issue "zfs mount dataset@snapshot"

But access to .zfs works by sending an event to zed, to mount it for you, via the snapshot_mount.sh scripts. Could be worth checking that is all running as it should.


I did, as written above ("results in the following, even as root"). Even when logged in as root, access to .zfs doesn't work currently.
zfsfan
 
Posts: 16
Joined: Sun Mar 19, 2023 5:38 pm

Re: Accessing snapshots via .zfs fails

Postby zfsfan » Thu Apr 27, 2023 12:58 pm

lundman wrote:You can always issue "zfs mount dataset@snapshot"

But access to .zfs works by sending an event to zed, to mount it for you, via the snapshot_mount.sh scripts. Could be worth checking that is all running as it should.


Mounting manually works (as regular user):

Code: Select all
$ sudo zfs mount dataset@yesterday
ZFS: snapshot mountpoint '/Volumes/dataset/.zfs/snapshot/yesterday/'


I then can enter the mountpoint '/Volumes/dataset/.zfs/snapshot/yesterday/' directly, as a regular user.

But the parent directory snapshot still isn't accessible, even as root.
Here is an identical problem description: https://bugs.freebsd.org/bugzilla/show_ ... =219646#c0 (except that the exact error message is "Invalid argument", not "No such file or directory").
zfsfan
 
Posts: 16
Joined: Sun Mar 19, 2023 5:38 pm

Re: Accessing snapshots via .zfs fails

Postby zfsfan » Thu Apr 27, 2023 1:42 pm

Maybe the permissions of the underlying directory might be the reason: https://unix.stackexchange.com/a/301294
I had changed ownership to the user and its group recursively, and removed access to others (chmod go-rwx).
zfsfan
 
Posts: 16
Joined: Sun Mar 19, 2023 5:38 pm

Re: Accessing snapshots via .zfs fails

Postby lundman » Sun May 28, 2023 4:10 pm

The way .zfs works between platforms is one area where we can not share code at all, so it might
not be directly useful to look at bugs from those platforms.

I will try to get the latest build out soon, and lets retest it and see.
User avatar
lundman
 
Posts: 1335
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan


Return to General Help

Who is online

Users browsing this forum: No registered users and 34 guests