[Linux-cachefs] Weird fsc mount option behaviour

Jean-Baptiste Denis jbdenis at pasteur.fr
Fri Apr 26 14:07:09 UTC 2013


Hello,

I'm using Centos 6.4 / 2.6.32-358.6.1.el6.x86_64.

Long story short (steps to reproduce with a nfs server on localhost at
the end) :

I've got an NFS server that share multiple directory. If I mount one
directory using -o fsc, everything is fine. If I mount
another directory, it also have the fsc option, even if I didn't specify
it (and the caching is effective).

If I restart from scratch, mount the first directory without the "fsc"
option and mount the second directory with the "fsc" option,
the second mount does not honor the fsc option : /etc/mtab show the fsc
option, but not /proc/mounts.

Here is some steps to reproduce the problem on a local machine, without
involving a distant NFS server.

$ # install necessary package to be a nfs server
$ echo "/usr/local/share 127.0.0.1(ro,no_root_squash,no_subtree_check)"
| sudo tee -a /etc/exports
$ sudo exportfs -a
$ sudo mkdir /tmp/mount
$ sudo mount -o fsc,vers=3 127.0.0.1:/usr/local/share /tmp/mount # using
fsc option !
$ grep /tmp/mount /etc/mtab
127.0.0.1:/usr/local/share /tmp/mount nfs rw,fsc,vers=3,addr=127.0.0.1 0 0
$ grep /tmp/mount /proc/mounts
127.0.0.1:/usr/local/share /tmp/mount nfs
rw,relatime,vers=3,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=127.0.0.1,mountvers=3,mountport=38779,mountproto=udp,fsc,local_lock=none,addr=127.0.0.1
0 0 # FSC OPTION IS PRESENT

So far, so good =) Let's try to add a second share :

$ echo "/var 127.0.0.1(ro,no_root_squash,no_subtree_check)" | sudo tee
-a /etc/exports
$ sudo exportfs -a
$ sudo mkdir /tmp/mount2
$ sudo mount -o vers=3 127.0.0.1:/var /tmp/mount2 # NOT using fsc option
$ grep /tmp/mount2 /etc/mtab
127.0.0.1:/var /tmp/mount2 nfs rw,vers=3,addr=127.0.0.1 0 0 # no fsc option
$ grep /tmp/mount2 /proc/mounts
127.0.0.1:/var /tmp/mount2 nfs
rw,relatime,vers=3,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=127.0.0.1,mountvers=3,mountport=38779,mountproto=udp,fsc,local_lock=none,addr=127.0.0.1
0 0 # FSC OPTION IS PRESENT, WEIRD


If I reverse the situation (first mount without "fsc", and the second
with the "fsc" option), the second mount does not have the fsc option,
although I've requested the option.

Here is the output of the /proc/fs/nfsfs/volumes in the case of the
first mount using the fsc option :

$ cat /proc/fs/nfsfs/volumes
NV SERVER   PORT DEV     FSID              FSC
v3 7f000001  801 0:21    5d0a2a7754517409  yes

In the second case (first mount without fsc, and second one with fsc
option) :

$ cat /proc/fs/nfsfs/volumes
NV SERVER   PORT DEV     FSID              FSC
v3 7f000001  801 0:20    5d0a2a7754517409  no

How should I interpret that ? Is that a limitation I didn't understand
in the first place ?

Regards,

Jean-Baptiste




More information about the Linux-cachefs mailing list