NFS stale-filehandles

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



I'm trying to get to the state where
1. I can have a bunch of NFS clients which have mounted
   filesystems exported by a fileserver,

2. The fileserver is stopped, the (SCSI) disks containing
   the filesystems are moved to different positions on the SCSI bus,
   and the fileserver is rebooted.

3. The clients can still continue to access the correct filesystems,
   without having to umount/re-mount anything, even though their position
   on the server's SCSI bus has changed. 

The clients are members of a compute farm. They mount the NFS 
filesystems with the 'hard' option so that their NFS requests 
stall if the server is off for any reason, and so far this works
well. However, if the server disks are moved, there are problems.

I started off mounting the server filesystems by label, with lines
in /etc/fstab  like:

LABEL=/filesys1		/filesystem1	ext3	defaults	0 2

This gave me pseudo-persistence in that wherever the disks were on
the SCSI bus, they were always mounted on the correct mountpoint.
With this setup, the underlying device (/dev/sda /dev/sdb etc)
as shown by 'mount -t ext3' changed when the disk position changed.
I then discovered that if I swapped two disks over on the server
while those filesystems were still NFS-mounted by a client, the
client didnt notice the swap, but continued to access the disks
in the unswapped position, and hence access the wrong filesystem.
There were no NFS complaints, just complaints from users.

I'm now using a bunch of udev rules to give me device-name persistence
instead of relying on the partition label, and I have lines in fstab like:

/dev/dsk0_1		/filesystem1	ext3	defaults	0 2

Now, wherever I shift a disk to on the server SCSI bus, the underlying
device-name stays constant, but the client objects with a 'stale NFS filehandle'
error when the disk-position is changed, and I have to umount and remount at
the client. Its a slight improvement in that user-processes on the client
cant inadvertently use the wrong filesystem, but I would much prefer it to
be transparent. Is this possible with NFS


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux