MacOS NFS clients directory is empty

#1 it's nfs stuff, the server is FreeBSD 14.3 with NFSv3, the client is MacOS.

The problem is after mounting, the directory showed out but all empty.

Here is the part for FreeBSD NFS server:

Code:
# cat /etc/rc.conf

# Set NFS service
nfs_server_enable="YES"
rpcbind_enable="YES"
mountd_enable="YES"
rpc_lockd_enable="YES"
rpc_statd_enable="YES"
mountd_flags="-r -p 4046"
rpc_lockd_flags="-p 4045"
rpc_statd_flags="-p 4047"

Code:
# cat /etc/exports 

/data -alldirs -mapall=1001 -network 192.168.31 -mask 255.255.255.0

Here is the part of MacOS client:

Code:
cat /etc/nfs.conf                                      

#
# nfs.conf: the NFS configuration file, man mount_nfs
#nfs.client.mount.options = intr

Code:
% sudo mount -t nfs 192.168.31.240:/data /Users/jazzi/nfs

Ever tried options like -o resvport etc.

Please let me know if need more information, thank you.
 
it works for me ( i tried without lockd and statd though and used mount -o nolocks on the mac)
this is exports
/extra/fs -maproot=0:0 -alldirs -network 10.1.1.0 -mask 255.255.255.0
rc.conf
nfs_server_flags="-t -u -n 6"
 
it works for me ( i tried without lockd and statd though and used mount -o nolocks on the mac)
this is exports
/extra/fs -maproot=0:0 -alldirs -network 10.1.1.0 -mask 255.255.255.0
rc.conf
nfs_server_flags="-t -u -n 6"
I got no luck. And got some error messages on log

Code:
# tail /var/log/messages 

Oct  8 20:14:14 rob mountd[8032]: can't get address info for host rw
Oct  8 20:14:14 rob mountd[8032]: bad host rw, skipping
Oct  8 20:14:14 rob mountd[8032]: network/host conflict
Oct  8 20:14:14 rob mountd[8032]: bad exports list line '/data/babypig    rw -maproot'
Oct  8 20:14:14 rob mountd[8032]: = after op: ro
Oct  8 20:14:14 rob mountd[8032]: bad exports list line '/data/movie    -ro
Oct  8 20:14:14 rob mountd[8032]: can't get address info for host rw
Oct  8 20:14:14 rob mountd[8032]: bad host rw, skipping
Oct  8 20:14:14 rob mountd[8032]: network/host conflict
Oct  8 20:14:14 rob mountd[8032]: bad exports list line '/data/reserved    rw -maproot'
 
It's definitely not happy with your config, you seem to have it messed up very badly. At least your config has "rw" as a hostname, I suggest you post everything here for review.
 
It's definitely not happy with your config, you seem to have it messed up very badly. At least your config has "rw" as a hostname, I suggest you post everything here for review.
It's a fresh install system, the /etc/hosts is the default and /etc/rc.conf has hostname="rob.yes.home", there is no "rw", don't know where it comes from.

One thing, when install this os I checked "local unbound" service but it does't work after reboot, so I stopped this service and set a static IPv4 address.

there is no "rw" flag in exports(5). read-write is the default if you don't specify -ro.
My /etc/exports has no -rw, as you said it is the default so I didn't toss it.
 
Something new interesting, I tried mounted subdirectory of /data and all except two directories succeed, the files within mounted directory shows up. Two subdirectories (/data/movie and /data/reserved) have same error messages as /data, that's is permission denied, though have changed the owner:group to 1001 and permission to 775 by chown -R 775 /data

Don't know if something connected with the ZFS sharenfs property.
 
there is no "rw" flag in exports(5). read-write is the default if you don't specify -ro.
I think this "rw" comes from the ZFS sharenfs property, check below:

Code:
# cat /etc/zfs/exports

# !!! DO NOT EDIT THIS FILE MANUALLY !!!

/data    rw -maproot=root -network=192.168.31.0/24
/data/babypig    rw -maproot=root -network=192.168.31.0/24
/data/book    -mapall=jazzi -network=192.168.31.0/24
/data/download    -mapall=jazzi -network=192.168.31.0/24
/data/movie    -ro=@192.168.31.240
/data/music    -mapall=jazzi -network=192.168.31.0/24
/data/photo    -mapall=jazzi -network=192.168.31.0/24
/data/reserved    rw -maproot=root -network=192.168.31.0/24
/data/tv    -mapall=jazzi -network=192.168.31.0/24
So I changed the property as below, and no error message shows up again, also ok to mount and list contents.
Code:
# zfs set sharenfs="-network 192.168.31/24" data/babypig

Now, all subdirectories are no problem to mount and list contents, but still /data can not list content even mounted, I found one post said:

Since each dataset is essentially a mounted drive, you will be able to browse nested datasets if you share at a higher level, but won't be able to list the contents.

For example if /media/music is a dataset and /media/movies are both datasets, you can't just share /media and only mount /media on client. You will have to set and mount for each sub zfs dataset.

Above words answered my question why /data can be mounted and directories listed (like /data/book) but subdirectories contents can not be listed, but I just want to mount /data, is there a workaround?
 
Back
Top