2007-07-16 01:13:26

by NeilBrown

[permalink] [raw]
Subject: Re: Status of mount.nfs

On Sunday July 15, [email protected] wrote:
> On Mon, Jul 09, 2007 at 01:17:19PM +1000, Neil Brown wrote:
> > nfs-utils-1.1.0 builds and install mount.nfs by default, and should be
> > used with the new util-linux.
>
> Just a few experiences with this after a week or so with the new default in
> Debian:

Thanks for sharing.

>
> - The new mount is really more picky in several aspects. Most notably, it
> refuses to mount anything unless rpc.statd is running, which broke our
> NFS mounting on boot.

Is this simply because you were mounting NFS filesystems before
running statd? In that case, maybe we should say that it "highlighted
that your NFS mounting on boot was already broken" ?? :-)
If you need to nfsmount '/' or '/var', you should mount them with
"-o nolock" and then statd won't be needed.

> Also, it seems to be less forgiving about portmapper
> registration; cfs (an encrypted filesystem based off NFS, it seems) sets
> up a server on port 3049 and expects "-o port=3049,nfsvers=2" to work. The
> new mount.nfs searches for a portmapper unless the udp option is also
> correctly set.

I'm a bit confused here. I would expect that to avoid portmap being
used, you would need to set both 'port' and 'mountport' on the command
line. It shouldn't have anything to do with whether UDP is set. Can
you say a bit more about what you discovered here?

> I'm slightly surprised at this increase in strictness,
> given that I thought it was essentially the same code.

It is based on the same code but with quite a number of fixes and
"improvements". It is entirely possible that some regressions were
introduced, though I tried to do a reasonable amount of testing and
review.


> - If you forget to install it suid (we strip suid bits automatically) you
> will of course break user mounts. :-)

and if you forget to install the new man pages, you will have
incomplete documentation :-)
nfs-common 1:1.1.0-9 does not have mount.nfs and umount.nfs man pages.


> - The umount exit status is broken, which will cause odd failures on umount
> from the GNOME drive manager (basically, an empty error dialog box). Apply
> the patch I posted here earlier.

Thanks for this fix.

>
> I guess that's all the traps I've fell into for now; I hope they'll make it
> easier to make the move for other distributions.

Thanks a lot!

NeilBrown

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs


2007-07-16 09:20:52

by Steinar H. Gunderson

[permalink] [raw]
Subject: Re: Status of mount.nfs

On Mon, Jul 16, 2007 at 11:13:14AM +1000, Neil Brown wrote:
> Is this simply because you were mounting NFS filesystems before
> running statd? In that case, maybe we should say that it "highlighted
> that your NFS mounting on boot was already broken" ?? :-)

Yes, we were. I'm in the process of patching the boot process now, so you
could probably shed light on a related issue: Do we need to start portmap
before statd or not? The comments in the old code is slightly cryptic :-)

>> Also, it seems to be less forgiving about portmapper
>> registration; cfs (an encrypted filesystem based off NFS, it seems) sets
>> up a server on port 3049 and expects "-o port=3049,nfsvers=2" to work. The
>> new mount.nfs searches for a portmapper unless the udp option is also
>> correctly set.
> I'm a bit confused here. I would expect that to avoid portmap being
> used, you would need to set both 'port' and 'mountport' on the command
> line. It shouldn't have anything to do with whether UDP is set. Can
> you say a bit more about what you discovered here?

Well, I have no idea how these things work at all, I just traced through the
code and saw what would make it work :-) cfs runs as its own NFS daemon, on
port 3049, but does not seem to register with the portmapper. The mount
command given, without "-o udp", gives:

mount: mount to NFS server 'localhost' failed: RPC Error: Success.

The error seems to originate from probe_nfsport(), which also has a line
saying

if (pmap->pm_vers && pmap->pm_prot && pmap->pm_port)
return 1;

which indicates that if version+protocol+port are all set beforehand, don't
probe -- and indeed, that works. I stopped debugging the issue there.

>> - If you forget to install it suid (we strip suid bits automatically) you
>> will of course break user mounts. :-)
> and if you forget to install the new man pages, you will have
> incomplete documentation :-)
> nfs-common 1:1.1.0-9 does not have mount.nfs and umount.nfs man pages.

Thanks, nice catch. I'll be sure to fix that in the next upload.

/* Steinar */
--
Homepage: http://www.sesse.net/

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs