Skip to contentSkip to conversation

broken umount -f

NFS Tim Connors 2 participants 2 messages Jan 16, 2003 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 9 lines · you
Quoted 9 lines
Quoted 1 line
Quoted 1 line

For as long as I remember, umount -f has been broken. I got

a reminder

Quoted 1 line
Quoted 1 line

of this fact today when we took an older NFS server out of

use. I had

Quoted 5 lines
Quoted 5 lines

to reboot almost all machines that had mounts from this server. Not nice.

Anyone knows why -f does not work? When I try, I get:

Quoted 7 lines

"umount -f" doesn't end pending RPCs. if there are processes with pending RPCs, then they are stuck and you will have to reboot. "intr" may allow some of these processes to be killed before trying the "umount."

however, if there are no outstanding RPCs on the client, but the server is not available, umount -f works as advertised.

What I have never understood, is that if you are reading a file, or even just in a directory, and the server goes down, and won't come back up (say, you have taken your laptop into work, and forgot to turn off autofs first, after killing all shells that had cd'd to the nfs directory), then you still are destined to have to reboot. You could sever all connections to the nfs server safely, because nothing is being written there (except maybe atime information - but not in the case of a shell being cd'd to an nfs path). But linux won't give up on the connection. Come on, what harm could possibly come to an application that has only readonly files open, or cwd in an NFS path? No data loss would occur in this situation, so just drop the connection, and return -EIO to anything that then later wants to read a file.

If the admin is wanting to use umount -f, then surely he will be edumucated enough to make sure data loss will not occur first, or that the consequences are less than if he just left the mount hang.

Signature · 7 lines
TimC -- http://astronomy.swin.edu.au/staff/tconnors/

You see, wire telegraph is a kind of a very, very long cat. You pull
his tail in New York and his head is meowing in Los Angeles.  Do you
understand this?  And radio operates exactly the same way:  you send
signals here,  they receive them there.  The only difference is that
there is no cat.   -- Albie E. on radios. 
#2 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

" " == Tim Connors <[email protected]> writes:

> What I have never understood, is that if you are reading a > file, or even just in a directory, and the server goes down, > and won't come back up (say, you have taken your laptop into > work, and forgot to turn off autofs first, after killing all > shells that had cd'd to the nfs directory), then you still are > destined to have to reboot. You could sever all connections to > the nfs server safely, because nothing is being written there > (except maybe atime information - but not in the case of a > shell being cd'd to an nfs path). But linux won't give up on > the connection. Come on, what harm could possibly come to an > application that has only readonly files open, or cwd in an NFS > path? No data loss would occur in this situation, so just drop > the connection, and return -EIO to anything that then later > wants to read a file.

Care to contribute the code?

Cheers,
Trond