Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

unable to install nfs-kernel-server

452 views
Skip to first unread message

Liam Cassidey

unread,
Mar 7, 2011, 8:00:02 PM3/7/11
to
I'm running Debian unstable, and I'm interested in simply setting up an nfs export from the box. However, I'm unable to install nfs. The following happens when I attempt to install nfs-kernel-server.


server:~# apt-get install nfs-kernel-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  nfs-kernel-server
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/159 kB of archives.
After this operation, 389 kB of additional disk space will be used.
Selecting previously deselected package nfs-kernel-server.
(Reading database ... 196686 files and directories currently installed.)
Unpacking nfs-kernel-server (from .../nfs-kernel-server_1%3a1.2.2-4_i386.deb) ...
Processing triggers for man-db ...
Setting up nfs-kernel-server (1:1.2.2-4) ...

Creating config file /etc/exports with new version

Creating config file /etc/default/nfs-kernel-server with new version
Starting NFS common utilities: statd.
Exporting directories for NFS kernel daemon....
Starting NFS kernel daemon: nfsdrpc.nfsd: Setting version failed: errno 16 (Device or resource busy)
rpc.nfsd: writing fd to kernel failed: errno 13 (Permission denied)
rpc.nfsd: unable to set any sockets for nfsd
 failed!
invoke-rc.d: initscript nfs-kernel-server, action "start" failed.
dpkg: error processing nfs-kernel-server (--configure):
 subprocess installed post-installation script returned error exit status 1
configured to not write apport reports
                                      Errors were encountered while processing:
 nfs-kernel-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
server:~#


Any ideas on how I can troubleshoot or fix this? Has anyone else run in to this problem?

Thank you,
Liam

Ron Johnson

unread,
Mar 7, 2011, 10:30:01 PM3/7/11
to

[snip]


>
> Any ideas on how I can troubleshoot or fix this? Has anyone else run
> in to this problem?
>

Yes. Google is your friend.

This ("rpc.nfsd: writing fd to kernel failed: errno 13") search
string produced interesting results.

http://www.catb.org/~esr/faqs/smart-questions.html

--
I prefer banana-flavored energy bars made from tofu.


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/4D75A186...@cox.net

Liam Cassidey

unread,
Mar 9, 2011, 1:50:02 AM3/9/11
to
Unfortunately, I don't have access to the special version of google that Mr. Johnson does (although mine does produce interesting results, just not particularly helpful ones), however the point is taken and I'll backfill the necessary information.

I've removed all entries from /etc/exports, have portmap and nfs-common running, the firewall down, have an empty /etc/hosts.deny and a single entry in hosts.allow (taken from the portmap man page):

portmap 192.168.

I've tried various incarnations of mountd: ALL, nfsd: ALL, etc, with no positive results. When I attempt to start nfs-kernel-server, I get the following output to stdout:

server:~# service nfs-kernel-server start
Exporting directories for NFS kernel daemon....
Starting NFS kernel daemon: nfsdrpc.nfsd: Setting version failed: errno 16 (Device or resource busy)
rpc.nfsd: writing fd to kernel failed: errno 13 (Permission denied)
rpc.nfsd: unable to set any sockets for nfsd
 failed!
server:~#

This also writes the following line to /var/log/messages:

Mar  9 01:22:26 server kernel: [220123.669684] svc: failed to register lockdv1 RPC service (errno 13).

And the following is the output from rpcinfo:

server:~# rpcinfo -p
   program vers proto   port
    100000    2   tcp    111  portmapper
    100000    2   udp    111  portmapper
    100024    1   udp  51547  status
    100024    1   tcp  54119  status

I'm a bit at a loss here as I've never run into any problems setting up nfs mounts on other Unices or Linux distros. There is most likely something fundamental I'm missing, but I just can't put my finger on it. Any help would be appreciated. I don't usually post to mailing lists and am quite new to Debian as a distribution, so please forgive any naiveté on my part.


Thanks,
LC

Scott Ferguson

unread,
Mar 9, 2011, 2:10:02 AM3/9/11
to
On 09/03/11 17:45, Liam Cassidey wrote:
>
<snipped>


>
> I'm a bit at a loss here as I've never run into any problems setting up
> nfs mounts on other Unices or Linux distros. There is most likely
> something fundamental I'm missing, but I just can't put my finger on it.
> Any help would be appreciated. I don't usually post to mailing lists and

> am quite new to Debian as a distribution, so please forgive any�naivet�


> on my part.
>
>
> Thanks,
> LC

anything in var/logs? (like RPC messages)

hosts.allow?

Cheers


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Archive: http://lists.debian.org/4D77262...@gmail.com

Ron Johnson

unread,
Mar 9, 2011, 2:20:01 AM3/9/11
to

These two links mention issues with nfs-utils-1.2.2, which seems to
be "their" name for "our" nfs-common.

http://forums.gentoo.org/viewtopic-t-825111-start-0.html
https://bbs.archlinux.org/viewtopic.php?id=88599


By perusing the bug reports maybe you can find something:
http://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=nfs-common

--
I prefer banana-flavored energy bars made from tofu.


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Archive: http://lists.debian.org/4D772935...@cox.net

Scott Ferguson

unread,
Mar 9, 2011, 2:30:02 AM3/9/11
to
On 09/03/11 17:45, Liam Cassidey wrote:
>
>
> On Mon, Mar 7, 2011 at 10:24 PM, Ron Johnson <ron.l....@cox.net
> <mailto:ron.l....@cox.net>> wrote:
>
> On 03/07/2011 06:52 PM, Liam Cassidey wrote:
>
> I'm running Debian unstable, and I'm interested in simply setting up
> an nfs export from the box. However, I'm unable to install nfs. The
> following happens when I attempt to install nfs-kernel-server.
>
<snipped>

> I've removed all entries from /etc/exports, have portmap and nfs-common
> running, the firewall down, have an empty /etc/hosts.deny and a single
> entry in hosts.allow (taken from the portmap man page):


hosts.allow has it's own man page

perhaps you could try something like this for hosts.allow

nfsd: 192.168.x.y/255.255.255.255
rpcbind: 192.168.x.y/255.255.255.255
mountd: 192.168.x.y/255.255.255.255

<snipped>

you might also want to check your iptables
(please excuse the brevity of my response, multi-tasking)

Cheers


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Archive: http://lists.debian.org/4D772C20...@gmail.com

Tom H

unread,
Mar 9, 2011, 8:20:02 AM3/9/11
to
On Wed, Mar 9, 2011 at 2:28 AM, Scott Ferguson
<prettyfly....@gmail.com> wrote:
> On 09/03/11 17:45, Liam Cassidey wrote:
>>
>> I've removed all entries from /etc/exports, have portmap and nfs-common
>> running, the firewall down, have an empty /etc/hosts.deny and a single
>> entry in hosts.allow (taken from the portmap man page):
>
> perhaps you could try something like this for hosts.allow
>
> nfsd: 192.168.x.y/255.255.255.255
> rpcbind: 192.168.x.y/255.255.255.255
> mountd: 192.168.x.y/255.255.255.255

Or test first with an empty "/etc/hosts.allow".


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Archive: http://lists.debian.org/AANLkTimDGDqQD1zR3O-RWWBKUn=p+-2KnpH...@mail.gmail.com

Brian

unread,
Mar 9, 2011, 9:50:02 PM3/9/11
to
On Wed, Mar 9, 2011 at 1:19 PM, Tom H <tomh...@gmail.com> wrote:
On Wed, Mar 9, 2011 at 2:28 AM, Scott Ferguson
<prettyfly....@gmail.com> wrote:
> On 09/03/11 17:45, Liam Cassidey wrote:
>>
>> I've removed all entries from /etc/exports, have portmap and nfs-common
>> running, the firewall down, have an empty /etc/hosts.deny and a single
>> entry in hosts.allow (taken from the portmap man page):
>
> perhaps you could try something like this for hosts.allow
>
> nfsd: 192.168.x.y/255.255.255.255
> rpcbind: 192.168.x.y/255.255.255.255
> mountd: 192.168.x.y/255.255.255.255

Or test first with an empty "/etc/hosts.allow".


So I've tested it with an empty /etc/hosts.allow, one with ALL: ALL and I feel like every incarnation involving nfsd, rpcbind, mountd, portmap and various ip's and masks. None seem to make any difference to the results I'm seeing so far -- still the same old "svc: failed to register lockdv1 RPC service (errno 13)." error.

Also, iptables has been completely disabled so there shouldn't be anything at the network layer blocking it.

It's been suggested that their may be a bug in the version of nfs-common I'm using. I have version 1:1.2.2-4 installed and it appears, at least according to http://packages.debian.org/search?keywords=nfs-common, that this same version is also in stable. So I guess my next question is: has anyone had luck running an nfs server on any system since lenny? If so, what versions of the 3 (portmap, nfs-common, and nfs-kernel-server) are you running and with what kind of configuration?

Thanks for all the support so far.

Ron Johnson

unread,
Mar 9, 2011, 10:20:01 PM3/9/11
to
On 03/09/2011 08:43 PM, Brian wrote:
>
>
> On Wed, Mar 9, 2011 at 1:19 PM, Tom H <tomh...@gmail.com
> <mailto:tomh...@gmail.com>> wrote:
>
> On Wed, Mar 9, 2011 at 2:28 AM, Scott Ferguson
> <prettyfly....@gmail.com
> <mailto:prettyfly....@gmail.com>> wrote:
> > On 09/03/11 17:45, Liam Cassidey wrote:
> >>
> >> I've removed all entries from /etc/exports, have portmap and
> nfs-common
> >> running, the firewall down, have an empty /etc/hosts.deny
> and a single
> >> entry in hosts.allow (taken from the portmap man page):
> >
> > perhaps you could try something like this for hosts.allow
> >
> > nfsd: 192.168.x.y/255.255.255.255 <http://255.255.255.255>
> > rpcbind: 192.168.x.y/255.255.255.255 <http://255.255.255.255>
> > mountd: 192.168.x.y/255.255.255.255 <http://255.255.255.255>

>
> Or test first with an empty "/etc/hosts.allow".
>
>
> So I've tested it with an empty /etc/hosts.allow, one with ALL: ALL
> and I feel like every incarnation involving nfsd, rpcbind, mountd,
> portmap and various ip's and masks. None seem to make any difference
> to the results I'm seeing so far -- still the same old "svc: failed
> to register lockdv1 RPC service (errno 13)." error.
>
> Also, iptables has been completely disabled so there shouldn't be
> anything at the network layer blocking it.
>
> It's been suggested that their may be a bug in the version of
> nfs-common I'm using. I have version 1:1.2.2-4 installed and it
> appears, at least according to
> http://packages.debian.org/search?keywords=nfs-common, that this
> same version is also in stable. So I guess my next question is: has
> anyone had luck running an nfs server on any system since lenny? If
> so, what versions of the 3 (portmap, nfs-common, and
> nfs-kernel-server) are you running and with what kind of configuration?
>
> Thanks for all the support so far.

Sure. I'm running it with Sid. Been running it for years.

There might be something else that you're running which holds the
resources. If we haven't already asked, what's in syslog and dmesg?

--
I prefer banana-flavored energy bars made from tofu.

--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Archive: http://lists.debian.org/4D7841E6...@cox.net

Tom H

unread,
Mar 10, 2011, 3:30:02 AM3/10/11
to

I have that version running in production on stable. I've also just
duped and upgraded a VM to unstable and it's also running fine.

nfs-kernel-server and nfs-common are 1:1.2.2-4. portmap is 6.0.0-2.

Do you compile your own kernels?


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Archive: http://lists.debian.org/AANLkTi=7+gpBoqB3NQb4USmoh...@mail.gmail.com

Tom H

unread,
Mar 11, 2011, 6:10:01 AM3/11/11
to
On Thu, Mar 10, 2011 at 7:34 PM, Liam Cassidey <liam.c...@gmail.com> wrote:
>
> server:~# dpkg -l portmap nfs-common nfs-kernel-server
> Desired=Unknown/Install/Remove/Purge/Hold
> |
> Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
> |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
> ||/ Name                          Version                       Description
> +++-=======================================================================
> ii  nfs-common                    1:1.2.2-4                     NFS support files common to client and server
> iF  nfs-kernel-server             1:1.2.2-4                     support for NFS kernel server
> ii  portmap                       6.0.0-2                       RPC port mapper
> server:~#

