Aug 192016

NFSLinux can be equiped with CacheFS which is developed by David Howells. CacheFS is designed to operate on Network File System mounts and you will need to install the cachefilesd package which contains the CacheFiles userspace management daemon. The cachefilesd daemon manages the cached files and directories that are used by network filesystems such as NFS to perform persistent caching to a local disk.

NFS server /etc/exports


NFS client /etc/rc.local

modprobe cachefiles

NFS client mount eg

/home/nfs -fstype=nfs,rw,noatime,fsc

CacheFiles /etc/cachefilesd.conf

dir /home/fscache
tag mycache
brun 20%
bcull 14%
bstop 6%
frun 20%
fcull 14%
fstop 6%

CacheFiles on tmpfs – CentOS 6.8 using tmpfs on /mnt/fscache and fscache on /home/fscache eg


mount | grep fscache || mount -t tmpfs -o size=2048m tmpfs /mnt/fscache
ls /mnt/fscache/disk0 || dd if=/dev/zero of=/mnt/fscache/disk0 bs=1M count=2046
sleep 15
ls /mnt/fscache/disk0 && echo 'y' | mkfs.ext4 /mnt/fscache/disk0
mount /mnt/fscache/disk0 /home/fscache -t ext4 -o loop,user_xattr



 Leave a Reply

© 2011 Indimon Internet Services

Site last updated November 1, 2019 @ 9:36 am; This content last updated August 21, 2016 @ 1:58 pm

Return to Top ▲Return to Top ▲