From owner-freebsd-hackers Mon Apr 10 13:46:45 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id 2455637B809 for ; Mon, 10 Apr 2000 13:46:43 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id NAA27006; Mon, 10 Apr 2000 13:46:15 -0700 (PDT) (envelope-from dillon) Date: Mon, 10 Apr 2000 13:46:15 -0700 (PDT) From: Matthew Dillon Message-Id: <200004102046.NAA27006@apollo.backplane.com> To: "David E. Cross" Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: NFS FHs, what are they (how are they made?) References: <200004102039.QAA32367@cs.rpi.edu> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :I was previously under the impression that a NFS FH was basically a :concatenation of a device # and an inode #. This was shot down earlier today. :The problem was that a disk had failed and we where doing a replacement (the :new disk was not identical to the old, it was substantially larger). I :proceeded to format it so that the old fstab entry would work with the new :drive (that is the NFS exported partition would be called /dev/wd1s1h -- :same device number, no?) I then used dump/restore to ensure that the :inode numbers would remain the same. Making to further changes I shut down :the machine, swapped in the new drive and brought the system back up. The :new drive was mounted faithfully by the old fstab. Yet I now see :"Stale NFS Handle"s on my clients. What did I do wrong? : :-- :David Cross | email: crossd@cs.rpi.edu It's probably the file iteration number, which the NFS server uses to detect when a file is destroyed (inode is freed), and then the inode is reused for something else. I think this case after dump/restore was written, so restore has no clue about it. /usr/include/ufs/ufs/dinode.h, I think it's the 'di_gen' field. When you newfs a filesystem it's supposed to populate this field with a random number also. So short of doing a disk-to-disk image copy, there is no way you would be able to maintain disk consistency from NFS's point of view. -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message