NFS hangs after upgrade/reboot

I have two raspi running both upgraded right now to DietPi v8.3.1. On both systems an NFS filesystem from a small Qnap NAS storage is mounted. On one system the nfs mounted filesystem is still running fine, on the other it hangs as soon a I try to access files from the NFS server.

root@pi2udhifi:/mnt# cd nfs
root@pi2udhifi:/mnt/nfs# ls
nfs <— works fine
root@pi2udhifi:/mnt/nfs# ls -la <— here it hangs forever…

NFS was initially mounted using the dietpi-drive_manager. The problem is neither solved by a reboot of the nfs server nor of the nfs client.

I tried unsuccessfully to delete and recreate the nfs mount using the dietpi-drive_manager - it hangs as well.
Now I only mount it via:
mount.nfs 192.168.16.32:/ /mnt/nfs nfs nofail

It hangs as the original configuration via dietpi-drive_manager.

Parameters are used from the still working DietPi installation of the other raspi.

Export of the nfs file system is not restricted:
root@pi2udhifi:/mnt/nfs# showmount -e 192.168.16.32
Export list for 192.168.16.32:
/nfs *

Network connection is established:
root@pi2udhifi:/mnt/nfs# netstat -nt
Aktive Internetverbindungen (ohne Server)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 192.168.16.10:60508 192.168.16.1:49000 TIME_WAIT
tcp 0 0 192.168.16.10:60518 192.168.16.1:49000 TIME_WAIT

tcp 0 0 192.168.16.10:924 192.168.16.32:2049 VERBUNDEN



I can’t find the reason for this problem and ask for advice.
Thanks

How long did you wait? Because I also experienced some looong wait time here and then with dietpi-drive_manager, esp after not rebooting correctly (I just switched power off and on again). It took around 2 minutes or so to show me something, but after this one longer time it was gone, until I did the power switch thing again ,:wink:

Can you share your /etc/fstab

It looks the same as one the other raspi, which is working:

root@pi3udnc:~# cat /etc/fstab
# You can use "dietpi-drive_manager" to setup mounts.
# NB: It overwrites and re-creates physical drive mount entries on use.
#----------------------------------------------------------------
# NETWORK
#----------------------------------------------------------------
192.168.16.32:/ /mnt/nfs nfs nofail

#----------------------------------------------------------------
# TMPFS
#----------------------------------------------------------------
tmpfs /tmp tmpfs defaults,size=1023M,noatime,nodev,nosuid,mode=1777 0 0
tmpfs /var/log tmpfs defaults,size=50m,noatime,nodev,nosuid,mode=1777 0 0

#----------------------------------------------------------------
# MISC: ecryptfs, vboxsf (VirtualBox shared folder), gluster, bind mounts
#----------------------------------------------------------------


#----------------------------------------------------------------
# SWAP SPACE
#----------------------------------------------------------------
/var/swap none swap sw 0 0

#----------------------------------------------------------------
# PHYSICAL DRIVES
#----------------------------------------------------------------
PARTUUID=cb7b86f7-02 / ext4 noatime,lazytime,rw 0 1
PARTUUID=cb7b86f7-01 /boot vfat noatime,lazytime,rw 0 2
root@pi3udnc:~#

After my try to recreate it the NETWORK part is emty as expected. Therefore I can only reproduce the behavior via the mount.nfs command above.

The entry seems to be incorrect as you did not specify the /nfs folder of the NFS export as stated by showmount

root@pi2udhifi:/mnt/nfs# showmount -e 192.168.16.32
Export list for 192.168.16.32:
/nfs *

Your fstab entry looks like this

#----------------------------------------------------------------
# NETWORK
#----------------------------------------------------------------
192.168.16.32:/ /mnt/nfs nfs nofail

Was it created by drive manager? Usually it should looks differently if I’m not mistaken. Can you try to remove the entry and do a reboot. Afterwards go to drive manager any try to mount the NFS share again.

The fstab was generated by the dietpi-drive_manager and it worked fine before upgrade/reboot.
As I stated in the begining, I have two raspi systems using the same nfs mount to the same nfs server. One is working with respect to nfs the other not.

I checked for long answer time:

root@pi2udhifi:~#  ls -la /mnt/nfs/nfs
^C    <---- I interrupted after 10 min !!!!

Additional infos:

root@pi2udhifi:~# nfsstat -m
/mnt/nfs from 192.168.16.32:/
 Flags: rw,relatime,vers=4.2,rsize=262144,wsize=262144,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=192.168.16.10,local_lock=none,addr=192.168.16.32



root@pi2udhifi:~# df -h
Dateisystem     Größe Benutzt Verf. Verw% Eingehängt auf
/dev/root         60G    7,8G   50G   14% /
devtmpfs         430M       0  430M    0% /dev
tmpfs            462M       0  462M    0% /dev/shm
tmpfs            185M    2,9M  182M    2% /run
tmpfs            5,0M    8,0K  5,0M    1% /run/lock
tmpfs            1,0G    8,0K  1,0G    1% /tmp
tmpfs             50M    124K   50M    1% /var/log
/dev/mmcblk0p1   127M     52M   75M   41% /boot
tmpfs             93M    8,0K   93M    1% /run/user/0
tmpfs             93M     12K   93M    1% /run/user/1000
192.168.16.32:/   16M       0   16M    0% /mnt/nfs

The last entry shows, that the mount to root works somehow and the connection is established, but not to the exported directory ‘nfs’

On the working system it looks like this:

root@pi3udnc:~# df -h
Dateisystem        Größe Benutzt Verf. Verw% Eingehängt auf
/dev/root            29G     11G   18G   38% /
devtmpfs            404M       0  404M    0% /dev
tmpfs               436M       0  436M    0% /dev/shm
tmpfs               175M     18M  157M   11% /run
tmpfs               5,0M       0  5,0M    0% /run/lock
tmpfs              1023M       0 1023M    0% /tmp
tmpfs                50M    128K   50M    1% /var/log
/dev/mmcblk0p1      253M     50M  203M   20% /boot
192.168.16.32:/      16M       0   16M    0% /mnt/nfs
192.168.16.32:/nfs   64G     16G   48G   25% /mnt/nfs/nfs

still my request

  1. remove the old entry from /etc/fstab
  2. reboot your system
  3. update DietPi to latest version 8.3
  4. use drive manager to mount your NFS share again

done → remove the old entry from /etc/fstab
done → reboot your system
allready done, problem started after update to DietPi 8.3.1 → update DietPi to latest version 8.3
started → use drive manager to mount your NFS share again


[ INFO ] DietPi-Drive_Manager | Checking for required APT packages: nfs-common netbase
[  OK  ] DietPi-Drive_Manager | Desired setting in /boot/dietpi/.installed was already set: aSOFTWARE_INSTALL_STATE[110]=2
[  OK  ] DietPi-Drive_Manager | rmdir --ignore-fail-on-non-empty /mnt/nfs_client
[ INFO ] DietPi-Drive_Manager | Scanning for NFS exports by: 192.168.16.32
 NB: If the server cannot be reached correctly, this may take up to 90 seconds before it times out.
[  OK  ] DietPi-Drive_Manager | mkdir /mnt/nfs
^C
root@pi2udhifi:~#

drive manager hangs, interrupted after 10 min

did it show a dialog to select an available NFS export?

Yes

Please select the NFS export of 192.168.16.32 from the list below:                                         │
│                                                                                                                      │
│                                     /nfs                                                                           │
│                                     Custom : Enter custom NFS server share path              │
│                                                                                                                      │
│                                                                                                                      │
│                                  <Ok>                                      <Cancel>

you selected /nfs or used the Custom option?

I selected /nfs

was there already something added to /etc/fstab?

can you share again df -h

root@pi2udhifi:~# df -h
Dateisystem    Größe Benutzt Verf. Verw% Eingehängt auf
/dev/root        60G    7,8G   50G   14% /
devtmpfs        430M       0  430M    0% /dev
tmpfs           462M       0  462M    0% /dev/shm
tmpfs           185M    2,9M  182M    2% /run
tmpfs           5,0M    8,0K  5,0M    1% /run/lock
tmpfs           1,0G    8,0K  1,0G    1% /tmp
tmpfs            50M       0   50M    0% /var/log
/dev/mmcblk0p1  127M     52M   75M   41% /boot
tmpfs            93M    8,0K   93M    1% /run/user/0
tmpfs            93M     12K   93M    1% /run/user/1000



root@pi2udhifi:~# cat /etc/fstab
# You can use "dietpi-drive_manager" to setup mounts.
# NB: It overwrites and re-creates physical drive mount entries on use.
#----------------------------------------------------------------
# NETWORK
#----------------------------------------------------------------


#----------------------------------------------------------------
# TMPFS
#----------------------------------------------------------------
tmpfs /tmp tmpfs size=1024M,noatime,lazytime,nodev,nosuid,mode=1777
tmpfs /var/log tmpfs size=50M,noatime,lazytime,nodev,nosuid,mode=1777

#----------------------------------------------------------------
# MISC: ecryptfs, vboxsf, glusterfs, bind, Btrfs subvolume mounts
#----------------------------------------------------------------


#----------------------------------------------------------------
# SWAP SPACE
#----------------------------------------------------------------
/var/swap none swap sw

#----------------------------------------------------------------
# PHYSICAL DRIVES
#----------------------------------------------------------------
PARTUUID=80ee19d2-02 / ext4 noatime,lazytime,rw 0 1
PARTUUID=80ee19d2-01 /boot vfat noatime,lazytime,rw 0 2
root@pi2udhifi:~#

Is the following working?

mkdir -p /mnt/nfs/
mount -t nfs 192.168.16.32:/nfs /mnt/nfs/

root@pi2udhifi:~# mkdir -p /mnt/nfs/
root@pi2udhifi:~# mount -t nfs 192.168.16.32:/nfs /mnt/nfs/
^C
root@pi2udhifi:~# mount -t nfs -o soft 192.168.16.32:/nfs /mnt/nfs/
^C
root@pi2udhifi:~#

The mount comand hangs…

What kind of diagnostics can be done to find the root cause?

does it make a difference you try to specify NFS version? Maybe you can check on the NFS server side which version are supported.

mount -t nfs -o nfsvers=3 192.168.16.32:/nfs /mnt/nfs/
mount -t nfs -o nfsvers=4 192.168.16.32:/nfs /mnt/nfs/

On the server side version 4.2 is used and I want to keep it this way. As mentioned the combination DietPi V8.3.1 and the server running with version 4.2 works successfully on my second system.
Meanwhile I have switched to full logging in DietPi, but in there is only the successful mount reported in the syslog file.

rpcdebug seems not to work for ARM systems:
root@pi2udhifi:~# rpcdebug -m nfs -s all
/proc/sys/sunrpc/nfs_debug: No such file or directory
root@pi2udhifi:~#

So I wonder what diagnostics can be taken…

I’m having this problem as well for the last two weeks, I’m keep doing new install and hope for a different outcome but same on all. Can I ask is your NAS and Pi are local?