1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +00:00

fix - mdadm has '--readonly' option to make the array 'active (read-only)'

This commit is contained in:
Ken-ichi Mito 2015-05-04 17:52:50 +09:00
parent 2670e4dc26
commit 9845279a30

View file

@ -35,10 +35,12 @@ my(@text) = <$mdstat>;
close($mdstat);
my($devinfo_re, $devstat_re, $action_re) = (
'(md\d+)\s+:\s+active\s+(\(auto-read-only\)\s+|)(\w+)\s+(.*)',
'(md\d+)\s+:\s+active\s+(\(read-only\)\s+|\(auto-read-only\)\s+|)(\w+)\s+(.*)',
'.*\[(\d+)\/(\d+)]\s+\[(\w+)]',
'(.*(check|resync)\s=\s+(\d+\.\d+)%)',
);
# Interestingly, swap is presented as "active (auto-read-only)"
# and mdadm has '--readonly' option to make the array 'active (read-only)'
my($dev, $type, $members, $nmem, $nact, $status, $proc);
while (@text) {