Bug 845565 - Disconnected NFS directories cause hang on
Disconnected NFS directories cause hang on
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
17
x86_64 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: nfs-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-03 09:04 EDT by Andrey
Modified: 2012-08-20 15:31 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-08-20 15:31:50 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Andrey 2012-08-03 09:04:24 EDT
Description of problem: I have few mounted directories via NFS. If remote computers disconnected it cause hang on all file system requests to this mounted direcotories and direcories where links to this mounted dirs placed.


How reproducible: every time mounted directory disconnected


Steps to Reproduce:
1. mount some NFS directory
2. unplug network cable from remote PC
3. try to umount mounted dir or ls directory where link to mounted dir placed
  
Actual results:
umonut and ls is hang on


Expected results:
umonunt do nothig/force unmount/return error - anything but not hang on


Additional info:
I've try to use handmade program to umount disconnected directories as some guy recommend in comment at related bugreport here https://bugzilla.redhat.com/show_bug.cgi?id=820707#c2

#include <sys/mount.h>
int main(int argc, char **argv) {
    umount2(argv[1], MNT_FORCE);
    return 0;
}

but umount2() call hang on too.
Comment 1 Jeff Layton 2012-08-20 13:28:27 EDT
(In reply to comment #0)
> Description of problem: I have few mounted directories via NFS. If remote
> computers disconnected it cause hang on all file system requests to this
> mounted direcotories and direcories where links to this mounted dirs placed.
> 
> 
> How reproducible: every time mounted directory disconnected
> 
> 

Can you clarify what you mean by "disconnected"? Do you mean that the server has gone completely unreachable?
Comment 2 Jeff Layton 2012-08-20 15:31:50 EDT
> 
> Steps to Reproduce:
> 1. mount some NFS directory
> 2. unplug network cable from remote PC
> 3. try to umount mounted dir or ls directory where link to mounted dir placed
>   
> Actual results:
> umonut and ls is hang on
> 
>


Ahh, I'm afraid that's expected behavior. When there is an interruption in network connectivity, the client will retry calls to the server indefnitely by default. Anything else can lead to corrupt data. 

You have some options however...

1) you can mount with -o soft, which will cause the client to time out RPCs after a certain amount of time with no response

2) you can attempt to lazily unmount the mount (umount -l). That will disconnect it from the network namespace but will keep it around until there are no more references to it.

Note You need to log in before you can comment on or make changes to this bug.