Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Aug 2011 00:20:46 +0900 (JST)
From:      Hiroki Sato <hrs@FreeBSD.org>
To:        current@FreeBSD.org
Cc:        pjd@FreeBSD.org
Subject:   fsid change of ZFS?
Message-ID:  <20110819.002046.908756241495481148.hrs@allbsd.org>

next in thread | raw e-mail | index | archive | help
----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)----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110819.002046.908756241495481148.hrs>