From owner-freebsd-stable@FreeBSD.ORG Fri Feb 15 00:14:46 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 9CC1CFB6 for ; Fri, 15 Feb 2013 00:14:46 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-annu.net.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id 610D76DA for ; Fri, 15 Feb 2013 00:14:45 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqAEAAJ9HVGDaFvO/2dsb2JhbABFhkm6LnOCHwEBAQMBAQEBICsgCwUWGAICDRkCKQEJJgYIBwQBHASHawYMql+SNoEjjCcKgx2BEwOIZosLgjOBHY82gyVPgQU1 X-IronPort-AV: E=Sophos;i="4.84,668,1355115600"; d="scan'208";a="14184198" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-annu.net.uoguelph.ca with ESMTP; 14 Feb 2013 19:14:44 -0500 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id CF8C5B4090; Thu, 14 Feb 2013 19:14:44 -0500 (EST) Date: Thu, 14 Feb 2013 19:14:44 -0500 (EST) From: Rick Macklem To: Janusz Bulik Message-ID: <1476795337.3038886.1360887284826.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: Subject: Re: NFS resources, how to check version MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.202] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - FF3.0 (Win)/6.0.10_GA_2692) Cc: freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Feb 2013 00:14:46 -0000 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@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to > "freebsd-stable-unsubscribe@freebsd.org"