This reminds me (and the tile of the thread should've done so too!)
that nfs-kernel-server's not fully installed.

If "apt-get -f install" doesn't install and configure it fully,
"apt-get install --reinstall nfs-kernel-server" should.


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Archive: http://lists.debian.org/AANLkTikbKs4mJKDocFTPQ...@mail.gmail.com

Liam Cassidey

unread,
Mar 11, 2011, 5:50:03 PM3/11/11
to
On Fri, Mar 11, 2011 at 11:01 AM, Tom H <tomh...@gmail.com> wrote:
On Thu, Mar 10, 2011 at 7:34 PM, Liam Cassidey <liam.c...@gmail.com> wrote:
>
> server:~# dpkg -l portmap nfs-common nfs-kernel-server
> Desired=Unknown/Install/Remove/Purge/Hold
> |
> Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
> |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
> ||/ Name                          Version                       Description
> +++-=======================================================================
> ii  nfs-common                    1:1.2.2-4                     NFS support files common to client and server
> iF  nfs-kernel-server             1:1.2.2-4                     support for NFS kernel server
> ii  portmap                       6.0.0-2                       RPC port mapper
> server:~#

This reminds me (and the tile of the thread should've done so too!)
that nfs-kernel-server's not fully installed.

If "apt-get -f install" doesn't install and configure it fully,
"apt-get install --reinstall nfs-kernel-server" should.


This brings me back to my original problem:

server:~# apt-get -f install nfs-kernel-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
nfs-kernel-server is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? 
Setting up nfs-kernel-server (1:1.2.2-4) ...
Starting NFS common utilities: statd.
Exporting directories for NFS kernel daemon....
Starting NFS kernel daemon: nfsdrpc.nfsd: Setting version failed: errno 16 (Device or resource busy)
rpc.nfsd: writing fd to kernel failed: errno 13 (Permission denied)
rpc.nfsd: unable to set any sockets for nfsd
 failed!
invoke-rc.d: initscript nfs-kernel-server, action "start" failed.
dpkg: error processing nfs-kernel-server (--configure):
 subprocess installed post-installation script returned error exit status 1
configured to not write apport reports
                                      Errors were encountered while processing:
 nfs-kernel-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
server:~# apt-get install --reinstall nfs-kernel-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up nfs-kernel-server (1:1.2.2-4) ...
Starting NFS common utilities: statd.
Exporting directories for NFS kernel daemon....
Starting NFS kernel daemon: nfsdrpc.nfsd: Setting version failed: errno 16 (Device or resource busy)
rpc.nfsd: writing fd to kernel failed: errno 13 (Permission denied)
rpc.nfsd: unable to set any sockets for nfsd
 failed!

Liam Cassidey

unread,
Mar 12, 2011, 6:00:03 PM3/12/11
to
Some more debugging...

I've narrowed down the error to the rpc.nfsd binary:

server:~# rpc.nfsd -d
rpc.nfsd: knfsd is currently down
rpc.nfsd: Writing version string to kernel: +4.1 +2 +3 +4 
rpc.nfsd: Setting version failed: errno 16 (Device or resource busy)
rpc.nfsd: Creating inet TCP socket.
rpc.nfsd: writing fd to kernel failed: errno 13 (Permission denied)
rpc.nfsd: unable to set any sockets for nfsd
server:~#


When running with strace, I see the following suspicious lines:

open("/proc/fs/nfsd/versions", O_WRONLY|O_LARGEFILE) = 3
write(2, "rpc.nfsd: ", 10rpc.nfsd: )              = 10
write(2, "Writing version string to kernel"..., 48Writing version string to kernel: +4.1 +2 +3 +4 ) = 48
write(2, "\n", 1
)                       = 1
write(3, "+4.1 +2 +3 +4 \n", 15)        = -1 EBUSY (Device or resource busy)
write(2, "rpc.nfsd: ", 10rpc.nfsd: )              = 10
write(2, "Setting version failed: errno 16"..., 58Setting version failed: errno 16 (Device or resource busy)) = 58


This filesystem is definitely mounted:

server:~# mount | grep nfs
nfsd on /proc/fs/nfsd type nfsd (rw)
server:~#:


Here are the contents of my /etc/fstab:

# /etc/fstab: static file system information.
#
# Use 'vol_id --uuid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system>                             <mount point>   <type>      <options>       <dump>  <pass>
proc                                        /proc           proc        defaults        0       0
/dev/mapper/server-root                     /               xfs         defaults        0       1
UUID=562b0f53-e127-48f0-90ff-c2dea9ffbf8a   /boot           ext2        defaults        0       2
UUID=bea5cc69-50a4-42d9-8921-58683852510b   /stor           ext2        defaults        0       0
UUID=0f3734a8-34c6-49ec-9dd9-76221af8ac03   /ext            ext4        defaults        0       0
/dev/mapper/server-swap_1                   none            swap        sw              0       0
/dev/hda                                    /media/cdrom0   udf,iso9660 user,noauto     0       0
/dev/hdb                                    /media/cdrom1   udf,iso9660 user,noauto     0       0



Any ideas?

Thanks.

Tom H

unread,
Mar 14, 2011, 5:20:02 AM3/14/11
to
On Fri, Mar 11, 2011 at 5:49 PM, Liam Cassidey <liam.c...@gmail.com> wrote:
> On Fri, Mar 11, 2011 at 11:01 AM, Tom H <tomh...@gmail.com> wrote:
>>
>> If "apt-get -f install" doesn't install and configure it fully,
>> "apt-get install --reinstall nfs-kernel-server" should.
>
> This brings me back to my original problem:

:(

Been googling to understand. Are you using rpcbind or portmap?


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Archive: http://lists.debian.org/AANLkTi=BeaTGAct3sOfiLE38o...@mail.gmail.com

Tom H

unread,
Mar 14, 2011, 5:40:01 AM3/14/11
to
On Sat, Mar 12, 2011 at 5:54 PM, Liam Cassidey <liam.c...@gmail.com> wrote:
>
> Some more debugging...
>
> I've narrowed down the error to the rpc.nfsd binary:
>
> server:~# rpc.nfsd -d
> rpc.nfsd: knfsd is currently down
> rpc.nfsd: Writing version string to kernel: +4.1 +2 +3 +4
> rpc.nfsd: Setting version failed: errno 16 (Device or resource busy)
> rpc.nfsd: Creating inet TCP socket.
> rpc.nfsd: writing fd to kernel failed: errno 13 (Permission denied)
> rpc.nfsd: unable to set any sockets for nfsd
> server:~#
>
> When running with strace, I see the following suspicious lines:
> open("/proc/fs/nfsd/versions", O_WRONLY|O_LARGEFILE) = 3
> write(2, "rpc.nfsd: ", 10rpc.nfsd: )              = 10
> write(2, "Writing version string to kernel"..., 48Writing version string to
> kernel: +4.1 +2 +3 +4 ) = 48
> write(2, "\n", 1
> )                       = 1
> write(3, "+4.1 +2 +3 +4 \n", 15)        = -1 EBUSY (Device or resource busy)
> write(2, "rpc.nfsd: ", 10rpc.nfsd: )              = 10
> write(2, "Setting version failed: errno 16"..., 58Setting version failed:
> errno 16 (Device or resource busy)) = 58

I've just replied to an earlier email of yours about googling for your problem.

This looks exactly like a RHEL or Fedora bug report that I read and it
was an rpcbind-related problem.


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Archive: http://lists.debian.org/AANLkTiaRLyS567x09H1CT...@mail.gmail.com

Tom H

unread,
Mar 14, 2011, 5:50:01 AM3/14/11
to
On Sat, Mar 12, 2011 at 5:54 PM, Liam Cassidey <liam.c...@gmail.com> wrote:
>
> ii  portmap                       6.0.0-2                       RPC port mapper

Remembered the above when I sent my last post and thought that I might
have gone down an incorrect path.

I've just tried to install pcbind and it conflicts with portmap...


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Archive: http://lists.debian.org/AANLkTig92y6bw-6SaHZQ0...@mail.gmail.com

Liam Cassidey

unread,
Mar 15, 2011, 8:20:02 PM3/15/11
to
On Mon, Mar 14, 2011 at 9:41 AM, Tom H <tomh...@gmail.com> wrote:
On Sat, Mar 12, 2011 at 5:54 PM, Liam Cassidey <liam.c...@gmail.com> wrote:
>
> ii  portmap                       6.0.0-2                       RPC port mapper

Remembered the above when I sent my last post and thought that I might
have gone down an incorrect path.

I've just tried to install pcbind and it conflicts with portmap...


--

Yep, I'm definitely using portmap. It's installed and running fine. 

0 new messages