Skip to content

Instantly share code, notes, and snippets.

@k14i
Last active December 17, 2015 18:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save k14i/5651547 to your computer and use it in GitHub Desktop.
Save k14i/5651547 to your computer and use it in GitHub Desktop.
cachefilesd properly works with Gluster's NFS, not only with kernel's one. It would be a waste not to match them up :-) #glusterfs https://twitter.com/keithseahus/status/337902379762601984
#!/usr/bin/env bash
NFS_SERVER=192.168.1.100
MOUNT_POINT=/mnt/nfs
yum install -y cachefilesd
if test `grep 'SELINUX=disabled' /etc/selinux/config > /dev/null; echo $?` -ne 0; then
sed -i 's/^secctx/#secctx/g' /etc/cachefilesd.conf
fi
chkconfig cachefilesd on
service cachefilesd start
mount -t nfs -o fsc,vers=3 $NFS_SERVER $MOUNT_POINT
# NOTE: Files under $MOUNT_POINT should be cached for read if you read() them once.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment