Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem with shutdown with mounted NFS shares

 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help!
View previous topic :: View next topic  
Author Message
paulm
LXF regular


Joined: Mon Apr 03, 2006 5:53 am
Posts: 242
Location: Oxfordshire, UK

PostPosted: Mon Jan 28, 2013 10:14 pm    Post subject: Problem with shutdown with mounted NFS shares Reply with quote

I have two devices on my network that provide NFS shares. One is an Icy Box NAS4402-B (running a current version of OpenWrt), the other a home-brew sever running SMS. Both provide NFS4 mounts.

I've got multiple Linux distros installed on my laptop. I mainly use Arch, but have both SalineOS and Salix available as well.

When running Arch, I must unmount the NFS shares before shutting the laptop down. If I fail to do so (happens quite often, since I tend to forget that they're mounted), the laptop will not shut down, it simply hangs at the start of the shutdown. Sometimes I can break out of the hang using CTRL-C, but more often than not, I have to use the power switch.

I suspect that I've not got something correctly set up in systemd (which is now default init for Arch), but I'm having trouble confirming it. What makes me suspicious is if I manually unmount the shares before attempting to shutdown there is no problem. I tried adding the unmount commands to /etc/rc.local.shutdown, but that hasn't helped. It looks as if the hang occurs before rc.local.shutdown is executed, since I get errors from the commands if the shares are not mounted when I shut down, but don't see any sign of the system getting that far if the shares are mounted.

I've tried changing the export commands on both NFS severs, but haven't seen any change. I could try 'soft' mount, but I'm wary of the potential data corruption.

Does anyone have any idea how I could go about tracking down what is holding the shares open and preventing the shutdown, or does anyone know enough about systemd to know what should be used setting it up for NFS?

I've tried asking questions in the Arch forum and mailing lists, but so far have only got a couple of people reporting similar problems, no suggested solutions..... I should also note that the problem only occurs under Arch - both SalineOS and Salix will shutdown cleanly without manually unmounting the NFS shares prior to shutting the system down.

Paul.


Paul.
Back to top
View user's profile Send private message
nelz
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 8373
Location: Warrington, UK

PostPosted: Mon Jan 28, 2013 11:36 pm    Post subject: Reply with quote

This can happen if the network connection is dropped before the shares are unmounted. Unmounting a dead NFS share can hang forever. What is handling your network? If it is NetworkManager, you may be dropping the connection when you exit the desktop.
_________________
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
Back to top
View user's profile Send private message
paulm
LXF regular


Joined: Mon Apr 03, 2006 5:53 am
Posts: 242
Location: Oxfordshire, UK

PostPosted: Tue Jan 29, 2013 11:04 pm    Post subject: Reply with quote

nelz wrote:
This can happen if the network connection is dropped before the shares are unmounted. Unmounting a dead NFS share can hang forever. What is handling your network? If it is NetworkManager, you may be dropping the connection when you exit the desktop.


Thanks for the suggestion, Nelz. Could well be the cause - I am currently using NetworkManager. I'm not all that fond of it and had been thinking of removing it and replacing it with Wcid. From memory, I think that Wcid leaves the connection active when the desktop is closed. Otherwise I can try manually and see if that makes a difference.

Paul.
Back to top
View user's profile Send private message
nelz
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 8373
Location: Warrington, UK

PostPosted: Tue Jan 29, 2013 11:49 pm    Post subject: Reply with quote

It's wicd, and it does leave the connection up until the daemon shuts down.
_________________
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
Back to top
View user's profile Send private message
paulm
LXF regular


Joined: Mon Apr 03, 2006 5:53 am
Posts: 242
Location: Oxfordshire, UK

PostPosted: Thu Jan 31, 2013 11:21 pm    Post subject: Reply with quote

nelz wrote:
It's wicd, and it does leave the connection up until the daemon shuts down.


Embarassed When I previewed my message I noticed I'd got a bit dyslectic spelling one instance of wicd. So I corrected the wrong one.....

Looks promising though. I've not had time to test it properly yet, but a couple of quick tries with wicd instead of NetworkManager have resulted in a clean shutdown.

Smile Must admit, I prefer wicd anyway. A few months ago I had all sorts of problems losing connection to my T-Mobile pointer, all solved by dumping NetworkManager and putting wicd in its place (on SalineOS in that instance).

Paul.
Back to top
View user's profile Send private message
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help! All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast