[Lxc-users] rpc.nfsd daemon has a problem to write into /proc/fs/nfsd/versions

Lionel.BAILLERGEAU lb at i3s.unice.fr
Wed Oct 20 14:32:22 UTC 2010


Hello,

I'm trying to set-up a NFS server on one of my containers.
Everything goes fine (portmap, NFS statd, mounting nfsd filesystem
in /proc and rpc.mountd are OK...) but when I try to run the NFS
daemon rpc.nfsd, I have this error message:

--8<-----[Cut Here]-----8<-----[Cut Here]-----8<-----[Cut Here]-----8<--
nfsd[3838]: nfssvc: Setting version failed: errno 16 (Device or resource 
busy)
--8<-----[Cut Here]-----8<-----[Cut Here]-----8<-----[Cut Here]-----8<--

and it stops.

When I try to run rpc.nfsd directly with strace to see where is the
bug, this is the output:

--8<-----[Cut Here]-----8<-----[Cut Here]-----8<-----[Cut Here]-----8<--
open("/proc/fs/nfsd/versions", O_WRONLY) = 4
write(4, "+2 +3 +4 \n", 10)             = -1 EBUSY (Device or resource busy)
--8<-----[Cut Here]-----8<-----[Cut Here]-----8<-----[Cut Here]-----8<--


While later in the same strace log, a write access to
/proc/fs/nfsd/threads  is OK...

--8<-----[Cut Here]-----8<-----[Cut Here]-----8<-----[Cut Here]-----8<--
open("/proc/fs/nfsd/threads", O_WRONLY) = 4
write(4, "8\n", 2)                      = 2
close(4)                                = 0
--8<-----[Cut Here]-----8<-----[Cut Here]-----8<-----[Cut Here]-----8<--

Apparently, rpc.nfsd can't write data in /proc/fs/nfsd/versions but
can do it in /proc/fs/nfsd/threads...

Some file checks on my container:

$ mount | grep nfsd
nfsd on /proc/fs/nfsd type nfsd (rw,noexec,nosuid,nodev)
$ ls -l /proc/fs/nfsd/versions
-rw------- 1 root root 0 20 oct.  15:06 /proc/fs/nfsd/versions
$ ls -l /proc/fs/nfsd/threads
-rw------- 1 root root 0 20 oct.  15:06 /proc/fs/nfsd/threads


NB: If I run the same configuration on the host side, all works fine...

I use a Gentoo 10.0 distrib, the kernel version is 2.6.35-gentoo-r11 and
all the ebuild are up to date.

Thanking you in advance for any idea.

- lb -

PS: apologies for my (very) bad english...


-- 
#
##  Lionel Baillergeau  -     CNRS/UNSA
##    lb at unice.fr       -  Sophia Antipolis
#




More information about the lxc-users mailing list