Zimbra: /snap/core at 100% – Disable Disk Space Monitoring for Loop Devices
I recently logged into the Admin mail account of a Zimbra mail server I manage to see if there was anything noticeable to look at. It’s not an account I log in much, since it usually only holds daily reports and email notifications when services stop and start.
Well, what a surprise when I suddenly see over a million emails in the inbox! 1.000.000! And to my surprise, the subject of 99% of them was a variations of the following:
Disk /snap/core/13425 at 100% on mail.domain.com:
Disk /snap/certbot/2192 at 100% on mail.domain.com:
Disk /snap/canonical-livepatch/146 at 100% on mail.domain.com:
Disk /snap/core20/1518 at 100% on mail.domain.com:
And the content of these emails was basically one line like the ones you usually find in the log files, eg:
mail zimbramon: 22102:crit: Disk warning: mail.domain.com: /snap/canonical-livepatch/146 on device /dev/loop6 at 100%
mail zimbramon: 22102:crit: Disk warning: mail.domain.com: /snap/core/13425 on device /dev/loop3 at 100%
This is caused because Zimbra monitors the existing disks and alerts when these are full, but these /dev/loopX disks have nothing to do with Zimbra and don´t need to be monitored. They are automatically created if you have snap installed and they all are read-only disks. You can see these disks if you run the command df -h:
Since this issue is not critical, but the emails can very quickly become very annoying, the best thing to do is to exclude all these loop devices from Zimbras monitoring. This can be achieved by running the following command as the Zimbra user (run su - zimbra as root):
Update the command with the loop devices you see on your server. After this, restart the stat data collectors by running:
This should solve your issue.
Upon restart of the server or over time you might find new/different loop devices and the emails for these coming in again. If this happens, just run the above commands again updating the list of devices to exclude.