linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: [NFS] Re: broken umount -f
@ 2003-01-14 15:56 Lever, Charles
  0 siblings, 0 replies; 3+ messages in thread
From: Lever, Charles @ 2003-01-14 15:56 UTC (permalink / raw)
  To: 'Peter Åstrand'; +Cc: nfs, linux-kernel

"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.

> -----Original Message-----
> From: Peter Åstrand [mailto:peter@cendio.se] 
> Sent: Monday, January 13, 2003 4:45 AM
> To: Trond Myklebust
> Cc: nfs@lists.sourceforge.net; linux-kernel@vger.kernel.org
> Subject: [NFS] Re: broken umount -f
> 
> 
> >>For as long as I remember, umount -f has been broken. I got 
> a reminder 
> >>of this fact today when we took an older NFS server out of 
> use. I had 
> >>to reboot almost all machines that had mounts from this server. Not 
> >>nice.
> 
> ...
> 
> > AFAICS It works for me.
> > 
> > Are you using the 'intr' mount option,
> 
> Yes, as often I can. But IMHO, it should be possible to 
> unmount an unreachable NFS fs even if it wasn't mounted with 
> "intr". Otherwise we have a quite silly "sysadmin trap".
> 
> >and are you remembering to kill
> > those processes that are actually using the mount point first?
> 
> One some machines, I killed more or less everything. It 
> didn't help. One some other machines, I couldn't kill so 
> blindly. Remember, both "lsof" and "fuser" hangs.
> 
> Also, as far as I understand, Solaris 8 does not require that 
> you kill all processes before unmounting, if you use the "-f" 
> flag (processes will get EIO). Would it be possible to 
> implement this feature in Linux? That would be really nice.
> 
> Regards, Peter
> 
> 
> >>For as long as I remember, umount -f has been broken. I got 
> a reminder 
> >>of this fact today when we took an older NFS server out of 
> use. I had 
> >>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:
> >>
> >># umount -f /import/applix Cannot MOUNTPROG RPC: RPC: Port mapper 
> >>failure - RPC: Unable to receive umount2: Device or resource busy
> >>umount: /import/applix: device is busy
> >>
> >>lsof and fuser hangs, as do "df" and "du". Really frustrating. It's 
> >>not even possible to cleanly reboot the system, since 
> RedHats shutdown 
> >>scripts wants to unmount NFS fs's.
> >>
> >>I'm not exactly sure I understand what -f is supposed to do. Is it 
> >>correct that it is supposed to unmount without contacting the NFS 
> >>server? I assume that I still have to make sure no 
> processes are using 
> >>the FS? Would it be possible to add a "-9" flag (or something like 
> >>that) that kills off all processes that uses the NFS fs 
> automatically?
> >>
> >>(I'm using all kinds of RedHat Linux versions, from 5.0 up to 7.3. 
> >>From what I can tell, this problems exists in all versions.)
> >>
> 
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.NET email is sponsored by: FREE  SSL Guide from 
> Thawte are you planning your Web Server Security? Click here 
> to get a FREE Thawte SSL guide and find the answers to all 
> your  SSL security issues. 
> http://ads.sourceforge.net/cgi-> bin/redirect.pl?thaw0026en
> 
> 
> _______________________________________________
> NFS maillist  -  NFS@lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/n> fs
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [NFS] Re: broken umount -f
  2003-01-16  9:55 ` Tim Connors
@ 2003-01-16 13:17   ` Trond Myklebust
  0 siblings, 0 replies; 3+ messages in thread
From: Trond Myklebust @ 2003-01-16 13:17 UTC (permalink / raw)
  To: Tim Connors; +Cc: linux-kernel

>>>>> " " == Tim Connors <tconnors@astro.swin.edu.au> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [NFS] Re: broken umount -f
       [not found] <20030114160031$24bb@gated-at.bofh.it>
@ 2003-01-16  9:55 ` Tim Connors
  2003-01-16 13:17   ` Trond Myklebust
  0 siblings, 1 reply; 3+ messages in thread
From: Tim Connors @ 2003-01-16  9:55 UTC (permalink / raw)
  To: linux-kernel

In linux.kernel, you wrote:
>> >>For as long as I remember, umount -f has been broken. I got 
>> a reminder 
>> >>of this fact today when we took an older NFS server out of 
>> use. I had 
>> >>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:
>> >>
> "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.

-- 
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. 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-01-16 13:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-14 15:56 [NFS] Re: broken umount -f Lever, Charles
     [not found] <20030114160031$24bb@gated-at.bofh.it>
2003-01-16  9:55 ` Tim Connors
2003-01-16 13:17   ` Trond Myklebust

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).