NFS: Network disconnect causes Gnome Nautilus to hang / Jumping progress bars

5

2

I mount NFSv4 export via /etc/fstab and mount and use the shared folder in nautilus.

There are two issues:

  • When I copy a large file (around 4 GB) to the NFS server, the progress bar rapidly goes to 2 GB and then basically stops moving. But the copy s still in progress - it is just not displayed well
  • When I disconnect from the network without unmounting the nfs share, nautilus freezes.

How can I work around that?

/etc/export on the server

/export/share   192.168.0.0/24(rw,sync,insecure,no_subtree_check,anonuid=1000,anongid=1000)

/etc/fstab on the client:

server:/share   /mnt    nfs4    soft,tcp

Alex

Posted 2012-12-06T13:20:36.413

Reputation: 1 067

Answers

1

I also have the first problem reported, but no answer for it. The copy also tends to lock up other parts of the system (perhaps due to Nautilus' ubiquity as a GNOME service) while the copy goes on.

On the second point, I found this SO question very useful: https://stackoverflow.com/q/40317/91808. In particular the umount -f /mnt/nfs suggestion worked for me when nothing else did, saving me from an irritating reboot.

andybuckley

Posted 2012-12-06T13:20:36.413

Reputation: 141

0

I would use automount. It mounts/unmounts the share automatically when it is accessed/not accessed. I don't think it will affect the progress bar problem but it should fix the freezes.

Have a look at my answer here (specifically, steps 5-7) for more information on how to set it up.


UPDATE

I found that the file manager will hang if the shared volumes are linked to (or directly mounted) in my home directory. By placing links to my mountpoints in a sub directory of $HOME I had no more freezes.

The problem is that autofs will mount the share each time it is accessed, that includes ls. So, every time you open nautilus and you have the mount linked to or mounted in your $HOME, it tries to mount it and hangs.

So, my current (hang-free) settings are:

  1. NFS share mounted at /mnt/shared/movies
  2. It is linked to in a sub directory of my $HOME:

    $ ls $HOME | grep shared
    shared
    $ ls -l $HOME/shared
    lrwxrwxrwx 1 terdon terdon 20 Feb 15  2012 movies -> /mnt/shared/movies
    

This way, the volume will only be mounted if I do an ls $HOME/shared and not a simple ls $HOME.

Finally, make sure you are using the -soft option.

terdon

Posted 2012-12-06T13:20:36.413

Reputation: 45 216

1Nope, not working here. I managed to configure autofs and it automatically mounted the share, but if I disconnect the network. Nothing is unmounted and if I click on a file in the share, nautilus freezes. – Alex – 2012-12-07T15:55:43.837

@Alex, see updated answer. – terdon – 2012-12-07T16:12:32.090

I am having the soft option in the /etc/auto.server file and my share is not mounted to $HOME - it is mounted in /mnt. Still, when I have the share open and disconnect, everything hangs. – Alex – 2012-12-07T17:27:10.407

@Alex and it is not linked to anywhere else? – terdon – 2012-12-07T17:40:44.567

No it is not - mount shows only this one connection managed by autofs – Alex – 2012-12-07T18:23:49.337

@Alex I know, I am asking whether you are linking the mount to anywhere in your $HOME using ln -s or similar. If not, I have no idea why you are having problems, I used to have the same issue and fixed it as I describe in my answer. – terdon – 2012-12-07T18:38:51.777

1nope I do not link it anywhere else. – Alex – 2012-12-13T14:51:34.907

@Alex, Even with my solution nautilus will freeze when you click on a share that is no longer available. Clicking on it will cause the automount daemon to attempt to mount it and nautilus will wait for a response. When using automount, you avoid having nautilus free even without clicking on any share of the mount which is what happens when not using automount. – terdon – 2012-12-13T14:56:17.680