mlocate and nfs

RobFantini

Famous Member
May 24, 2012
2,092
118
133
Boston,Mass
on some of our pve hosts we've had emails about failed mlocate cron jobs.

the fix for us is to include /mnt in PRUNEPATHS :
Code:
cat updatedb.conf
PRUNE_BIND_MOUNTS="yes"
# PRUNENAMES=".git .bzr .hg .svn"
PRUNEPATHS="/mnt /tmp /var/spool /media"
PRUNEFS="NFS nfs nfs4 rpc_pipefs afs binfmt_misc proc smbfs autofs iso9660 ncpfs coda devpts ftpfs devfs mfs shfs sysfs cifs lustre_lite tmpfs usbfs udf fuse.glusterfs fuse.sshfs"

and kill -9 any running updatedb process

after that test :
Code:
time /etc/cron.daily/mlocate


real    1m11.534s
user    0m1.574s
sys     0m6.329s

Note that the nfs mounts should have already been excluded with this:
Code:
PRUNEFS="NFS nfs nfs4 rpc_pipefs afs binfmt_misc proc smbfs autofs iso9660 ncpfs coda devpts ftpfs devfs mfs shfs sysfs cifs lustre_lite tmpfs usbfs udf fuse.glusterfs fuse.sshfs"
but that is not the case.
 
Last edited: