Re: 8.0RC1 and BOOTP_NFSV3 regression?

From: Rick Macklem <rmacklem_at_uoguelph.ca>
Date: Wed, 14 Oct 2009 16:30:48 -0400 (EDT)
On Sun, 4 Oct 2009, Daniel Braniss wrote:

> I'm not sure when this happened, but a kernel compiled with
> BOOTP_NFSV3 fails when the server is not FreeBSD (ie NetAPP).
>
> before, with the option set, only when kernel_options="nfsv3" was set
> it would fail/panic, this way, I could control which diskless, shearing the
> same kernel, would boot with nfsv3 and which not, dependig on the server.
>
> there is hope! before it would panic when receiving a v3 file handle, now
> it fails, but panics later when no init is found :-)
>
> is anyone with enough nfs v2/v3 knowledge willing to fix this?
>
Just fyi, the change of using NFSv3 by default resulted in this. The
poster has confirmed that using "nfsv2" as an explicit option, allows
the boot to work against a non-FreeBSD server.

The problem is that nfs_setup_diskless() in sys/nfsclient/nfs_diskless.c
assumed an NFSv2 type file handle, and then sys/nfsclient/nfs_vfsops.c
sets the file handle size to NFSX_V3FH (which is the size of a FreeBSD
server's NFSv3 file handle).

At a glance, changing nfs_setup_diskless() to set the file handle size
based on the length of boot.nfsroot.nfshandle is easy, but then it
gets interesting...

- In lib/libstand/nfs.c, there is NFSv2 code that fills in
   boot.nfsroot.nfshandle and adding/converting this to use NFSv3
   wouldn't be too hard (more work than the above, but..).
   --> But I can't see how it can be told to use NFSv2 vs NFSv3?
       (Does anyone know of a way or would trying NFSv3 and then
        falling back to NFSv2 make sense?)

I don't have a diskless NFS setup, so I'm going to have to depend
upon others to do testing. (The poster is willing to do some testing
in about 2 weeks.)

I don't think this can be done for 8.0. If the change is considered
a regression that needs to be fixed for 8.0, taking NFSMNT_NFSV3 out
of the default flags in nfs_setup_diskless() would but it back the
way FreeBSD7 behaves. I'll let others decide if this should be done.

rick
Received on Wed Oct 14 2009 - 18:24:18 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:57 UTC