I have an Ubuntu 12.04 server that exports a couple of filesystems over NFS.
server$ cat /etc/exports
/home 192.168.42.0/255.255.255.0(rw,anonuid=65534,anongid=65534,async,no_subtree_check)
/stuff 192.168.42.0/255.255.255.0(rw,anonuid=65534,anongid=65534,async,no_subtree_check)
/stuff 192.168.99.0/255.255.255.0(ro,anonuid=65534,anongid=65534,async,no_subtree_check)
I also have a client that mounts them:
client$ cat /etc/fstab
...
server:/home /home nfs hard,intr,rsize=8192,wsize=8192,_netdev 0 0
server:/stuff /server/stuff nfs hard,intr,rsize=8192,wsize=8192,_netdev 0 0
The client's IP is in the 192.168.42.x range. It was running Ubuntu 10.04 until yesterday. NFS worked fine, more or less (sometimes it wouldn't automount on boot, but I had a cron script to detect and fix that).
I upgraded the client to Ubuntu 12.04 yesterday and rebooted. NFS continued to work fine.
I upgraded the client to Ubuntu 14.04 today and rebooted. Now NFS is mounted but all file ownership information is mapped to nobody:4294967294:
client$ ls -ld /home/weblate
drwxr-xr-x 5 nobody 4294967294 4096 Jan 29 2014 weblate
Why is that and what do I need to do to make file ownership work again?
The vital clue showed up in
/var/log/syslog
:combined with this excerpt from NFSv4Howto
and this comment in
/etc/idmap.conf
:So turns out my server thought its domain was
lan
:while my client didn't have a domain:
The fix: edit
/etc/hosts
on the client to readand reboot.
I resolved my issue by this method. Open the file
/etc/nfsmount.conf
and findNfsvers=
.Uncomment that line and write the NFS version which is supported by your server. Mine was 3 so I wrote:
The I restarted the NFS server.