Stale NFS handle, cannot re-mount

  • Follow


Hi there,

I've looked into several past threads regarding stale NFS handles and related
problems about umounting, but I haven't found a symptom reported that matches
mine.

Suppose the NFS client is named "clnt" and the server "srvr", both being
Solaris 8, and the mount-relation is like this:

    /mountpoint -> srvr:/dsk0

clnt uses autmountd with an NIS-supplied map files.

srvr's disk /dsk0 crashed, so that I did

    srvr# umount -f /dsk0
    srvr# fsck -y -o b=32 /dev/rdsk/c2t1d0s2  #<-- this is /dsk0

because the superblock was broken.  fsck fixed the disk although
some files and directories disappeared (part of which were moved to
lost+found).  And

    srvr# mount /dev/dsk/c2t1d0s2 /dsk0

Now, on srvr, the disk /dsk0 works perfectly fine.  Its in the
"share" list.  nfsd is up and working (because srvr's other disks
are mounted from other clients).

But, on the client

    clnt# ls /mountpoint
    ls: /mountpoint: Permission denied
    clnt# umount /mountpoint  
    umount: warning: /mountpoint not in mnttab
    umount: /mountpoint not mounted
    clnt# rm -rf /mountpoint
    rm: cannot chdir from `.' to `mountpoint': Permission denied
    clnt# mount srvr:/dsk0 /mountpoint
    nfs mount: mount: /mountpoint: Stale NFS file handle
    clnt#

df -k doens't show srvr:/dsk0 .  Also, clnt:/var/adm/messages
has 

    Sep  1 22:10:04 clnt automountd[681]: [ID 834250 daemon.error]
       Mount of srvr:/dsk0 on /mountpoint: Stale NFS file handle

Could someone tell me how I can fix this?  I suppose that rebooting
clnt will do, but I'd like to avoid that if possible.

Thank you for your attention,
Ryo
0
Reply furufuru 9/1/2003 1:26:28 PM

Hi,
use the following commands:-
clnt# umount -f /mountpoint   (this works only on solaris 8 onwards)

clnt# mount srvr:/dsk0 /mountpoint

it should work.
regards


Ryo Furue wrote:

>Hi there,
>
>I've looked into several past threads regarding stale NFS handles and related
>problems about umounting, but I haven't found a symptom reported that matches
>mine.
>
>Suppose the NFS client is named "clnt" and the server "srvr", both being
>Solaris 8, and the mount-relation is like this:
>
>    /mountpoint -> srvr:/dsk0
>
>clnt uses autmountd with an NIS-supplied map files.
>
>srvr's disk /dsk0 crashed, so that I did
>
>    srvr# umount -f /dsk0
>    srvr# fsck -y -o b=32 /dev/rdsk/c2t1d0s2  #<-- this is /dsk0
>
>because the superblock was broken.  fsck fixed the disk although
>some files and directories disappeared (part of which were moved to
>lost+found).  And
>
>    srvr# mount /dev/dsk/c2t1d0s2 /dsk0
>
>Now, on srvr, the disk /dsk0 works perfectly fine.  Its in the
>"share" list.  nfsd is up and working (because srvr's other disks
>are mounted from other clients).
>
>But, on the client
>
>    clnt# ls /mountpoint
>    ls: /mountpoint: Permission denied
>    clnt# umount /mountpoint  
>    umount: warning: /mountpoint not in mnttab
>    umount: /mountpoint not mounted
>    clnt# rm -rf /mountpoint
>    rm: cannot chdir from `.' to `mountpoint': Permission denied
>    clnt# mount srvr:/dsk0 /mountpoint
>    nfs mount: mount: /mountpoint: Stale NFS file handle
>    clnt#
>
>df -k doens't show srvr:/dsk0 .  Also, clnt:/var/adm/messages
>has 
>
>    Sep  1 22:10:04 clnt automountd[681]: [ID 834250 daemon.error]
>       Mount of srvr:/dsk0 on /mountpoint: Stale NFS file handle
>
>Could someone tell me how I can fix this?  I suppose that rebooting
>clnt will do, but I'd like to avoid that if possible.
>
>Thank you for your attention,
>Ryo
>  
>


0
Reply Santos 9/1/2003 2:39:42 PM


Ryo Furue wrote:
> srvr's disk /dsk0 crashed, so that I did
> 
>     srvr# umount -f /dsk0
>     srvr# fsck -y -o b=32 /dev/rdsk/c2t1d0s2  #<-- this is /dsk0
> 
> because the superblock was broken.  fsck fixed the disk although

I want this magical version of fsck that fixes hardware problems
with disks.  :-)

(I hope you have plans to replace the failed disk...)

> Now, on srvr, the disk /dsk0 works perfectly fine.  Its in the
> "share" list.  nfsd is up and working (because srvr's other disks
> are mounted from other clients).

It may not be necessary, but it might be worth doing an "unshare"
and then "share" again just on that mount point.  If the filesystem
has changed since it was shared, this could potentially (I'm not
sure) change the way the way the mount daemon handles the filesystem.

>     clnt# ls /mountpoint
>     ls: /mountpoint: Permission denied
>     clnt# umount /mountpoint  
>     umount: warning: /mountpoint not in mnttab
>     umount: /mountpoint not mounted
>     clnt# rm -rf /mountpoint
>     rm: cannot chdir from `.' to `mountpoint': Permission denied
>     clnt# mount srvr:/dsk0 /mountpoint
>     nfs mount: mount: /mountpoint: Stale NFS file handle
>     clnt#
> 
> df -k doens't show srvr:/dsk0 .  Also, clnt:/var/adm/messages
> has 
> 
>     Sep  1 22:10:04 clnt automountd[681]: [ID 834250 daemon.error]
>        Mount of srvr:/dsk0 on /mountpoint: Stale NFS file handle

It sounds like your automountd is trying to cause the NFS mount
to happen, but it's not succeeding.  The first thing I'd try is
the following sequence:

1.  Stop automountd.
2.  "cat /etc/mnttab" and scan for anything that looks like the
     filesystem; try to unmount that.
3.  Start automountd again.

You can do steps 1 and 3 with /etc/init.d/autofs, but it may be
overkill, since you only need to stop automountd and not all the
other stuff that that script does.  But, if the above doesn't work,
you might try doing it with /etc/init.d/autofs too -- at least
it's better than rebooting...

   - Logan

0
Reply Logan 9/1/2003 8:01:31 PM

Santos Mohapatra <s.mohapatra@motorola.com> wrote in message news:<bivlr3$r4t$1@newshost.mot.com>...
> use the following commands:-
> clnt# umount -f /mountpoint   (this works only on solaris 8 onwards)
> 
> clnt# mount srvr:/dsk0 /mountpoint
> 
> it should work.

Thank you for your message, but unfortunately that doesn't work :-(
That was in fact implied by what I wrote:

> >    clnt# umount /mountpoint  
> >    umount: warning: /mountpoint not in mnttab
> >    umount: /mountpoint not mounted
> >    clnt# rm -rf /mountpoint
> >    rm: cannot chdir from `.' to `mountpoint': Permission denied
> >    clnt# mount srvr:/dsk0 /mountpoint
> >    nfs mount: mount: /mountpoint: Stale NFS file handle
> >    clnt#

"clnt# umount -f /mountpoint" gives the same result as that without "-f".
So,

    clnt# umount -f /mountpoint
    umount: warning: /mountpoint not in mnttab
    umount: /mountpoint not mounted
    clnt# mount srvr:/dsk0 /mountpoint 
    nfs mount: mount: /mountpoint: Stale NFS file handle
    clnt#

Hmmm.

Cheers,
Ryo
0
Reply furufuru 9/2/2003 5:41:26 AM

Logan Shaw <lshaw-usenet@austin.rr.com> wrote in message news:<vAN4b.13101$jt.588799@twister.austin.rr.com>...
> Ryo Furue wrote:
> > srvr's disk /dsk0 crashed, so that I did
> > 
> >     srvr# umount -f /dsk0
> >     srvr# fsck -y -o b=32 /dev/rdsk/c2t1d0s2  #<-- this is /dsk0
> > 
> > because the superblock was broken.  fsck fixed the disk although
> 
> I want this magical version of fsck that fixes hardware problems
> with disks.  :-)

Sure, I can email you with a binary copy of our fsck attatched....
I'm joking of course. :-)  Our disk seems to have crashed
"software-wise", and the ordinary fsck worked.

Thank you for your message, but unfortunately the unshare-and-share
didn't change anything.

> > df -k doens't show srvr:/dsk0 .  Also, clnt:/var/adm/messages
> > has 
> > 
> >     Sep  1 22:10:04 clnt automountd[681]: [ID 834250 daemon.error]
> >        Mount of srvr:/dsk0 on /mountpoint: Stale NFS file handle
> 
> It sounds like your automountd is trying to cause the NFS mount
> to happen, but it's not succeeding.  The first thing I'd try is
> the following sequence:
> 
> 1.  Stop automountd.
> 2.  "cat /etc/mnttab" and scan for anything that looks like the
>      filesystem; try to unmount that.
> 3.  Start automountd again.

This didn't work, either. :-(   /etc/mnttab doesn't contain either
"srvr:/dsk0" or "/mountpoint".

But, I'm not sure whether or not another factor that I didn't tell
is making difference.  In fact, I simplified the description of my
setting for the original article I posted, and a "more real" situation
is

    /mountpoint/a -> srvr:/dsk0
    /mountpoint/b -> srvr2:/dsk1
    ... and so on ...

and

    clnt# ypcat -k auto.master
    /mountpoint/  auto_mountpoint  -rw,nosuid
    ....
    clnt# ypcat -k auto.mountpoint
    a  srvr:/dsk0
    b  srvr2:/dsk1
    ....

So, when I stopped automountd on the client,
error messages were issued:

    clnt# /etc/rc2.d/S74autofs stop
    umount /mountpoint busy
    ...

Automountd died. That's for sure.  But, I don't know whether
the presence of the other mountpoints (/mountpoint/b, etc.)
causes some problem or not.

> you might try doing it with /etc/init.d/autofs too -- at least
> it's better than rebooting...

Seems more and more to be the time of rebooting....

Thanks again,
Ryo
0
Reply furufuru 9/2/2003 7:15:52 AM

4 Replies
991 Views

(page loaded in 2.373 seconds)

Similiar Articles:













7/21/2012 11:19:20 PM


Reply: