# [SOLVED]cant start NFS: 'rpc.nfsd:unable to access /proc/fs/

## jody

Hi

I have a 64bit gentoo on my machine (2.6.36-gentoo-r5).

The nfs-utils has version 1.2.3-r1

I want to export a directory (/home/jody/share) for nfs to the 

machines 192.168.168.32, 192.168.168.33, 192.168.168.34, and 192.168.168.35

So i have /etc/exports

```
/home/jody/share 192.168.168.32(rw,async,no_subtree_check) 192.168.168.33(rw,async,no_subtree_check) 192.168.168.34(rw,async,no_subtree_check) 192.168.168.35(rw,async,no_subtree_check)
```

and hosts.allow

```
lockd:   localhost,  192.168.168.32, 192.168.168.33, 192.168.168.34, 192.168.168.35

portmap: localhost,  192.168.168.32, 192.168.168.33, 192.168.168.34, 192.168.168.35

mountd:  localhost,  192.168.168.32, 192.168.168.33, 192.168.168.34, 192.168.168.35

statd:   localhost,  192.168.168.32, 192.168.168.33, 192.168.168.34, 192.168.168.35

idmapd:  localhost,  192.168.168.32, 192.168.168.33, 192.168.168.34, 192.168.168.35

rquotad: localhost,  192.168.168.32, 192.168.168.33, 192.168.168.34, 192.168.168.35

sshd:    localhost,  192.168.168.32, 192.168.168.33, 192.168.168.34, 192.168.168.35
```

When i want to start nfs, i get an error:

```
localhost ~ # /etc/init.d/nfs start

 * Exporting NFS directories ...                                          [ ok ]

 * Starting NFS mountd ...                                                [ !! ]

 * Starting NFS daemon ...

rpc.nfsd: Unable to access /proc/fs/nfsd errno 2 (No such file or directory).

Please try, as root, 'mount -t nfsd nfsd /proc/fs/nfsd' and then restart rpc.nfsd to correct the problem                                                  [ !! ]

 * Starting NFS smnotify ...                                              [ ok ]

```

The starting of 'mountd' is marked as erroneous with '[!!]', 

but i don't know if this is related to the other error of 'rpc.nfsd'.

Anyway, nfs isn't running.

When i try the suggestion given, this also fails:

```
localhost ~ # mount -t nfsd nfsd /proc/fs/nfsd

mount: unknown filesystem type 'nfsd'
```

Can anybody help me?

Thank You

  JodyLast edited by jody on Tue Apr 05, 2011 7:17 am; edited 1 time in total

----------

## Jaglover

Looks like kernel configuration problem, did you enable nfs support?

----------

## jody

Thanks! Indeed my .config had almost all NFS options enabled, but not NFSD:

```
CONFIG_NETWORK_FILESYSTEMS=y

CONFIG_NFS_FS=y

CONFIG_NFS_V3=y

CONFIG_NFS_V3_ACL=y

CONFIG_NFS_V4=y

# CONFIG_NFS_V4_1 is not set

CONFIG_ROOT_NFS=y

# CONFIG_NFS_USE_LEGACY_DNS is not set

CONFIG_NFS_USE_KERNEL_DNS=y

# CONFIG_NFSD is not set

```

I changed that, rebuilt the kernel, and now it works.

Thanks

  Jody

----------

## diablo465

same problem here

 mount -t nfsd nfsd /proc/fs/nfsd

```

mount: unknown filesystem type 'nfsd'
```

 lsmod

```

Module                  Size  Used by

nfsv4                 252479  0 

nfs                   158220  1 nfsv4

lockd                  61333  1 nfs

sunrpc                183749  3 nfs,lockd,nfsv4

nvidia              10491864  72 

vboxnetflt             15666  0 

vboxnetadp             17734  0 

vboxdrv              1809437  2 vboxnetadp,vboxnetflt
```

ae429-1105 fs # grep -i "nfs" /usr/src/linux/.config

CONFIG_NFS_FS=m

```
CONFIG_NFS_V2=m

CONFIG_NFS_V3=m

CONFIG_NFS_V3_ACL=y

CONFIG_NFS_V4=m

# CONFIG_NFS_SWAP is not set

# CONFIG_NFS_V4_1 is not set

# CONFIG_NFS_FSCACHE is not set

# CONFIG_NFS_USE_LEGACY_DNS is not set

CONFIG_NFS_USE_KERNEL_DNS=y

# CONFIG_NFSD is not set

CONFIG_NFS_ACL_SUPPORT=m

CONFIG_NFS_COMMON=y
```

----------

## Jaglover

```
# CONFIG_NFSD is not set 
```

With this unset you can use this box as a client only.

----------

## rajat.pandita

Enabled  CONFIG_NFSD in my Kernel Config and it works now.

Thanks   :Very Happy: 

----------

## yaxon

Такая же фигня и у меня

