rpc.idmapd needs nfsd.ko

Bug #235930 reported by Martin von Gagern
36
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nfs-utils (Debian)
Fix Released
Unknown
nfs-utils (Gentoo Linux)
Fix Released
Medium
nfs-utils (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

After starting nfs-common with NEED_IDMAPD=yes, I tried to mount an NFSv4 mount. The mount worked, but the ownerships were mapped to nobody/nogroup. I verified rpc.idmapd was running on both ends, which was the case. Next I killed rpc.idmapd and restarted it from the command line with debug output: "rpc.idmapd -fvvv". The result on the ubuntu side was pretty instructive:

$ sudo rpc.idmapd -fvvv
rpc.idmapd: libnfsidmap: using domain: localdomain

rpc.idmapd: libnfsidmap: using translation method: nsswitch

rpc.idmapd: Expiration time is 600 seconds.
rpc.idmapd: nfsdopenone: Opening /proc/net/rpc/nfs4.nametoid/channel failed: errno 2 (No such file or directory)

Indeed there was no directory nfs4.nametoid in /proc/net/rpc. As the /proc structure is generated by the kernel, I grepped the nfs kernel sources and found a reference in fs/nfsd/nfs4idmap.c. This is the nfs SERVER module! After modprobing that, I got the required directory, got idmapd to start without complaint, and got my mount with correct user mapping.

So it seems that even an NFSv4 client would need nfsd.ko loaded. More precisely, idmapd needs it, so /etc/init.d/nfs-common should modprobe it whenever it hat NEED_IDMAPD=yes.

ProblemType: Bug
Architecture: i386
Date: Fri May 30 03:41:08 2008
DistroRelease: Ubuntu 8.04
NonfreeKernelModules: nvidia
Package: nfs-common 1:1.1.2-2ubuntu2.1
PackageArchitecture: i386
ProcEnviron:
 SHELL=/bin/bash
 PATH=/home/username/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
 LC_MESSAGES=C
 LANG=de_DE.utf8
 LC_CTYPE=de_DE.utf8
SourcePackage: nfs-utils
Uname: Linux 2.6.24-17-generic i686

Tags: apport-bug
Revision history for this message
Martin von Gagern (gagern) wrote :
Revision history for this message
Martin von Gagern (gagern) wrote :

The attached patch causes nfsd.ko to be loaded before initmap is started, fixing the issue.

References: I found out that Gentoo has this issue as well, and there is a short thread about it on the linux nfsv4 mailing list.
http://bugs.gentoo.org/show_bug.cgi?id=220747
http://thread.gmane.org/gmane.linux.nfsv4/6311/focus=6312

Changed in nfs-utils:
status: Unknown → Confirmed
Changed in nfs-utils:
status: Confirmed → Fix Released
Revision history for this message
pongtawat (pongtawat) wrote :

This issue is still present in 8.04.2. It is an upstream bug (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=490181). Fixed in Debian with nfs-utils 1:1.1.2-6.

Revision history for this message
John Florian (j100) wrote :

I too am forced to restart nfs-common after booting to get ID mapping working correctly on a server built with 8.10.

It's rather disappointing to see that this hasn't been fixed yet.

Revision history for this message
GaryParr (gary-garyparr) wrote :

Is there any plan to push the 1:1.1.2-6 down to 8.04 LTS? I'm running a few 8.04 servers and this problem drives me crazy.

Revision history for this message
hal (hal-bg) wrote :

Come on guys! it is not fixed even in 9.04.

Revision history for this message
Steve Langasek (vorlon) wrote :

Thank you for taking the time to report this bug and help to improve Ubuntu.

In nfs-common 1:1.1.2-6 and above, the nfsd module does get loaded before starting idmapd.

Changed in nfs-utils (Ubuntu):
status: New → Fix Released
Revision history for this message
Ian Dickerson (iandickerson) wrote :

This is still preventing unattended reboot on my server (8.10 only has nfs-common 1.1.2-4)

Changed in nfs-utils (Gentoo Linux):
importance: Unknown → Medium
Changed in nfs-utils (Debian):
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.