I have just had to resolve an issue with the mlocate search tool on a backup server.
The machine is a small (10GB) VM with an iSCSI volume presented to it for data that is backed up. It turns out the mlocate DB had grown to an excessive size (>1GB!) because it had been including this file system in it’s nightly DB refresh.
This meant that the /var file system ended up running out of space, which was causing all kinds of problems:
- The nightly mlocate DB refresh task could not complete.
- Emails could not be sent as the spool directory for sendmail could not be written to.
- Log files could not be written to.
- Performing a system update with
yumwas not possible.
My solution was to:
- Remove all files from the
- Open the mlocate configuration file,
/etc/updatedb.confand edit the
PRUNEPATHSdirective; adding the backup file system,
/srvto the list of paths that are excluded from being indexed.