RFC: make the experimental NFS subsystem the default one

Dag-Erling Smørgrav des at des.no
Sat Apr 30 03:24:18 UTC 2011


Rick Macklem <rmacklem at uoguelph.ca> writes:
> Well, I've PXE booted from it using the old pxeboot code that used NFSv2
> and the recent code that I modified to use NFSv3. I don't see why there
> would be a problem, but obviously I can't guarantee that.

I've seen some pxeboot-related weirdness with the new code...

Server: ds4.des.no, amd64, FreeBSD 9.0 r221100
Client: via.des.no, i386, FreeBSD 9.0 r221205

(both with mods, but none that would affect NFS)

Note that they conveniently bracket the switch - the server runs the old
NFS code while the client runs the new.

Booting a customized kernel with the new NFS stack results in a weird
error message from mountroot:

 Trying to mount root from nfs:ds4:/jail/via [rw]...
 mountroot: waiting for device ds4:/jail/via ...
 Mounting from nfs:ds4:/jail/via failed with error 19.
 Trying to mount root from nfs: []...
 NFS ROOT: 10.0.0.4:/jail/via

(error 19 is ENODEV)

Booting a customized kernel with the old NFS stack (and with /etc/fstab
altered to list / as oldnfs instead of nfs) produces a slightly
different result:

 Trying to mount root from oldnfs:ds4:/jail/via [rw]...
 mountroot: waiting for device ds4:/jail/via ...
 Mounting from oldnfs:ds4:/jail/via failed with error 19.
 Trying to mount root from nfs: []...
 Mounting from nfs failed with error 2: unknown file system.

Note that after the first attempt fails, it tries again with "nfs"
instead of "oldnfs".  If I type "oldnfs:" at the mountroot prompt, I
get:

 Trying to mount root from oldnfs: []...
 NFS ROOT: 10.0.0.4:/jail/via

The rc scripts also get confused because they think the NFS client code
is not loaded, and try to load it again, leading to the following kernel
error message:

 interface oldnfs.1 already present in the KLD 'kernel'!

accompanied by a message from the script itself:

 /etc/rc: WARNING: Unable to load kernel module nfsclient

So there are (at least) two kernel issues:

 1) the "error 19" that occurs with both the old and the new stack

 2) the fallback that always uses "nfs" instead of using the correct
    fstype for whichever NFS stack is loaded.

DES
-- 
Dag-Erling Smørgrav - des at des.no


More information about the freebsd-fs mailing list