# [SOLVED]NFSv4: no suche device -- reboot/restart home server

## Jointy

Hi guys,

I have some really strange problems here with my NFSv4 mounts after a reboot/restart of my home server pandora.

The situation:

I had setup my old PIII 1Ghz with 256MB RAM as a gentoo server with NFSv4 and a 60GB Raid1 (md).

I used it with NFSv3 over TCP before without any problems. But after I red that it is possible to use NFSv4 over Internet and Kerberos5, I wanted to made some tests with it.

The problem isn't that I can't get it to work. No the problem is that when I  restart my NFS server the NFSv4 mounts doesn't work until I mount on export in old NFSv3 style. Have a look.

```

## Try to mount as root the share as list in the fstab file

arko j0inty # mount /home/j0inty/pandora/movies -v

mount.nfs4: timeout set for Sun Jul 20 12:25:50 2008

mount.nfs4: text-based options: 'wsize=32768,rsize=32768,intr,addr=192.168.0.20,clientaddr=192.168.0.15'

mount.nfs4: No such device

## show the mounts (I know that is the old v3 style, because showmount can nfsv4 yet

arko j0inty # showmount -e pandora

Export list for pandora:

/exports        *

/exports/movies balou.jointy.homeunix.net,arko.jointy.homeunix.net

/exports/j0inty arko.jointy.homeunix.net

## Mount it on the old style and directly umount the share

arko j0inty # mount -t nfs -owsize=8192,rsize=8192,tcp pandora:/exports/movies /mnt/pandora/

arko j0inty # umount /mnt/pandora/

## Mount it now again over fstab

arko j0inty # mount /home/j0inty/pandora/movies -v

mount.nfs4: timeout set for Sun Jul 20 12:26:34 2008

mount.nfs4: text-based options: 'wsize=32768,rsize=32768,intr,addr=192.168.0.20,clientaddr=192.168.0.15'

pandora:/movies on /home/j0inty/pandora/movies type nfs4 (rw,noexec,nosuid,nodev,noauto,users,noatime,wsize=32768,rsize=32768,intr)

arko j0inty # mount /home/j0inty/pandora/datapool/

arko j0inty # mount

/dev/sda7 on / type reiserfs (rw,noatime,notail)

proc on /proc type proc (rw,nosuid,nodev,noexec)

sysfs on /sys type sysfs (rw,nosuid,nodev,noexec)

udev on /dev type tmpfs (rw,nosuid,size=10240k,mode=755)

devpts on /dev/pts type devpts (rw,nosuid,noexec,gid=5,mode=620)

/dev/sda5 on /home type reiserfs (rw,noatime,notail)

/dev/sda6 on /mnt/games type reiserfs (rw,noatime,notail)

/dev/sda2 on /datapool type reiserfs (rw,noatime,notail)

none on /tmp type tmpfs (rw,size=64m)

shm on /dev/shm type tmpfs (rw,noexec,nosuid,nodev)

usbfs on /proc/bus/usb type usbfs (rw,noexec,nosuid,devmode=0664,devgid=85)

binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)

none on /proc/fs/vmblock/mountPoint type vmblock (rw)

pandora:/movies on /home/j0inty/pandora/movies type nfs4 (rw,users,noexec,nosuid,nodev,noatime,wsize=32768,rsize=32768,intr,addr=192.168.0.20,clientaddr=192.168.0.15)

pandora:/j0inty on /home/j0inty/pandora/datapool type nfs4 (rw,users,noexec,nosuid,nodev,noatime,wsize=32768,rsize=32768,intr,addr=192.168.0.20,clientaddr=192.168.0.15)

```

There we can see that it works like a charm. 

/etc/fstab

```

/dev/sda1               /boot           ext2            noauto,noatime  1 2

/dev/sda7               /               reiserfs        noatime,notail  0 1

/dev/sda3               none            swap            sw              0 0

/dev/hda                /mnt/cdrom      auto            noauto,ro       0 0

/dev/sda5               /home           reiserfs        noatime,notail  0 2

/dev/sda6               /mnt/games      reiserfs        noatime,notail  0 2

/dev/sda2               /datapool       reiserfs        noatime,notail  0 2

#/dev/fd0               /mnt/floppy     auto            noauto          0 0

none                    /tmp            tmpfs           size=64m        0 0

/dev/sdb1               /mnt/usbstick   auto            noauto,noatime,users,rw,uid=0,gid=users,umask=0007      0 2

#### NFS V4 ####

pandora:/ /mnt/pandora nfs4 noauto,noatime,users,wsize=32768,rsize=32768,ro,intr 0 0

pandora:/j0inty /home/j0inty/pandora/datapool nfs4 noauto,noatime,users,wsize=32768,rsize=32768,rw,intr 0 0

pandora:/movies /home/j0inty/pandora/movies nfs4 noauto,noatime,users,wsize=32768,rsize=32768,rw,intr 0 0

```

So my question is does anyone knows something about this behaviour ???

Any hints what I can change or configure to turn off this behaviour ???

regards

j0inty

PS: Normally I use the KDE Konqueror Menu to mount/unmount my share to pandora, but I said it only works when I mount/unmount one share as root in old nfs style.

Pandoras Config:

/etc/exports

```

pandora ~ # cat /etc/exports

/exports *(ro,fsid=0,insecure,no_subtree_check,sync)

/exports/j0inty arko(rw,nohide,insecure,no_subtree_check,sync,anonuid=1000,anongid=100)

/exports/movies arko(rw,nohide,insecure,no_subtree_check,sync,anonuid=1000,anongid=100) balou(ro,nohide,insecure,no_subtree_check,sync,anonuid=1009,anongid=100)

```

/etc/conf.d/nfs

```

pandora ~ # cat /etc/conf.d/nfs

OPTS_RPC_NFSD="--no-nfs-version 2,3 --no-udp 8"

OPTS_RPC_MOUNTD="--debug all -p 4002"

OPTS_RPC_STATD="-p 4000"

OPTS_RPC_IDMAPD=""

OPTS_RPC_GSSD=""

OPTS_RPC_SVCGSSD=""

OPTS_RPC_RQUOTAD=""

EXPORTFS_TIMEOUT=30

```

On both machines I have installed nfs-utils:

```

[ebuild   R   ] net-fs/nfs-utils-1.1.2-r1  USE="kerberos tcpd -nonfsv4"

```

----------

## Jointy

Hi,

OK. I THINK I solved it.

The nfs module will not loaded by the mount command for nfs4 when it is needed.

When I modprobe the nfs module before trying to mount the shares, everything works fine.

On nfsv3 shares the module will loaded automtically by the mount command. 

So I will see if it was this error.

regards

j0inty

----------

