NAME

Monitoring::Sneck::Checks::mount - checks file systems are mounted and writable

VERSION

Version 0.0.1

SYNOPSIS

mounts|perl:mount
data_mounted|perl:mount --no-fstab -p /data -p /backup
mounts_not_cd|perl:mount -i /media/cdrom

DESCRIPTION

Checks every file system in fstab is mounted, and that those not set ro there are not mounted read only, as one going read only after errors often goes unnoticed. Either is CRITICAL. Paths given with --path must be mounted too, but are not checked for being read only.

Swap is left alone. Entries that are noauto or x-systemd.automount are not expected to be mounted, though they are checked for being read only if they are.

Mounts are read from /proc/mounts on Linux and mount -p on FreeBSD. Other OSes are UNKNOWN, as is fstab not being readable unless --no-fstab is given.

OPTIONS

- -p, --path :: A path that must be a mount point. May be given more than once.

- -i, --ignore :: A mount point in fstab to leave alone. May be given more than once.

- -n, --no-fstab :: Only check --path, which must then be given.

METHODS

check

Does the check.

mounts

Returns what is mounted, as hash refs of path and options, a hash ref of each option to its value, or 1. Dies if it can not be found.