分類
彙整
- 2023 年 10 月 (3)
- 2021 年 4 月 (1)
- 2021 年 2 月 (13)
- 2021 年 1 月 (5)
- 2020 年 12 月 (63)
- 2020 年 6 月 (1)
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