NFS mount fails at reboot Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
jonyskids
Posts: 13
Joined: Thu Nov 16, 2017 3:21 pm

NFS mount fails at reboot

Post by jonyskids »

I have an NFS mount that fails at reboot. If I refresh the Dietpi-drive_manager shows right up.

Newbie, any help is appreciated.
User avatar
Joulinar
Posts: 2064
Joined: Sat Nov 16, 2019 12:49 am

Re: NFS mount fails at reboot

Post by Joulinar »

what do you mean by "fails at reboot"?? Usually mounts are executed only if you access to folder first time. Means, after reboot the mount is not there. But as soon you enter the folder, it should be remounted.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
jonyskids
Posts: 13
Joined: Thu Nov 16, 2017 3:21 pm

Re: NFS mount fails at reboot

Post by jonyskids »

When booting it says [FAILED], (in red), Failed to mount..the NFS mount
User avatar
Joulinar
Posts: 2064
Joined: Sat Nov 16, 2019 12:49 am

Re: NFS mount fails at reboot

Post by Joulinar »

did you tried to access the file system after system was booted?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
jonyskids
Posts: 13
Joined: Thu Nov 16, 2017 3:21 pm

Re: NFS mount fails at reboot

Post by jonyskids »

Yes. I have tried

I can only get there if I go into Dietpi_Drive_Manager and do a refresh.
User avatar
Joulinar
Posts: 2064
Joined: Sat Nov 16, 2019 12:49 am

Re: NFS mount fails at reboot

Post by Joulinar »

pls can you have a look into journalctl for available error messages.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
jonyskids
Posts: 13
Joined: Thu Nov 16, 2017 3:21 pm

Re: NFS mount fails at reboot

Post by jonyskids »

Not sure how much to post?

Mar 23 17:33:44 SkidsPi systemd[1]: mnt-nfs_SkidsBook.mount: Mount proce
ss exited, code=exited status=32
Mar 23 17:33:44 SkidsPi systemd[1]: Failed to mount /mnt/nfs_SkidsBook.

Mar 23 17:33:44 SkidsPi systemd[1]: mnt-nfs_SkidsBook.mount: Unit entere
d failed state.
User avatar
Joulinar
Posts: 2064
Joined: Sat Nov 16, 2019 12:49 am

Re: NFS mount fails at reboot

Post by Joulinar »

hmm honestly I'm wondering why you system is trying to mount the share during boot. Usually this should not happen and the mount should be executed only if you try to access the share. Can you check if the mount is executed before or after an IP address was assigned?

pls can you past as well content of /etc/fstab/
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
jonyskids
Posts: 13
Joined: Thu Nov 16, 2017 3:21 pm

Re: NFS mount fails at reboot

Post by jonyskids »

It tries to mount post trying and then connecting to my VPN via openvpn.




# Please use "dietpi-drive_manager" to setup mounts
#----------------------------------------------------------------
# NETWORK
#----------------------------------------------------------------
192.168.2.2:/nfs/Public /mnt/nfs_SkidsBook nfs auto,_netdev,nofail 0 0

#----------------------------------------------------------------
# TMPFS
#----------------------------------------------------------------
tmpfs /tmp tmpfs defaults,size=1023M,noatime,nodev,nosuid,mode=1777 0 0
tmpfs /DietPi tmpfs defaults,size=10m,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), bind mounts
#----------------------------------------------------------------


#----------------------------------------------------------------
# SWAPFILE
#----------------------------------------------------------------
/var/swap none swap sw 0 0

#----------------------------------------------------------------
# PHYSICAL DRIVES
#----------------------------------------------------------------
PARTUUID=27504eef-02 / ext4 noatime,lazytime,rw 0 1
PARTUUID=27504eef-01 /boot vfat noatime,lazytime,rw 0 2
UUID=64dce9c8-bb04-4c78-9d5b-2abb52e1a5ab /mnt/64dce9c8-bb04-4c78-9d5b-2abb52e1a5ab ext4 noatime,lazytime,rw,nofail,noauto,x-systemd.automount
User avatar
Joulinar
Posts: 2064
Joined: Sat Nov 16, 2019 12:49 am

Re: NFS mount fails at reboot

Post by Joulinar »

ok I setup a small test environment with NFS Server and Client. Looks like the NFS mount is done before the network interface is online. Therefore the mount failed. I found a small workaround to have it fixed. for this you would need to adjust /etc/fstab and replace your network mount with the following line

Code: Select all

192.168.2.2:/nfs/Public /mnt/nfs_SkidsBook nfs _netdev,nofail,noauto,x-systemd.automount 0 0
Now your system will not go to mount the NFS share during boot anymore. This only will happen as soon as someone is trying to access the share.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply