diff options
author | Jesse Luehrs <doy@tozt.net> | 2018-11-30 01:29:58 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2018-11-30 01:29:58 -0500 |
commit | 38ac74234e646e73c88f98b41d327a0ff1a872dd (patch) | |
tree | 493f8462b035b6e750ce22690455ce883c4f344f /modules/partofme/files | |
parent | 8a7d39c3e63ba7e81a8eb2276b2e16b489fb08cc (diff) | |
download | puppet-tozt-38ac74234e646e73c88f98b41d327a0ff1a872dd.tar.gz puppet-tozt-38ac74234e646e73c88f98b41d327a0ff1a872dd.zip |
add a cron to check if there were any raid scrub errors
Diffstat (limited to 'modules/partofme/files')
-rw-r--r-- | modules/partofme/files/raid-scrub-check | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/partofme/files/raid-scrub-check b/modules/partofme/files/raid-scrub-check new file mode 100644 index 0000000..f754067 --- /dev/null +++ b/modules/partofme/files/raid-scrub-check @@ -0,0 +1,10 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use 5.020; + +my $sysfs_file = '/sys/block/md127/md/mismatch_cnt'; +chomp(my $count = do { local $/; open my $fh, '<', $sysfs_file or die "couldn't open $sysfs_file"; <$fh> }); +if ($count > 0) { + die "saw a mismatch count of $count"; +} |