This morning I arrived to find our backup servers root file system full. This is very strange as the backups all go onto a second btrfs disk which has loads of space left.
The root file system was using the full ~40Gb of disk even though the backup runs a single python script using rsync and btrfs snapshots and these backups go onto a second disk not the root filesystem.
apt-get autoremove --purge to see if there was anything left behind but it removed nothing.
/home were all fine too.
I then started walking the largest directory using du -sh to find the largest directories.
This showed that mlocate was using lots of disk.
Our backup system uses btrfs and creates a snapshot every night so from the mlocate view it was adding our whole backup size every night.
I simply had to add our
/mnt/btrfs directory to the
/etc/updatedb.conf. Below shows the
PRUNEPATHS before and after my change.
updatedb again the disk usage dropped to this :
/var/lib/mlocate.db was massive due to lots of btrfs snapshots, added backup directory
PRUNEPATHS variable in
/etc/updatedb.conf and then ran