From owner-freebsd-current@FreeBSD.ORG Thu Aug 18 15:22:10 2011 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB72E106564A; Thu, 18 Aug 2011 15:22:10 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (gatekeeper-int.allbsd.org [IPv6:2001:2f0:104:e002::2]) by mx1.freebsd.org (Postfix) with ESMTP id CA3638FC13; Thu, 18 Aug 2011 15:22:09 +0000 (UTC) Received: from alph.allbsd.org (p3028-ipbf608funabasi.chiba.ocn.ne.jp [125.175.94.28]) (authenticated bits=128) by mail.allbsd.org (8.14.4/8.14.4) with ESMTP id p7IFLj11092606; Fri, 19 Aug 2011 00:21:55 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [IPv6:::1]) (authenticated bits=0) by alph.allbsd.org (8.14.4/8.14.4) with ESMTP id p7IFLfEu051885; Fri, 19 Aug 2011 00:21:43 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Fri, 19 Aug 2011 00:20:46 +0900 (JST) Message-Id: <20110819.002046.908756241495481148.hrs@allbsd.org> To: current@FreeBSD.org From: Hiroki Sato X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.3 on Emacs 23.1 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Fri_Aug_19_00_20_46_2011_272)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.3 (mail.allbsd.org [133.31.130.32]); Fri, 19 Aug 2011 00:22:01 +0900 (JST) X-Spam-Status: No, score=-102.6 required=13.0 tests=BAYES_00, CONTENT_TYPE_PRESENT,DIRECTOCNDYN,RCVD_IN_RP_RNBL,SPF_SOFTFAIL, USER_IN_WHITELIST autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on gatekeeper.allbsd.org Cc: pjd@FreeBSD.org Subject: fsid change of ZFS? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Aug 2011 15:22:10 -0000 ----Security_Multipart(Fri_Aug_19_00_20_46_2011_272)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, I have experienced "Stale NFS file handle" issue when switching between oldnfs and newnfs on a CURRENT box (NFS server exporting ZFS mountpoints). The cause was that fsid was changed in the following conditions and not in the NFS subsystem itself, but I am wondering if these are expected behavior... First, I tried the following configurations of NFS and ZFS, and saw if fsid of the same mountpoint (a mounted ZFS dataset) changed or not by using statfs(2): compile opts kld module fsid[0:1] kld loaded by ---------------------------------------------------------------------------- NFSSERVER+NFSCLIENT zfs 865798fa:8346ef02 loader NFSSERVER+NFSCLIENT zfs 865798fa:8346ef07 kldload(8) NFSSERVER+NFSCLIENT+ NFSD+NFSCL zfs 865798fa:8346ef03 loader NFSSERVER+NFSCLIENT+ NFSD+NFSCL zfs 865798fa:8346ef08 kldload(8) NFSSERVER+NFSCLIENT nfsd+nfscl+zfs 865798fa:8346ef08 loader ---------------------------------------------------------------------------- The fsid seems to depend on the module loading order of ZFS. Even on a running system, the following procedure changed the fsid, for example: 1. Boot with a kernel with NFSSERVER+NFSCLIENT. 2. Load zfs.ko and opensolaris.ko by loader. 3. Check fsid of a ZFS mountpoint --> 865798fa:8346ef02 4. Unload zfs.ko and opensolaris.ko, and then do zfs umount -a. 5. Load zfs.ko and opensolaris.ko by kldload(8), and do zfs mount -a. 6. Check fsid of the same mountpoint --> 865798fa:8346ef08 Is this by design or not? While testing the above configurations, fsid of a UFS mountpoint was not changed (as expected). -- Hiroki ----Security_Multipart(Fri_Aug_19_00_20_46_2011_272)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEABECAAYFAk5NLc4ACgkQTyzT2CeTzy06uwCeI8IxkeS3X2x2deluLlCykNI5 6pgAniE/dfyRo0Moy9Gl3HAjbpUYD/yC =PsKd -----END PGP SIGNATURE----- ----Security_Multipart(Fri_Aug_19_00_20_46_2011_272)----