```
/etc/init.d/nfs start

 * Starting rpcbind ...                                                                                                                                                    [ ok ]

 * Starting NFS statd ...                                                                                                                                                  [ ok ]

 * Setting up RPC pipefs ...                                                                                                                                               [ ok ]

 * Starting idmapd ...                                                                                                                                                     [ ok ]

 * Exporting NFS directories ...                                                                                                                                           [ ok ]

 * Starting NFS mountd ...                                                                                                                                                 [ ok ]

 * Starting NFS daemon ...

rpc.nfsd: Unable to access /proc/fs/nfsd errno 2 (No such file or directory).

Please try, as root, 'mount -t nfsd nfsd /proc/fs/nfsd' and then restart rpc.nfsd to correct the problem                                                                   [ !! ]

 * Starting NFS smnotify ...                                                                                                                                               [ ok ]

 * ERROR: nfs failed to start

# mount -t nfsd nfsd /proc/fs/nfsd

mount: unknown filesystem type 'nfsd'

# grep -i "nfsd" /usr/src/linux/.config

CONFIG_NFSD=y

CONFIG_NFSD_V2_ACL=y

CONFIG_NFSD_V3=y

CONFIG_NFSD_V3_ACL=y

CONFIG_NFSD_V4=y

CONFIG_NFSD_V4_SECURITY_LABEL=y

# CONFIG_NFSD_FAULT_INJECTION is not set
```

```
# ls -l /usr/src/

lrwxrwxrwx  1 root root   20 май  2 12:45 linux -> linux-3.18.11-gentoo

 # uname -r

3.18.11-gentoo
```

При компиляции ядра вроде все верно делаю.

make && make modules_install && make install && reboot

Как узнать то ли ядро загрузилось ?

Может быть вообще при загрузке не то ядро грузится ?!

Дабы проэксперементировать...

я из ядра убрал опцию NFSD

```
# grep -i "nfsd" /usr/src/linux/.config

#

# mount -t nfsd nfsd /proc/fs/nfsd

mount: unknown filesystem type 'nfsd'

# modprobe nfsd

modprobe: FATAL: Module nfsd not found.
```

Тогда все четко, обратно добавляю в ядро NFSD

Далее.. решил я посмотреть чтож нам говорит rpc.nfsd

```

# rpc.nfsd -d

rpc.nfsd: Checking netconfig for visible protocols.

rpc.nfsd: Enabling inet udp.

rpc.nfsd: Enabling inet tcp.

rpc.nfsd: Enabling inet6 udp.

rpc.nfsd: Enabling inet6 tcp.

rpc.nfsd: Unable to access /proc/fs/nfsd errno 2 (No such file or directory).

Please try, as root, 'mount -t nfsd nfsd /proc/fs/nfsd' and then restart rpc.nfsd to correct the problem

# ls -ld /proc/fs/nfsd

dr-xr-xr-x 2 root root 0 май  3 12:53 /proc/fs/nfsd

```

Дык какой-же у него акцес должен быть ?!

Далее смотрю лог messages

```

May  3 12:50:36 srv rpc.statd[2679]: Version 1.3.1 starting

May  3 12:50:36 srv rpc.statd[2679]: Flags: TI-RPC

May  3 12:50:36 srv rpc.statd[2679]: Running as root.  chown /var/lib/nfs to choose different user

May  3 12:50:36 srv rpc.mountd[2750]: Version 1.3.1 starting

May  3 12:50:36 srv rpc.nfsd[2754]: error starting threads: errno 38 (Function not implemented)

May  3 12:50:36 srv sm-notify[2761]: Version 1.3.1 starting

May  3 12:50:36 srv /etc/init.d/nfs[2641]: ERROR: nfs failed to start

May  3 12:50:49 srv rpc.nfsd[2763]: error starting threads: errno 38 (Function not implemented)

```

прошло немного времени, чудил, крутил, мутил... завелось вроде бы

акцессы не трогал

```

 # rpc.nfsd -d

rpc.nfsd: Checking netconfig for visible protocols.

rpc.nfsd: Enabling inet udp.

rpc.nfsd: Enabling inet tcp.

rpc.nfsd: Enabling inet6 udp.

rpc.nfsd: Enabling inet6 tcp.

rpc.nfsd: knfsd is currently up

```

но не тут то было... на клиенте

```
mount server:/home /home

mount.nfs: Protocol not supported
```

тут я решил проверить что в ядре у клиента:

```
grep -i "nfs" /usr/src/linux/.config

CONFIG_KERNFS=y

CONFIG_NFS_FS=m

CONFIG_NFS_V2=m

CONFIG_NFS_V3=m

# CONFIG_NFS_V3_ACL is not set

# CONFIG_NFS_V4 is not set

# CONFIG_NFS_SWAP is not set

CONFIG_NFSD=m

CONFIG_NFSD_V3=y

# CONFIG_NFSD_V3_ACL is not set

# CONFIG_NFSD_V4 is not set

CONFIG_NFS_COMMON=y
```

перекомпилил, перезагрузился...

```
mount server:/home /home -v

mount.nfs: timeout set for Sun May  3 12:43:55 2015

mount.nfs: trying text-based options 'vers=4,addr=192.168.0.1,clientaddr=192.168.0.50'

mount.nfs: mount(2): Protocol not supported

mount.nfs: trying text-based options 'addr=192.168.0.1'

mount.nfs: prog 100003, trying vers=3, prot=6

mount.nfs: trying 192.168.0.1 prog 100003 vers 3 prot TCP port 2049

mount.nfs: portmap query retrying: RPC: Program/version mismatch

mount.nfs: prog 100003, trying vers=3, prot=17

mount.nfs: trying 192.168.0.1 prog 100003 vers 3 prot UDP port 2049

mount.nfs: portmap query failed: RPC: Program/version mismatch

mount.nfs: Protocol not supported
```

----------

