Subject: Re: questions about nfs
To: Denis Lagno <dlagno@mail.ru>
From: Johnny Billquist <bqt@Update.UU.SE>
List: current-users
Date: 02/13/2005 15:16:58
On Sun, 13 Feb 2005, Denis Lagno wrote:

>>> When I try to unmount /flam/stuffy I get:
>>>
>>> # umount -fv /flam/stuffy
>>> /stuffy: unmount from /flam/stuffy
>>> umount: /flam/stuffy: Invalid argument
>>>
>>> # mount -uv /flam/stuffy
>>> exec: mount_nfs -o update flam:/stuffy /flam/stuffy
>>> mount_nfs: flam:/stuffy on /flam/stuffy: Invalid argument
>>>
>>> Despite the fact that /flam/stuffy appears empty I have
>>> open session of xpdf reading book residing on /flam/stuffy,
>>> and I still can read it.
>>
>> Did  this filesystem get changed in some way on the server ? It looks like
>> the filehandle the client has for the mount point isn't valid any more,
>
> filesystem /stuffy was mounted read-only, should be no changes.
>
>> which can happen if e.g. the directory was renamed, or moved.
>
> probably it is the point.  Server was rebooted because of system update,
> and my procedure for system updating includes executing some scripts.
> Directory /stuffy was removed and then recreated again.

removed and recreated means we're talking about a different directory, 
although with the same name. But they have different inode numbers.

> So, the reason why /flam and /flam/volatile remain mounted and
> /flam/stuffy doesn't is clear.

Really? If you remove flam:/stuffy, and recreate it, nfs will not be able 
to retain that mount. You're basically very lost. You'll have do umount, 
and mount it again. Doing a mount -u is not the same thing.

> But anyway it seems not very beatiful that client can not umount
> this filesystem.

You shouldn't have any problems doing an umount. Did you have /flam/stuffy 
in your fstab? Otherwise I'm not sure you can do the umount the way you're 
trying. Perhaps try "umount flam:/stuffy"

nfs is a tricky and strange beast. You really need to know how things 
work underneath the hood to understand what you can do, and why different 
things happens.

Most of the time strange things noted with nfs is not a bug in nfs, but a 
result of how nfs works, and perfectly correct, once you understand that. 
:-)

(Things like showmount is really just a way of looking at a normal text 
file on the server. There is nothing really kept around about a client 
that mounts something nfs-exported. In fact, you don't actually have to 
use mountd at the server side at all, you can access the exported file 
systems without ever telling the server that you're mounting them.)

 	Johnny

Johnny Billquist                  || "I'm on a bus
                                   ||  on a psychedelic trip
email: bqt@update.uu.se           ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol