NFS stale-filehandles

Roger Heflin rheflin at atipa.com
Mon Dec 18 22:47:48 UTC 2006


T. Horsnell wrote:

> 
> This is just the job. I dont even have to use udev to get
> persistent device names if I use LABEL= in fstab. One question
> though:
> 
> In the absence of an fsid= option, how does Linux compute a
> filesystem handle? Unless I know this, or unless I provide
> an fsid= option for *all* my exported filesystems, I risk
> choosing an id which may collide with the Linux-generated one.
> 
> Thanks,
> Terry
> 


Trond (nfs maintainer) indicated to someone
else on the kernel list:
  stat --printf "%D\n" /filesystem

Will print out the fsid for that filesystem on the
nfs server, the stat command does seem to have some
different arguements rather than --printf so if it yells
read the man page and change the arguement.

In situations where the major/minor could change, I add
fsid to all filesystems.

Also note that if you export the same filesystem twice
then it has the same fsid and only one set of permissions
ie both mounts are either rw or ro (probably whichever
is last), and if you use separate fsid's for each, the
permissions for each can now be different.

                            Roger




More information about the fedora-list mailing list