Linux Check Mounted Disks Nagios Plugin

For my own use as much as anyone elses… One of the problems that’s haunted me at least once per company I’ve worked at as a tech is “the disappearing partition”. It’s there, it’s accessible, and it should be persistent across boots. But it isn’t! The machine reboots and then you discover that the database partition is no longer visible.

The check mounted disks Nagios plugin looks at the mounted partitions and compares them to what’s in /etc/fstab (minus a couple of things like cd drives, floppy disks, swap partitions etc). And warns if there are any discrepancies that’ll bite you on a reboot. It also round trips and makes sure what /etc/fstab thinks is mounted is actually there.