Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: shutdown/reboot hangs when nfs has been mounted (Read 4312 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

shutdown/reboot hangs when nfs has been mounted

Hi everyone!  :)

I just switched from OpenRC to suite66 and I encountered a cumbersome problem. When I mount an NFS fstab entry and reboot/shutdown the computer, it hangs (see the picture attached) and I have to force shutdown the system. Conversely, when I don't mount the NFS directory, the shutdown/reboot process runs without difficulties.

Let me just mention that I had the same problem with OpenRC. It could, however, be simply resolved by adding
Code: [Select]
rc_need="!netmount"
to /etc/rc.conf 

My fstab includes:
Code: [Select]
srv:/                   /nfs/srv               nfs4    rw,nofail,noauto,user       0       0

I would appreciate any suggestions on how to solve this problem.

Matt

Re: shutdown/reboot hangs when nfs has been mounted

Reply #1
For testing, edit /etc/66/module/boot@/service/mount/mount-netfs and change the last 66-yeller -f to -F and run 66-enable -t boot -F boot@system as root and see if this helps or not. The -f is for hard fatal and will stop the system, -F is fatal but doesn't crash boot.

Re: shutdown/reboot hangs when nfs has been mounted

Reply #2
I did what you instructed me to but unfortunately it didn't help. It still hangs and I can't even ctrl-alt-del. I hope this can be somehow resolved as I wanted to try out something different than OpenRC which I've been accustomed to. 

Re: shutdown/reboot hangs when nfs has been mounted

Reply #3
Are you using nfs-suite66 package? Also try 66-env -t boot -e $EDITOR boot@system and change MNT_NETFS=!yes to MNT_NETFS=!no (where $EDITOR is something like vim ) as root and also run as root: 66-enable -t boot -F boot@system ; and see if that helps, though it shouldn't cause an effect as it only looks for things like nonfs4 and others to mount

Re: shutdown/reboot hangs when nfs has been mounted

Reply #4
Quote
Are you using nfs-suite66 package?

No I don't. What should I do to configure this init script besides installing nfs-utils-suite66?

Re: shutdown/reboot hangs when nfs has been mounted

Reply #5
No I don't. What should I do to configure this init script besides installing nfs-utils-suite66?
Did you do the 66-env part and 66-enable part of message above?

Re: shutdown/reboot hangs when nfs has been mounted

Reply #6
I will in a minute. I will edit my reply after I run the commands and reboot the system.

EDIT: Unfortunately, running the above commands did not help.

Re: shutdown/reboot hangs when nfs has been mounted

Reply #7
I will in a minute. I will edit my reply after I run the commands and reboot the system.

EDIT: Unfortunately, running the above commands did not help.
Do you have nfs-utils installed?

Re: shutdown/reboot hangs when nfs has been mounted

Reply #8
Yes, I have nfs-utils installed and I just installed nfs-utils-suite66 but I'm a complete newbie to suite66 so I don't know how to set it all up.

EDIT: I can see that nfs-utils-suite66 is for server, not client so I guess I don't need it, right?

Re: shutdown/reboot hangs when nfs has been mounted

Reply #9
Yes, I have nfs-utils installed and I just installed nfs-utils-suite66 but I'm a complete newbie to suite66 so I don't know how to set it all up.

EDIT: I can see that nfs-utils-suite66 is for server, not client so I guess I don't need it, right?
Correct, I don't use NFS. In a vm, I used what you had in fstab and had no issue with startup.  Try with the NFS line commented out and see

Re: shutdown/reboot hangs when nfs has been mounted

Reply #10
I commented out the nfs line in fstab and unmounted the nfs drive. I could reboot without a hang.

Re: shutdown/reboot hangs when nfs has been mounted

Reply #11
That usually means the fstab isn't setup correctly. If it is wrong, then it will hang

Re: shutdown/reboot hangs when nfs has been mounted

Reply #12
Quote
In a vm, I used what you had in fstab and had no issue with startup

You said "startup" but I have a problem with shutdown, not boot. I don't know if we've been on the same page this whole thread :P

EDIT: TBH I don't see anything specific about my nfs setup. I believe other users might experience the same problem. As for the fstab part, the entry seems to be correct because I can mount the nfs share even as a user. 

Re: shutdown/reboot hangs when nfs has been mounted

Reply #13
I added a [stop] part to the mount-fstab script in suite66-scripts-1.7.1.1-1 , currently it in que to build. Once it is built and mirrors syncs, you will get new version. I am unsure this will help or not, but I am hoping it is hanging on fstab part and it will help you.

Re: shutdown/reboot hangs when nfs has been mounted

Reply #14
I added a [stop] part to the mount-fstab script in suite66-scripts-1.7.1.1-1 , currently it in que to build. Once it is built and mirrors syncs, you will get new version. I am unsure this will help or not, but I am hoping it is hanging on fstab part and it will help you.
Thank you. Now I'm thinking maybe the problem is that the network is down before the nfs is unmounted. But this is just my hypothesis...