[H-GEN] NFS4 and ownerships
Nikolai Lusan
nikolai at lusan.id.au
Wed Jan 21 18:37:43 EST 2009
Greetings,
I have been beating my head against this for a couple of days now. I
have had a working nfs4 server dealing out my home directory and some
other shares over my network for sometime now, however I am currently
experiencing an "issue" with this. The issue is that all the uid/gid
numbers on the mounted files are squashed to nobody:nogroup ... this is
not very useful when one is trying to mount their home directory :)
Important info:
The server(kiev) is running debian unstable with all the latest packages
for nfs-kernel-server and firends, its also running a distro kernel
(2.6.26-1). The rpcinfo is:
kiev:~# rpcinfo -p
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100021 1 udp 33451 nlockmgr
100021 3 udp 33451 nlockmgr
100021 4 udp 33451 nlockmgr
100021 1 tcp 37633 nlockmgr
100021 3 tcp 37633 nlockmgr
100021 4 tcp 37633 nlockmgr
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100003 4 udp 2049 nfs
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
100005 1 udp 47731 mountd
100005 1 tcp 45891 mountd
100005 2 udp 47731 mountd
100005 2 tcp 45891 mountd
100005 3 udp 47731 mountd
100005 3 tcp 45891 mountd
kiev:~# ps aux | grep rpc
root 2196 0.0 0.0 0 0 ? S< 00:30 0:00 [rpciod/0]
root 2198 0.0 0.0 0 0 ? S< 00:30 0:00 [rpciod/1]
root 10661 0.0 0.0 21104 660 ? Ss 09:13 0:00 /usr/sbin/rpc.idmapd
root 10683 0.0 0.0 19320 864 ? Ss 09:13 0:00 /usr/sbin/rpc.mountd --manage-gids
root 10779 0.0 0.0 5660 792 pts/1 S+ 09:24 0:00 grep rpc
The exports (cut down for brevity) look like:
/srv/exports *(fsid=0,insecure,no_root_squash,no_subtree_check)
/srv/exports/home rivne.home.lusan.id.au(fsid=1,rw,nohide,insecure,no_root_squash,no_subtree_check,sync)
/srv/exports/home donetsk.home.lusan.id.au(fsid=1,rw,nohide,insecure,no_root_squash,no_subtree_check,sync)
/srv/exports/music rivne.home.lusan.id.au(fsid=2,rw,nohide,insecure,no_root_squash,no_subtree_check,sync)
/srv/exports/music donetsk.home.lusan.id.au(fsid=2,rw,nohide,insecure,no_root_squash,no_subtree_check,sync)
An example of rpcinfo on a client is:
sevastopol:~# rpcinfo -p
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 51183 status
100024 1 tcp 52761 status
sevastopol:~# ps aux | grep rpc
statd 2493 0.0 0.0 1956 756 ? Ss 00:46 0:00 /sbin/rpc.statd
root 2498 0.0 0.0 0 0 ? S< 00:46 0:00 [rpciod/0]
root 25960 0.0 0.0 2360 744 ? Ss 09:01 0:00 /usr/sbin/rpc.idmapd
And the mount options being used (from both command line and fstab) are:
kiev:/music /srv/kiev/music nfs4 proto=tcp,rw,hard,intr,rsize=32768,wsize=32768 0 0
kiev:/home /srv/kiev/home nfs4 proto=tcp,rw,hard,intr,rsize=32768,wsize=32768 0 0
So as we can see I am not using the kerberos option here, and although
the shares can be mounted and the files read the issue remains that from
the client side the ownership of the files is nobody:nogroup
(essentially annonymous). I have noticed this issue on clients with the
exact same kernel as the server (fresh install onto a new HD for the
desktop) and more recent kernels (sevastopol is on a 2.6.28.1 kernel
right now). I have tried all the troubleshooting techniques I know to
solve this issue, and followed many more from googling. If anyone can
shed some light on what might be going on I would be appreciative :)
--
Nikolai Lusan
More information about the General
mailing list