LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Should suspend dismount nfs mounts? (https://www.linuxquestions.org/questions/linux-general-1/should-suspend-dismount-nfs-mounts-4175480623/)

taylorkh 10-13-2013 01:00 PM

Should suspend dismount nfs mounts?
 
My desktop PC is running CentOS 6 and my server is running Ubuntu server 12.04. Yes that might be backwards but an issue with video limitations in Ubuntu 12.04 caused the migration to CentOS. That said... the server is used simply as a LARGE (6.5 TB) dumping ground for backup files etc. I connect to it with nfs as 1) nfs provides a much faster transfer than ssh and 2) the machines are on a private network and the server is only powered on occasionally so I am not too worried about the (in)security issues of nfs.

Recently I have been running some jobs on the server which cause it to be left up for more time than usual. I have noticed that when I suspend the desktop and then resume it the nfs mounts are no longer mounted. Is this to be expected?

When I was running Ubuntu server 10.04 I do not remember this happening although I may or may not have suspended the desktop while I had nfs mounts set. 10.04 was running an older version of the nfs server. The problem I had then was that if I shut down the server before unmounting the nfs mounts I had all sorts of issues with gnome-commander and Nautilus on the desktop. It was just about impossible to kill an nfs mount unless I brought the server back up and did a umount.

I would appreciate any insight and education which you folks might provide me.

TIA,

Ken

lleb 10-13-2013 07:32 PM

how do you have NFS shares mounted? also are you hardwired or wifi on your connections.

taylorkh 10-13-2013 07:57 PM

The connections are hard wired. Mounting is done with a script thusly:
Quote:

sudo mount taylor10:/data0 /t10/data0
sudo mount taylor10:/data1 /t10/data1
sudo mount taylor10:/data2 /t10/data2
sudo mount taylor10:/data3 /t10/data3
sudo mount taylor10:/data4 /t10/data4
Ken

lleb 10-14-2013 10:20 AM

drop that script and setup autofs, your problems will go away. the biggest advantage of autofs is that your mounts will only be mounted upon user access. so if they get disconnected when your system goes to sleep/suspend, when you access them again after waking the system up they will automatically reconnect without hanging the system or the server.

taylorkh 10-14-2013 10:37 AM

Thanks lleb.

I will look into autofs. As long as there is not a problem when the server is not on-line (most of the time) it sounds like a great solution.

Thanks again!

Ken

lleb 10-15-2013 08:00 PM

thats the best part about autofs. if the server is not online just have a bg option (back ground) and the client will quietly try to mount, if it can not it will not hang the system.

taylorkh 10-18-2013 09:15 AM

Thanks again lleb,

I determined that autofs was installed and with a little research I setup my configuration files. With the server running I can access my nfs mounts as if by magic. No need to run my script first :D If the server is off line and I attempt to access the parent directory of the mounts in Nautilus I get a blank display as if the mount names are not there. I can navigate to somewhere else as Nautilus is still responsive. :D On the other hand with gnome-commander if I click on the parent folder gnome-commander goes off into la la land and I eventually need to force quit. :cry: Well two out of three ain't bad !

Again my sincere thanks.

Ken

lleb 10-18-2013 03:57 PM

glad its working for you. im looking forward to learning its replacement tool. sadly ive forgotten what its called as ive not messed with it enough. it will be more important with RHEL 7 specifically when paired with Fedora 19 and newer.


All times are GMT -5. The time now is 02:59 AM.