Nfs

Cachefilesd (cachefiles) 一切似乎都設置好了,還是不行

  • March 15, 2022

我正在嘗試設置 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 

tl;dr 我想我已經正確配置了一切,但 FSC 掛載選項 + fscachefilesd 似乎不起作用

說什麼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=""

引用自:https://serverfault.com/questions/602203