Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Apr 2000 13:46:15 -0700 (PDT)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        "David E. Cross" <crossd@cs.rpi.edu>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: NFS FHs, what are they (how are they made?)
Message-ID:  <200004102046.NAA27006@apollo.backplane.com>
References:   <200004102039.QAA32367@cs.rpi.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
: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 
					<dillon@backplane.com>


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




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