8

I use NFS to share media to all my files on my network. However in 10.10 when the share is mounted my machines cannot shutdown, they seem to sit there. When I don't mount the NFS shares the machines shut down normally. Here are the relevant contents of my /etc/fstab.

 192.168.1.115:/home/jorge /home/jorge/Stuff nfs rw,hard,intr,fsc

I am currently using cachefilesd to cache my NFS shares, however I get the same problem with or without it. The server is always running and serving the shares.

How can I debug where the problem is? It seems I can only shutdown by power cycling the boxes.

1
  • i keep coming back to look at this and see if you updated... there's a bounty sitting on this... and i realize... this is not a question. maybe if it were someone could claim the bounty?
    – nathwill
    Oct 21, 2010 at 22:49

3 Answers 3

5

Is your NFS server still up when you shut down your machine? If so, that seems to be a bug in the shutdown ordering in 10.10; the network interface must still be up in order to unmount NFS.

I don't use 10.10 yet, so I can't confirm whether that's the case. But as a stopgap, you might try doing a soft mount instead of a hard one. Soft mounts allow the NFS requests to time out. But you'd better be sure to sync very fully before you shut down!

2
  • 1
    Months later and I was finally able to test this; switching from hard to soft fixed this, thanks! Feb 21, 2011 at 21:19
  • For exemple, edit /etc/fstab : 192.168.1.xxServer:/SharedFolderServer /MountedClient nfs user,noauto,soft 0 0 Jun 11, 2017 at 8:58
3

heh. self-promotion disclaimer, but i actually recently wrote a bash script i think can help you with this scenario. the bash script goes in /etc/NetworkManager/dispatcher.d/ and solves a couple of quirks i found with NFS, particularly around the boot-up/shut-down issues.

http://www.badgerbait.net/offtopic/network-specific-event-triggered-bash-script

the script mounts/unmounts the network share (really it'll do whatever you want to do at network connect/disconnect), but it's network specific (this way there's no attempt to mount/unmount if the resource isn't available) .you'll need to query arp tables for your routers mac, or just look at the routers stickers.

the other tip for using this if you decide to implement it, is to make sure that you add noauto to your fstab, so that it's not automatically mounted during bootup/shutdown...

adding the noauto to fstab and then just manually mounting/unmounting the drive as needed is another potential quick-fix for this

fyi: i am dogfooding, and have had zero issues w/ this approach. if you decide to adopt and encounter issues, please let me know.

2
  • of course! i like the functionality, and will eventually set it up so that if i'm not at home it will still mount the home nfs share, but over sshfs instead :) go go gadget linux!
    – nathwill
    Oct 14, 2010 at 3:28
  • 1
    The link is dead... Feb 26, 2020 at 22:16
0

I had the same problem with nfs mounted drives preventing me from shutting down. I was able to use the Magic SysRq command Alt+SysRq+R+S+E+I+U+O to shut down. You can get more info about the Magic SysRq from this Ubuntu forums thread.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .