# [SOLVED] NFS port 2049 missing in rpcinfo -p

## RealNoob

Hi,

I am currently trying to define an nfs shared directory. I have followed this howto, but when I run the command rpcinfo command I see the following:

```
inttserver ~ # rpcinfo -p

   program vers proto   port

    100000    2   tcp    111  portmapper

    100005    2   udp   4002  mountd

    100005    2   tcp   4002  mountd

    100005    3   udp   4002  mountd

    100005    3   tcp   4002  mountd

    100000    2   udp    111  portmapper

    100024    1   udp   4000  status

    100024    1   tcp   4000  status
```

As you can see, the port 2049 is missing in the output. Is this port only show up when a client is connected to the nfs share? (from what I have found so far, the port should already be open).

When the nfs services start, it generate the following in /var/log/messages:

```
Mar  1 15:39:05 localhost nfsd[6754]: nfssvc: Function not implemented
```

And here is the content of my /etc/exports:

```
/opt/testnfs 192.168.50.50(async,ro,no_subtree_check)
```

Can someone tell me why port 2049 is not reported by rpcinfo, is the above message related to that problem, and how to fix the problem?

Thanks.

----------

## Hu

Have you enabled NFSD support in the kernel of the server?

----------

## RealNoob

Below is the configuration of my kernel in "File Systems" -> "Network File Systems":

```
     <M>   NFS client support

     [*]     NFS client support for NFS version 3

     [*]       NFS client support for the NFSv3 ACL protocol extension

     [*]     NFS client support for NFS version 4

     [ ]       NFS client support for NFSv4.1 (EXPERIMENTAL)

     [ ]   Use the legacy NFS DNS resolver

     <M>   NFS server support

     -*-     NFS server support for NFS version 3

     [*]       NFS server support for the NFSv3 ACL protocol extension

     [*]     NFS server support for NFS version 4 (EXPERIMENTAL)

     <M>   Secure RPC: SPKM3 mechanism (EXPERIMENTAL)

```

I see that the "NFS server support" is to be compiled has a module, is it the nfsd module?

I have tried "modprobe nfs" and "modprobe nfsd" but the command always return "FATAL: Module nfsd not found."

I am usually using genkernel to build the kernel, maybe I have an option missing in its configuration.

----------

## Hu

```
     To compile the NFS server support as a module,

     choose M here: the module will be called nfsd.
```

If modprobe nfsd fails, then you probably did not install modules correctly.

----------

## RealNoob

Hi,

I just recompiled all my modules using:

```
make modules && make modules_install
```

but modprobe still report the modules as "not found" when I try to load them.

Below is the result of "modprobe -c"

```
inttserver ~ # modprobe -c

# Aliases to tell insmod/modprobe which modules to use 

# Uncomment the network protocols you don't want loaded:

# alias net-pf-1 off            # Unix

# alias net-pf-2 off            # IPv4

# alias net-pf-3 off            # Amateur Radio AX.25

# alias net-pf-4 off            # IPX

# alias net-pf-5 off            # DDP / appletalk

# alias net-pf-6 off            # Amateur Radio NET/ROM

# alias net-pf-9 off            # X.25

# alias net-pf-10 off           # IPv6

# alias net-pf-11 off           # ROSE / Amateur Radio X.25 PLP

# alias net-pf-19 off           # Acorn Econet

alias char-major-10-175 agpgart

alias char-major-10-200 tun

alias char-major-81     bttv

alias char-major-108    ppp_generic

alias /dev/ppp          ppp_generic

alias tty-ldisc-3       ppp_async

alias tty-ldisc-14      ppp_synctty

alias ppp-compress-21   bsd_comp

alias ppp-compress-24   ppp_deflate

alias ppp-compress-26   ppp_deflate

# Crypto modules (see http://www.kerneli.org/)

alias loop-xfer-gen-0   loop_gen

alias loop-xfer-3       loop_fish2

alias loop-xfer-gen-10  loop_gen

alias cipher-2          des

alias cipher-3          fish2

alias cipher-4          blowfish

alias cipher-6          idea

alias cipher-7          serp6f

alias cipher-8          mars6

alias cipher-11         rc62

alias cipher-15         dfc2

alias cipher-16         rijndael

alias cipher-17         rc5

# Support for i2c and lm_sensors

alias char-major-89    i2c-dev

alias parport_lowlevel parport_pc

alias char-major-10-144 nvram

alias binfmt-0064 binfmt_aout

alias char-major-10-135 rtc

# /etc/modprobe.d/pnp-aliases

#

# These aliases are used by this udev-rule:

# SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", RUN+="/bin/sh -c '/sbin/modprobe -a $$(while read id; do echo pnp:d$$id; done < /sys$devpath/id)'"

#

# They should help to autoload drivers used by various pnp-devices

# (if not blacklisted somewhere else)

#

alias pnp:dPNP0510 irtty-sir

alias pnp:dPNP0511 irtty-sir

alias pnp:dPNP0700 floppy

alias pnp:dPNP0800 pcspkr

alias pnp:dPNP0b00 rtc

alias pnp:dPNP0303 atkbd

alias pnp:dPNP0f13 psmouse

alias pnp:dPNPb02f analog

# This file lists modules which will not be loaded by udev,

# not at coldplugging and not on hotplug events.

# Add your own entries to this file

# in the format "blacklist <name of module>"

# Some examples:

# evbug is a debug tool and should be loaded explicitly

blacklist evbug

# Autoloading eth1394 most of the time re-orders your network

# interfaces, and with buggy kernel 2.6.21, udev persistent-net

# is not able to rename these devices, so you get eth?_rename devices

# plus an exceeded 30sec boot timeout

blacklist eth1394

# You probably want this to not get the console beep loud on every tab :)

#blacklist pcspkr

# these drivers are very simple, the HID drivers are usually preferred

#blacklist usbmouse

#blacklist usbkbd

# Sometimes loading a framebuffer driver at boot gets the console black

#install pci:v*d*sv*sd*bc03sc*i* /bin/true

# hplip and cups 1.4+ use raw USB devices, so it requires usblp not be loaded

#blacklist usblp

options lockd nlm_udpport=4001

options lockd nlm_tcpport=4001

alias ip6t_MARK xt_mark

alias ip6t_mark xt_mark

alias ipt_MARK xt_mark

alias ipt_mark xt_mark

```

The modules are present in '/lib/modules' as shown below:

```
inttserver ~ # find /lib/modules/2.6.36-gentoo-r5/ -name "*nfs*"

/lib/modules/2.6.36-gentoo-r5/kernel/fs/nfs_common

/lib/modules/2.6.36-gentoo-r5/kernel/fs/nfs_common/nfs_acl.ko

/lib/modules/2.6.36-gentoo-r5/kernel/fs/nfs

/lib/modules/2.6.36-gentoo-r5/kernel/fs/nfs/nfs.ko

/lib/modules/2.6.36-gentoo-r5/kernel/fs/nfsd

/lib/modules/2.6.36-gentoo-r5/kernel/fs/nfsd/nfsd.ko

```

The command 'uname -r' returns 2.6.36-gentoo-r5, so modprobe should find them.

What am I missing?

----------

## Hu

Have you run depmod to (re)generate the module dependency information?  Does strace modprobe nfsd give any hints?

Why are you building NFSD support as a module instead of including it in the kernel?  If you plan to use the functionality full time, you are better off including it in the kernel directly.

----------

## RealNoob

Hi,

I use 'depmod -a' yesterday, but modprobe, now, returns "invalid format" for both nfs and nfsd module.

This machine is purely for testing, so loading nfsd as a module or making it part of the kernel doesn't really matter.

I will include the thing in the kernel and recompile it, given the error message above, recompiling the kernel is not a bad idea I hope.

----------

## RealNoob

Hi,

I finally include NFS support in the kernel and recompile it with genkernel and now everything is fine.

Thanks a lot.

----------

