Re: nfs - stale file handles

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

 



On 11/29/2016 07:37 AM, Tom Horsley wrote:
> On Tue, 29 Nov 2016 10:05:15 -0500
> bruce wrote:
> 
>> On the clientside easy enough to automate a process/logic to every so
>> often do a umount/remount process on the individual client.
> 
> That will work, but it is pretty heavy handed, and "umount -l"
> is almost always necessary because something, somewhere, on the
> system is always referencing the remote file and it will refuse
> a normal "umount" (and umount -f has to time out for hours before
> it forces the unmount).
> 
> I get this crap all them time when a symlink changes on the
> server, and the client doesn't see the change (which isn't supposed
> to be a problem, but is). Usually removing the symlink, doing
> an "ls -lL' on the client to convince it that it is gone,
> then recreating it on the server works.
> 
> I've never been able to understand how it is that NFS is so
> widely used, yet so broken.

You have to stop expecting a NAS (network attached storage) volume to
behave like a local device. It is a completely independent device and
not under control of your client's kernel. Many of the internal
notification mechanisms you rely on simply aren't there because there
is no way to implement them reliably (inotify, open file counts and
such). Some of these things you don't even know you're using on a
native volume. Look at the issues involved in sharing a file with
read/write access among separate processes on the same machine. Now
multiply that by a hundred, add in network latency issues and you'll
see it's "a fine kettle of fish".

A big cause of stale handles and such is due to the various client
caches. Yes, the caches speed things up and can reduce network usage,
but with these benefits come trade-offs. Because it's a cache and items
can change on the server--either directly on the server or by other
clients' activities--the client may find that the NAS has "changed"
since the last time it updated its cache.

That's the nature of NAS--be it NFS, CIFS, WebDAV, whatever. If you
really can't tolerate these things, you can usually disable much of the
client-side cache when the filesystem is mounted. You'll take a
performance hit and you'll flog the network much harder, but the stale
filehandle issue will be reduced. You won't eliminate it, but it'll be
better.
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer, AllDigital    ricks@xxxxxxxxxxxxxx -
- AIM/Skype: therps2        ICQ: 226437340           Yahoo: origrps2 -
-                                                                    -
----------------------------------------------------------------------
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]
  Powered by Linux