fsid change of ZFS?

From: Hiroki Sato <hrs_at_FreeBSD.org>
Date: Fri, 19 Aug 2011 00:20:46 +0900 (JST)
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

Received on Thu Aug 18 2011 - 13:22:10 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:16 UTC