Network and Systems Management

check_mounts.sh

Description:

Verifies the current mounts correspond to those defined in /etc/fstab.
Return 0 [OK] if true, 1 [WARNING] if mounted but has no matching entry in /etc/fstab and 2 [CRITICAL] if an /etc/fstab entry is not currently mounted.
Supports: NFS3, NFS4, CIFS, SMBFS and S3FS mounts.

Sample usage:
$ ./check_mounts.sh

OUTPUT:
/etc/fstab and /proc/mounts are not identical 🙁

Critical: these are not mounted but do appear in /etc/fstab:
+//10.0.0.3/my_vol /mnt/my_vol

Current Version

0.4

Last Release Date

2012-11-02

Compatible With

Owner

License

GPL


Project Files
Project Notes
Verifies the current mounts correspond to those defined in /etc/fstab. Return 0 [OK] if true, 1 [WARNING] if mounted but has no matching entry in /etc/fstab and 2 [CRITICAL] if an /etc/fstab entry is not currently mounted. Supports: NFS3, NFS4, CIFS, SMBFS and S3FS mounts. Sample usage: $ ./check_mounts.sh OUTPUT: /etc/fstab and /proc/mounts are not identical :( Critical: these are not mounted but do appear in /etc/fstab: +//10.0.0.3/my_vol /mnt/my_vol CHANGELOG: 04/19/2012 04:56:00 PM EDT: - Added support for nfs4 [patch by Michael Hübner m.huebner@reinform.de] 11/02/2012 05:07:00 PM EDT: - Added support for s3fs 12/08/2013 06:21:00 PM EDT: - Added test to touch a file in the mount, will only be checked if timeout util exists - Fixed EOL prints
Reviews (0) Add a Review
Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
0 (0)
Favorites
0
Views
96,275