Several NFS errors on diskless clients

Beeblebrox zaphod at berentweb.com
Fri Feb 13 12:25:28 UTC 2015


Hi Rick, thanks for answering, but it seems there's a slight mis-understanding.

* I have 3 NFS exports, mount version on client confirmed with "nfsstat -m":
V2: /data/amd64,  mounts to root as ro
V4: /usr/local,  mounts to same as ro
V4: /home,  mounts to same as rw

* Root is being mounted as V2, not a problem for me. However, when I "ls -la" /home or /usr/local (the V4 mounts), I see file ownership problem (numbers instead of actual user name). This is true for folders owned ANY user (root, me, etc):
drwxr-xr-x  106  32767  32767  date-time   folder-name  (always the same number 32767)

* I turned on some debugging with "nfsuserd -verbose" and I can see:
added uid=0 name=root  \  added gid=0 name=root
added uid=1001 name=me  \  added gid=1001 name=me
added uid=350 name=_sabnzbd  \  added gid=350 name=_sabnzbd

* Most Likely reason: The NFS-V2 export (client root /data/amd64 folder) is at the same time a Jail. This probably causes "some process number in the jail" not matching up with process number on Host, thus the failure to assign proper name to file ownership. My /etc/jail.conf:
pxe {   name = pxe;
        path = /data/amd64;
        ip4.addr = 192.168.2.1;  #subnet as /32 breaks tftp
        host.hostname = pxe.me;
        devfs_ruleset = 12;
        allow.raw_sockets;
        mount.devfs;
        mount.fstab = /etc/fstab.pxe;	}

* I start the diskless client system with below script. Any additional pxe service (dhcp, tftp, etc) is defined in /data/amd64/etc/rc.conf.
jail -c pxe
rpcbind -s -h 192.168.2.1
mountd -rnl -h 192.168.2.1
nfsd -ut -n 4 -h 192.168.2.1
nfsuserd -verbose

* Starting dbus/hald on client while nfsuserd is running results in:
a) added gid=556 name=messagebus  \  added gid=562 name=polkit
b) No message about "nfs_getpages: error 13"

* If I don't run nfsuserd, or if I use NFS V2/3 for the /usr/local export:
a) File permissions on the non-root exports get displayed by name.
b) I see the "nfs_getpages: error 13" message.

* I did not try the "-maproot=root" solution, because it does not address the problem of regular users (ie me) having incorrect file ownership under /home/me.

* File ownership under /var/run is correct because it's not NFS (it's MD)

I hope I was better able to explain the issue this time.
Regards.
-- 
FreeBSD_amd64_11-Current_RadeonKMS


More information about the freebsd-fs mailing list