Datasets appear as empty when shared through NFS

All your general support questions for OpenZFS on OS X.

Datasets appear as empty when shared through NFS

Postby monroo » Thu Jun 11, 2020 11:49 am

Hi all,

I was trying to create a couple of NFS shares on my file server and failing miserably. After hours of trial and error I noticed that if I share a dataset directly it appears as an empty folder on client but if I share a subdirectory of the same dataset all works as expected.

I will try and elaborate a little:

My test setup is macOS v10.15.5, OoX 1.9.4 on the server and Ubuntu Mate 20.04 on the client. Zpool has “com.apple.ignoreowner=on” all datasets and all datasets and all their subdirectories have "drwxr-xr-x" for file permissons.

1) If a dataset is shared through NFS as
Code: Select all
#/etc/exports
/Volumes/tank/Music -mapall=-2:-2 -ro

it can be mounted by the client but when opened, the mount point appears as an empty directory. Caja reports “Empty Space” correctly but it shows “0 Items”. More interestingly “ls” command returns an “Input/output error.” but “cd Concerts” works as expected. And when in Concerts directory "ls" command also works as expected. Please note that “tank” is the zpool, “Music” is a dataset and “Concerts” is a regular directory.

2) If a subfolder of a dataset is shared through NFS, it works as expected. Gets mounted normally and mount point is browsable with both Caja and cd/ls. E.g.:
Code: Select all
#/etc/exports
/Volumes/tank/Music/Concerts -mapall=-2:-2 -ro


3) If a regular non-zfs drive is shared through NFS, like an APFS drive, it works as expected. Gets mounted normally and mount point is browsable with both Caja and cd/ls. E.g.:
Code: Select all
#/etc/exports
/Volumes/VMs -mapall=-2:-2 -ro

Please note that “VMs” is a APFS formatted drive.


4) If a regular a subdirectory on a non-zfs drive is shared through NFS. it works as expected. Gets mounted normally and mount point is browsable with both Caja and cd/ls. E.g.:
Code: Select all
#/etc/exports
/Volumes/VMs/Linux -mapall=-2:-2 -ro

Please note that “VMs” is a APFS formatted drive and“Linux” is a regular directory.


I'm not sure but I think this only happens when a zfs dataset is shared directly. I’m having difficulties figuring this out. Any help is much appreciated.
monroo
 
Posts: 13
Joined: Sat May 31, 2014 11:32 pm

Re: Datasets appear as empty when shared through NFS

Postby lundman » Mon Jun 15, 2020 10:41 pm

There could indeed be a bug when sharing the top most directly, possibly we do not advertise it correctly. You might want to create an issue ticket for it, with simple instructions on how to repeat it.
User avatar
lundman
 
Posts: 1337
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: Datasets appear as empty when shared through NFS

Postby monroo » Wed Jun 17, 2020 10:03 pm

lundman wrote:There could indeed be a bug when sharing the top most directly, possibly we do not advertise it correctly. You might want to create an issue ticket for it, with simple instructions on how to repeat it.


Thanks for the reply lundman. Created a ticket https://github.com/openzfsonosx/zfs/issues/769. If I can provide more information to assist in finding the source of this behaviour please just ask.
monroo
 
Posts: 13
Joined: Sat May 31, 2014 11:32 pm


Return to General Help

Who is online

Users browsing this forum: No registered users and 29 guests