cachefilesd doesn't work with multiple mounts from the same nfsv4 server
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cachefilesd (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
When mounting from two nfsv4 exports from the same server, the fsc-ness of whichever happens to be mounted first indicates the behavior of both, even if one has fsc and the other doesn't, or one as sync and the other async.
I discovered this when trying to figure out why my /var/cache/fscache wasn't filling up most of the time. All testing was done with a 12.04 server and clients running stock kernels.
root@kenya-i660:~# mount | grep nfs
root@kenya-i660:~# grep nfs /etc/fstab
192.168.0.52:/u /u nfs rw,noauto,
192.168.
root@kenya-i660:~# mount /u
root@kenya-i660:~# cat /proc/fs/
NV SERVER PORT DEV FSID FSC
v4 c0a80034 801 0:21 9129e38f7c164f3d yes
root@kenya-i660:~# umount /u
root@kenya-i660:~# mount /allafrica
root@kenya-i660:~# cat /proc/fs/
NV SERVER PORT DEV FSID FSC
v4 c0a80034 801 0:21 9129e38f7c164f3d no
root@kenya-i660:~# umount /allafrica
root@kenya-i660:~#
root@kenya-i660:~# mount /u
root@kenya-i660:~# mount /allafrica
root@kenya-i660:~# cat /proc/fs/
NV SERVER PORT DEV FSID FSC
v4 c0a80034 801 0:21 9129e38f7c164f3d yes
root@kenya-i660:~# umount /allafrica
root@kenya-i660:~# umount /u
root@kenya-i660:~#
root@kenya-i660:~# mount /allafrica
root@kenya-i660:~# mount /u
root@kenya-i660:~# cat /proc/fs/
NV SERVER PORT DEV FSID FSC
v4 c0a80034 801 0:21 9129e38f7c164f3d no
root@kenya-i660:~# umount /u
root@kenya-i660:~# umount /allafrica
root@kenya-i660:~# ssh ski@192.168.0.52 cat /etc/exports
/common/ 192.168.
/export 192.168.
/export/u 192.168.
/export/allafrica 192.168.
The problem here seems to be that the exports didn't have their own unique FSIDs. When I fixed that and restarted the nfs server, I got tewo entries in /proc/fs/ nfsfs/volumes, one with FSC and one without.
I still think is a bug - if you try to mount two filesystems, one with fsc and one without, but both have the same fsid, that should throw some error and refuse to mount.