cachefilesd doesn't work with multiple mounts from the same nfsv4 server

Bug #1196674 reported by ski on 2013-07-01
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
cachefilesd (Ubuntu)
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,noatime,async,hard,intr,nfsvers=4,timeo=14,bootwait,_netdev,fsc 0 0
192.168.0.52:/allafrica /allafrica nfs rw,noauto,noatime,sync,hard,intr,nfsvers=4,timeo=14,_netdev 0 0
root@kenya-i660:~# mount /u
root@kenya-i660:~# cat /proc/fs/nfsfs/volumes
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/nfsfs/volumes
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/nfsfs/volumes
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/nfsfs/volumes
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.0.0/255.255.254.0(rw,no_root_squash,sync,no_subtree_check)

/export 192.168.0.0/16(ro,fsid=0,no_subtree_check)
/export/u 192.168.0.0/16(rw,no_root_squash,nohide,insecure,no_subtree_check,async)
/export/allafrica 192.168.0.0/16(rw,no_root_squash,nohide,insecure,no_subtree_check,sync)

ski (skibrianski) wrote :

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.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in cachefilesd (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers