* NFS mount count is incremented incorrectly
@ 2003-08-14 4:27 fumihiko kakuma
2003-08-15 1:17 ` Neil Brown
0 siblings, 1 reply; 3+ messages in thread
From: fumihiko kakuma @ 2003-08-14 4:27 UTC (permalink / raw)
To: util-linux; +Cc: nfs
Hello
We assume that an NFS client tries to mount a filesystem
on an NFS server.
A mount count in /var/lib/nfs/rmtab may be incremented
even when a mount command fails.
example:
System: GNU-Debian/Linux
Architecture: i386
Package: nfs-kernel-server 1.0-2, mount 2.11n-4
(1)server
~# exportfs -o rw *.test1.co.jp:/share
~# exportfs -v
/share *.test1.co.jp(rw,async,wdelay,root_squash)
/share1 <world>(rw,async,wdelay,root_squash)
~# cat /var/lib/nfs/rmtab
~#
(2)client
~# mount -t nfs nfs-server:/share /nowhere
mount: mount point /nowhere does not exist
~#
(3)server
~# cat /var/lib/nfs/rmtab
nfs-client.test1.co.jp:/share:0x00000002
~# cat /proc/fs/nfs/exports
# Version 1.1
# Path Client(Flags) # IPs
/share nfs-client.test1.co.jp(rw,root_squash,async,wdelay) # xx.xx.xx.xx
~#
Because the mount command does not request MOUNTPROC_UMNT
to the NFS server, when the mount command gets
an error from mount() system call.
I think that it needs for the try_mount_one() of mount.c
to add code which requests MOUNTPROC_UMNT when
guess_fstype_and_mount() returns error.
I think we should make the nfsmount() function request
MOUNTPROC_UMNT.
--
fumihiko kakuma <kakmy@mvh.biglobe.ne.jp>
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: NFS mount count is incremented incorrectly
2003-08-14 4:27 NFS mount count is incremented incorrectly fumihiko kakuma
@ 2003-08-15 1:17 ` Neil Brown
2003-08-15 6:40 ` Trond Myklebust
0 siblings, 1 reply; 3+ messages in thread
From: Neil Brown @ 2003-08-15 1:17 UTC (permalink / raw)
To: fumihiko kakuma; +Cc: util-linux, nfs
On Thursday August 14, kakmy@mvh.biglobe.ne.jp wrote:
> Hello
>
> We assume that an NFS client tries to mount a filesystem
> on an NFS server.
> A mount count in /var/lib/nfs/rmtab may be incremented
> even when a mount command fails.
>
It is possible that mount could be modified to do a slightly better
job of keeping this count right, but it is really a loosing battle.
The MOUNT protocol is simply not a reliable way to keep rmtab exactly
correct. Tinkering may improve the situation but it can never make it
perfect.
You really should think of rmtab as a list of client how have had
filesystems mounted in the past, and may still have them mounted.
It is no more precise than that.
NeilBrown
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: NFS mount count is incremented incorrectly
2003-08-15 1:17 ` Neil Brown
@ 2003-08-15 6:40 ` Trond Myklebust
0 siblings, 0 replies; 3+ messages in thread
From: Trond Myklebust @ 2003-08-15 6:40 UTC (permalink / raw)
To: Neil Brown; +Cc: fumihiko kakuma, util-linux, nfs
>>>>> " " == Neil Brown <neilb@cse.unsw.edu.au> writes:
> The MOUNT protocol is simply not a reliable way to keep rmtab
> exactly correct. Tinkering may improve the situation but it
> can never make it perfect.
Seconded...
There is no way you can make this work exactly. It suffices for the
client to crash before it has sent the UNMOUNT request to the server
in order to screw up the accounting in rmtab.
Cheers,
Trond
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-08-15 6:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-14 4:27 NFS mount count is incremented incorrectly fumihiko kakuma
2003-08-15 1:17 ` Neil Brown
2003-08-15 6:40 ` Trond Myklebust
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.