2012-11-01 13:36:04

by dahai_tian

[permalink] [raw]
Subject: hang problem when umount a nfs point

Hi all:
I mount a local directory to a nfs server. When nfs server is
stopped
for some accidental cause, I try to umount the mount point, the umount
command will hang and 'time out' messages are continually printed in the
terminal. How can I avoid hanging in this case? BTW, This issue does not
exist when I changed nfs version from 4 to 3.
Look forward to your response, thanks!



2012-11-08 12:27:45

by J. Bruce Fields

[permalink] [raw]
Subject: Re: hang problem when umount a nfs point

On Thu, Nov 08, 2012 at 11:03:22AM +0800, Jack Wang wrote:
> 2012/11/8 J. Bruce Fields <[email protected]>:
> > On Wed, Nov 07, 2012 at 09:05:51AM +0800, Jack Wang wrote:
> >> 2012/11/7 Martín Cigorraga <[email protected]>:
> >> > On Mon, Nov 5, 2012 at 10:27 PM, Jack Wang <[email protected]>
> >> > wrote:
> >> >>
> >> >> Hi all,
> >> >>
> >> >> Anyone who can kindly give some suggestion? or we just put question to
> >> >> the wrong list?
> >> >>
> >> >> Thanks.
> >> >>
> >> >> Jack
> >> >>
> >> >> 2012/11/1 dahai_tian <[email protected]>:
> >> >> > Hi all:
> >> >> > I mount a local directory to a nfs server. When nfs server is
> >> >> > stopped
> >> >> > for some accidental cause, I try to umount the mount point, the umount
> >> >> > command will hang and 'time out' messages are continually printed in the
> >> >> > terminal. How can I avoid hanging in this case? BTW, This issue does not
> >> >> > exist when I changed nfs version from 4 to 3.
> >> >> > Look forward to your response, thanks!
> >>
> >> >
> >> > Hi Jack, use the -l (lazy) switch:
> >> > # umount -l {your mounted nfs share}
> >> >
> >> > Also, I wouldn't recommend 'just to kill' the NFS proces(ses) as it (them)
> >> > may leave shared memory a mess.
> >> > (And I would like to see how do you make to mount any NFS share again
> >> > without booting)
> >>
> >> Thanks Martin for kindly help.
> >>
> >> umount -l did work, but why nfsv3 do not have this problem?
> >
> > I don't know what it is exactly. But in general I wouldn't expect
> > umount to work when the server's unavailable.
> >
> > --b.
>
> Thanks for your time Bruce, but there are chance the server
> unavailable , why you think umount don't work is expected?

It's tough for the client to deal safely with an unreachable server.
Worst case it may still have data in its buffers that applications have
written but that hasn't yet made it to the server.

If you don't have any opens or other state on the filesystem any more,
there might be things that could be done to make it easier to umount in
that case--I haven't thought it through--but I doubt that's a high
priority, so it's likely up to you to write the code and persuade people
it's worthwhile.

--b.

2012-11-06 01:27:49

by Jack Wang

[permalink] [raw]
Subject: Re: hang problem when umount a nfs point

Hi all,

Anyone who can kindly give some suggestion? or we just put question to
the wrong list?

Thanks.

Jack

2012/11/1 dahai_tian <[email protected]>:
> Hi all:
> I mount a local directory to a nfs server. When nfs server is
> stopped
> for some accidental cause, I try to umount the mount point, the umount
> command will hang and 'time out' messages are continually printed in the
> terminal. How can I avoid hanging in this case? BTW, This issue does not
> exist when I changed nfs version from 4 to 3.
> Look forward to your response, thanks!
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html

2012-11-09 01:36:22

by Jack Wang

[permalink] [raw]
Subject: Re: hang problem when umount a nfs point

2012/11/8 J. Bruce Fields <[email protected]>:
> On Thu, Nov 08, 2012 at 11:03:22AM +0800, Jack Wang wrote:
>> 2012/11/8 J. Bruce Fields <[email protected]>:
>> > On Wed, Nov 07, 2012 at 09:05:51AM +0800, Jack Wang wrote:
>> >> 2012/11/7 Martín Cigorraga <[email protected]>:
>> >> > On Mon, Nov 5, 2012 at 10:27 PM, Jack Wang <[email protected]>
>> >> > wrote:
>> >> >>
>> >> >> Hi all,
>> >> >>
>> >> >> Anyone who can kindly give some suggestion? or we just put question to
>> >> >> the wrong list?
>> >> >>
>> >> >> Thanks.
>> >> >>
>> >> >> Jack
>> >> >>
>> >> >> 2012/11/1 dahai_tian <[email protected]>:
>> >> >> > Hi all:
>> >> >> > I mount a local directory to a nfs server. When nfs server is
>> >> >> > stopped
>> >> >> > for some accidental cause, I try to umount the mount point, the umount
>> >> >> > command will hang and 'time out' messages are continually printed in the
>> >> >> > terminal. How can I avoid hanging in this case? BTW, This issue does not
>> >> >> > exist when I changed nfs version from 4 to 3.
>> >> >> > Look forward to your response, thanks!
>> >>
>> >> >
>> >> > Hi Jack, use the -l (lazy) switch:
>> >> > # umount -l {your mounted nfs share}
>> >> >
>> >> > Also, I wouldn't recommend 'just to kill' the NFS proces(ses) as it (them)
>> >> > may leave shared memory a mess.
>> >> > (And I would like to see how do you make to mount any NFS share again
>> >> > without booting)
>> >>
>> >> Thanks Martin for kindly help.
>> >>
>> >> umount -l did work, but why nfsv3 do not have this problem?
>> >
>> > I don't know what it is exactly. But in general I wouldn't expect
>> > umount to work when the server's unavailable.
>> >
>> > --b.
>>
>> Thanks for your time Bruce, but there are chance the server
>> unavailable , why you think umount don't work is expected?
>
> It's tough for the client to deal safely with an unreachable server.
> Worst case it may still have data in its buffers that applications have
> written but that hasn't yet made it to the server.
>
> If you don't have any opens or other state on the filesystem any more,
> there might be things that could be done to make it easier to umount in
> that case--I haven't thought it through--but I doubt that's a high
> priority, so it's likely up to you to write the code and persuade people
> it's worthwhile.
>
> --b.
Thanks for explaination.

Jack

2012-11-07 01:05:52

by Jack Wang

[permalink] [raw]
Subject: Re: hang problem when umount a nfs point

2012/11/7 Martín Cigorraga <[email protected]>:
> On Mon, Nov 5, 2012 at 10:27 PM, Jack Wang <[email protected]>
> wrote:
>>
>> Hi all,
>>
>> Anyone who can kindly give some suggestion? or we just put question to
>> the wrong list?
>>
>> Thanks.
>>
>> Jack
>>
>> 2012/11/1 dahai_tian <[email protected]>:
>> > Hi all:
>> > I mount a local directory to a nfs server. When nfs server is
>> > stopped
>> > for some accidental cause, I try to umount the mount point, the umount
>> > command will hang and 'time out' messages are continually printed in the
>> > terminal. How can I avoid hanging in this case? BTW, This issue does not
>> > exist when I changed nfs version from 4 to 3.
>> > Look forward to your response, thanks!

>
> Hi Jack, use the -l (lazy) switch:
> # umount -l {your mounted nfs share}
>
> Also, I wouldn't recommend 'just to kill' the NFS proces(ses) as it (them)
> may leave shared memory a mess.
> (And I would like to see how do you make to mount any NFS share again
> without booting)

Thanks Martin for kindly help.

umount -l did work, but why nfsv3 do not have this problem?

Jack

2012-11-08 03:03:23

by Jack Wang

[permalink] [raw]
Subject: Re: hang problem when umount a nfs point

2012/11/8 J. Bruce Fields <[email protected]>:
> On Wed, Nov 07, 2012 at 09:05:51AM +0800, Jack Wang wrote:
>> 2012/11/7 Martín Cigorraga <[email protected]>:
>> > On Mon, Nov 5, 2012 at 10:27 PM, Jack Wang <[email protected]>
>> > wrote:
>> >>
>> >> Hi all,
>> >>
>> >> Anyone who can kindly give some suggestion? or we just put question to
>> >> the wrong list?
>> >>
>> >> Thanks.
>> >>
>> >> Jack
>> >>
>> >> 2012/11/1 dahai_tian <[email protected]>:
>> >> > Hi all:
>> >> > I mount a local directory to a nfs server. When nfs server is
>> >> > stopped
>> >> > for some accidental cause, I try to umount the mount point, the umount
>> >> > command will hang and 'time out' messages are continually printed in the
>> >> > terminal. How can I avoid hanging in this case? BTW, This issue does not
>> >> > exist when I changed nfs version from 4 to 3.
>> >> > Look forward to your response, thanks!
>>
>> >
>> > Hi Jack, use the -l (lazy) switch:
>> > # umount -l {your mounted nfs share}
>> >
>> > Also, I wouldn't recommend 'just to kill' the NFS proces(ses) as it (them)
>> > may leave shared memory a mess.
>> > (And I would like to see how do you make to mount any NFS share again
>> > without booting)
>>
>> Thanks Martin for kindly help.
>>
>> umount -l did work, but why nfsv3 do not have this problem?
>
> I don't know what it is exactly. But in general I wouldn't expect
> umount to work when the server's unavailable.
>
> --b.

Thanks for your time Bruce, but there are chance the server
unavailable , why you think umount don't work is expected?

Jack

2012-11-07 19:01:14

by J. Bruce Fields

[permalink] [raw]
Subject: Re: hang problem when umount a nfs point

On Wed, Nov 07, 2012 at 09:05:51AM +0800, Jack Wang wrote:
> 2012/11/7 Martín Cigorraga <[email protected]>:
> > On Mon, Nov 5, 2012 at 10:27 PM, Jack Wang <[email protected]>
> > wrote:
> >>
> >> Hi all,
> >>
> >> Anyone who can kindly give some suggestion? or we just put question to
> >> the wrong list?
> >>
> >> Thanks.
> >>
> >> Jack
> >>
> >> 2012/11/1 dahai_tian <[email protected]>:
> >> > Hi all:
> >> > I mount a local directory to a nfs server. When nfs server is
> >> > stopped
> >> > for some accidental cause, I try to umount the mount point, the umount
> >> > command will hang and 'time out' messages are continually printed in the
> >> > terminal. How can I avoid hanging in this case? BTW, This issue does not
> >> > exist when I changed nfs version from 4 to 3.
> >> > Look forward to your response, thanks!
>
> >
> > Hi Jack, use the -l (lazy) switch:
> > # umount -l {your mounted nfs share}
> >
> > Also, I wouldn't recommend 'just to kill' the NFS proces(ses) as it (them)
> > may leave shared memory a mess.
> > (And I would like to see how do you make to mount any NFS share again
> > without booting)
>
> Thanks Martin for kindly help.
>
> umount -l did work, but why nfsv3 do not have this problem?

I don't know what it is exactly. But in general I wouldn't expect
umount to work when the server's unavailable.

--b.