LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   nautilus or thunar freeze when nfs mount not available (http://www.linuxquestions.org/questions/linux-software-2/nautilus-or-thunar-freeze-when-nfs-mount-not-available-694062/)

nephish 12-31-2008 08:57 AM

nautilus or thunar freeze when nfs mount not available
 
Hey all,
I am having a problem with some of my file system mounts.
Here is what happens.
i have a main computer with a folder /mnt/shared

in my exports file i give everyone on the LAN permission to read, etc..
on the client computers, i have the line in fstab that looks like
Code:

192.168.1.2:/mnt/shared /mnt/shared nfs defaults 0 0
it all works fine, however, if the main computer is shut off, the client computers have thunar or nautilus (whichever they use) will hang untill either a restart or remount of the share.

What can i do to the client computers that will make them just go on with life if the 192.168.1.2 computer is not available?

thanks

David1357 12-31-2008 10:42 AM

Quote:

Originally Posted by nephish (Post 3392615)
What can i do to the client computers that will make them just go on with life if the 192.168.1.2 computer is not available?

Write a shell script that pings the 192.168.1.2 once per second. If it does not respond, unmount the NFS share. If it does respond, re-mount the share.

nephish 12-31-2008 11:42 AM

sounds like a good plan, thanks

i92guboj 12-31-2008 12:07 PM

David1357, that can cause some problems in unreliable connections. Note that unmounting an NFS volume can hang for a long time (minutes) if the volume is not reachable. In my experience, these problems arise even if you mount it with async,soft,intr.

nephish, this is a known problem with NFS. I would also be interested in an alternative. Seeing how linux has a network architecture tightly tied into its roots it's hard to believe that NFS is such an horrid thing. Personally I use it only when strictly necessary. Most times I preffer sshfs over it, but some times it's not suitable for the task.

ps. Everything I said here is applicable to v3. I never tried NFS v4.

David1357 12-31-2008 12:35 PM

Quote:

Originally Posted by i92guboj (Post 3392750)
David1357, that can cause some problems in unreliable connections.

If the connection is so unreliable that ICMP cannot get around, then it is unlikely that NFS is going to be working.

nephish 12-31-2008 03:25 PM

well, i had wanted to use nfs and the prior suggestion, just not doing it every second, maybe 1/minute. And yeah, it is because of the somewhat flakyness.

I have been using samba, which i like bacause my mac can see it, but still would much rather use something that should be very ingrained into the linux world. I am wanting to write a pet project program that involves an almost virtual, psudo filesystem using existing technologies.

Thanks for the tips, and yes, if i find a better answer, i will post it here.

David1357 12-31-2008 04:13 PM

Quote:

Originally Posted by nephish (Post 3392884)
I have been using samba, which i like because my mac can see it, but still would much rather use something that should be very ingrained into the linux world.

If it is any consolation, I think most people end up using samba because it can be accessed by non-Linux operating systems. I have been using samba to share files on Linux machines since 2002 and I have never had any problems.


All times are GMT -5. The time now is 04:56 AM.