3

Yesterday, while trying to unmount our (davfs2 mounted) work webdav server from my filesystem, I got device is busy.

Running sudo lsof | grep /mountpoint/of/davfs, revealed that the culprit was updatedb. Running man updatedb revealed that this is a command run to update a database for mlocate, most probably invoked by cron.

While I sometimes use locate, i don't need it to include all files on our work server (we got other search tools for that), and I definitely do not want this to interfere with me unmounting the filesystem.

Bruni
  • 11,099

1 Answers1

9

Have you looked at man updatedb.conf? It seems possible that editing /etc/updatedb.conf may help control what is scanned. This is what my /etc/updatedb.conf looks like:

PRUNE_BIND_MOUNTS="yes"
# PRUNENAMES=".git .bzr .hg .svn"
PRUNEPATHS="/tmp /var/spool /media /home/.ecryptfs /var/lib/schroot"
PRUNEFS="NFS nfs nfs4 rpc_pipefs afs binfmt_misc proc smbfs autofs iso9660 ncpfs coda devpts ftpfs devfs mfs shfs sysfs cifs lustre tmpfs usbfs udf fuse.glusterfs fuse.sshfs curlftpfs ecryptfs fusesmb devtmpfs"

From man updatedb.conf:

PRUNENAMES A whitespace-separated list of directory names (without paths) which should not be scanned by updatedb

Bruni
  • 11,099
DK Bose
  • 44,553