Re: NFS stale-filehandles

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

 



>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

Roger, thanks for this pointer. My 'stat' (FC6 updated as of today)
seems to have some oddities. To get filesystem-id as opposed to
device-id I have to:

 stat --printf "%i\n" -f /filesystem

and when I do this all my filesystem-id's are zero.

 stat --printf "%D\n" /filesystem

gets me a device-id which seems to be 256*majorno+minorno

Maybe I should try and contact Trond.

>
>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.

Do you mean that an /etc/exports which contains:

  /fs1 client1(rw,fsid=1) client2(ro,fsid=1)

will be readonly by client1 and client2, whereas

  /fs1 client1(rw,fsid=1) client2(ro,fsid=2)

will be rw by client1 and ro by client2 ?

I wonder what happens with:

  /fs1 client1(rw,fsid=1) client2(ro)
or
  /fs1 client1(rw) client2(ro,fsid=1)

maybe I'll do the experiment, but I wish there was a spec for
this. Undocumented properties have a habit of changing at the
drop of a kernel version.

Cheers,
Terry.


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

  Powered by Linux