I have two identical linux machines (identical images launched in amazon EC2) and I am trying to mount an exported directory over NFSv4. Here is what the mounted directory looks like on the client machine:
root@server:~# ls -l /websites/
drwxr-xr-x 6 4294967294 4294967294 92 2010-01-01 20:21 logs
drwxr-xr-x 2 4294967294 4294967294 20 2009-12-23 01:14 monit.d
...
I double checked to make sure that the UIDs were matching
Here is the mount command I run from the client
/sbin/mount.nfs4 $MASTER_DN:/ /websites -o rw,_netdev,async
And here is the /etc/exports
entry on the server machine:
/websites 10.0.0.0/8(fsid=0,no_subtree_check,rw,no_root_squash)
read here http://blather.michaelwlucas.com/archives/796
If the NFSv4 client and server domain names doesn’t match,all the usernames will show up as “nobody.”
edit /etc/idmapd.conf and set Domain on server and client to the "localdomain"
[General]
Domain = localdomain
[Translation]
Method = nsswitch
change the /etc/default/nfs-common file (on both your server and client): set NEED_IDMAPD= yes
start idmapd service
As explained in UID /GID with NFS and ZFS, NFSv4 doesn't use UIDs. I was having a similar problem and was able to work around it by using NFSv3. This just entails adding
-o vers=3
to themount
command. Of course, if you do need to use NFSv4 this response won't be of much use to you.This is a user id mapping problem. For some reason the system is using the "nobody" account instead of the true account ids. Check your squashing options and your idmapd.conf file.
Here is a thread I found that discusses the problem, this links to the post of interest, http://www.mail-archive.com/[email protected]/msg03303.html.
FYI, 4294967294 is -2, if treated as a 32-bit signed integer. -1 or -2 are used on various Linux distros for the nobody UID and nogroup GID (in the passwd file the highest 16 bit unsigned number, 65535, is generally used).
You need to change the /etc/default/nfs-common file (on both your server and client): set
NEED_IDMAPD
toyes
.At least this helped for me.
We are using the NFS options
anonuid
andanongid
to set the user/group IDs the server will use for files created by anonymous. If these are not set, "nobody" and "nogroup" will be used - which may vary depending on OS version and distribution. So amay to the trick (with 1001 being a valid and usable UID/GID on your server).