我正在尝试设置 cachefilesd 以使用 NFS 共享的网络文件夹。
我似乎已经设置好了一切,但是 cachefilesd 启动正常,但是缓存却不起作用。
以下是我按相同顺序运行的命令的输出
1
sudo mount
...
cache-1:/mnt/datashared on /mnt/nfsshare type nfs (rw,sync,ac,acregmin=3,acregmax=60,acdirmin=30,acdirmax=300,lookupcache=pos,vers=3,fsc)
...
2
lsbmod | grep cachefiles
cachefiles 40555 1
fscache 57430 4 nfs,cifs,cachefiles,nfsv4
3
[edited - deleted]
4
uname -r
3.8.0-34-generic
5
grep CONFIG_NFS_FSCACHE /boot/config-3.8.0-34-generic
CONFIG_NFS_FSCACHE=y
6
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 13.04
Release: 13.04
Codename: raring
7
sudo service cachefilesd restart
* Restarting FilesCache daemon cachefilesd [ OK ]
8
dmesg
[6211206.141781] FS-Cache: Withdrawing cache "mycache"
[6211210.135236] FS-Cache: Cache "mycache" added (type cachefiles)
[6211210.135242] CacheFiles: File cache on sdb1 registered
[6214644.348929] CacheFiles: File cache on sdb1 unregistering
[6214644.348935] FS-Cache: Withdrawing cache "mycache"
[6214654.575909] FS-Cache: Cache "mycache" added (type cachefiles)
[6214654.575915] CacheFiles: File cache on sdb1 registered
9
ps aux | grep cachefilesd
root 65399 0.0 0.0 4460 540 ? Ss 23:14 0:00 /sbin/cachefilesd
1000 65464 0.0 0.0 8160 916 pts/0 S+ 23:16 0:00 grep --color=auto cachefilesd
最后,最大的问题是
10
cat /proc/fs/nfsfs/volumes
NV SERVER PORT DEV FSID FSC
v3 64476645 801 0:24 233e020f0da07a93 no
我觉得我已经正确配置了一切,但 FSC 挂载选项 + fscachefilesd 似乎不起作用
答案1
说什么cat /etc/default/cachefilesd
?
是否设置为开启?
# Defaults for cachefilesd initscript
# sourced by /etc/init.d/cachefilesd
# You must uncomment the run=yes line below for cachefilesd to start.
# Before doing so, please read /usr/share/doc/cachefilesd/howto.txt.gz as
# extended user attributes need to be enabled on the cache filesystem.
RUN=yes # <------ this line needs to be uncommented
# Additional options that are passed to the Daemon.
DAEMON_OPTS=""