Janusz Bulik wrote:> Hello,
>
> I set up NFSv4 server. To make sure I set
> vfs.nfsd.server_min_nfsvers=4. I can check its version, for example,
> by tcpduming and then I can see in wireshark lines like:
> Network File System
> Program Version: 4
> V4 Procedure: COMPOUND....
> ....
>
> is there any easier way to check its version?
> I see there is nfsstat -e option which shows delegs and locks. But all
> other ones are combined with nfsv3 I guess (On Ubuntu there are
> separate lines: v3 and v4)
>
At the server, not that I can think of. As you noted, if you see non-zero
values for the OpenOwners etc line when you do "nfsstat -e -s", then
some
client is using NFSv4. jwd@ was working on some per-client stats, but we
need to resurrect that work. (I can't remember if he has a patch for testing
lying about these days?)
> and on the client side, is it possible to check which version is
> exported or mounted?
> something like
> % showmount -e nfsserver
>
> Is forcing mount to use nfsv4 100% sure? (mount -t nfs -o nfsv4 ....)
>
Yes, w.r.t. the FreeBSD client. Also, there is now a "-m" option on
nfsstat that you can use on the client to dump exactly what mount
options are being used. (It is in head and stable/9, but not 9.1-release.)
> and btw. Is forcing mount to use -sec=krb5 (with
> -sec=sys:krb5:krb5i:krb5p in /etc/exports) also 100% sure?
Nope. I didn't code this and I've never been sure if it the correct
thing to do, but the code falls through to using "sys" if it can't
get a Kerberos credential. I'm guessing that the original author
figured that, if the server cared, it would fail the RPC when a "sys"
authenticator was used.
> because it mounts and doesn't give ticket for nfs/nfsserver.
> So, I guess if -sec=krb5 is not available, it mounts with -sec=sys,
> right?
It is actually per-RPC. It will try to get a Kerberos credential, but
fall through to using "sys" if that fails.
> With -sec=krb5:krb5i:krb5p in /etc/exports it doesn't mount.
Correct. I think that was the original author's assumption.
> I am wondering if you force -o nfsv4, it wouldn't mount it like nfsv3.
>
Yes, as above. Personally, I think it should always use whatever version
the command line option specifies, but that is really up to the "FreeBSD
collective". It currently defaults to nfsv3 if no option is specified and,
maybe. someday that should change to nfsv4, but it is not that way now.
rick
>
> Happy Valentines!
>
> --
> Best wishes
> Janusz
> _______________________________________________
> freebsd-stable at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to
> "freebsd-stable-unsubscribe at freebsd.org"