Nfs加入client端快取:cachefilesd

工作常用nfs,nfs雖方便,但連線環境不佳時會讓人抓狂,加進快取就可大幅改善此問題。試試cachefilesd吧。


1.安裝

 apt-get install cachefilesd

2.編輯/etc/default/cachefilesd,

RUN=yes

3.設定cachefilesd,設定檔在/etc/cachefilesd.conf

4.啟動cachefilesd

systemctl start cachefilesd

5.檢查執行狀態

/etc/init.d/cachefilesd status

6.如果沒有成功,檢查是否有載入module

lsmod |grep cachefiles

應顯示

cachefiles             36906  1
fscache                53874  2 cachefiles,nfs

若沒成功,則載入module

modprobe cachefiles

7.掛載時加入nfs參數fsc,/etc/fstab

  192.168.0.3:/doc /doc  nfs defaults,fsc 0 0 

或手動掛載

  mount 192.168.0.3:/doc /doc -o fsc

https://www.cyberciti.biz/faq/centos-redhat-install-configure-cachefilesd-for-nfs/

O

分類: 網路,標籤: , 。這篇內容的永久連結