Permalink
Browse files

fixed monitor-health command for pools containing cache and log devices

  • Loading branch information...
phreaker0 committed Jul 6, 2018
1 parent 2224866 commit ba3836ec520efc30689238e294de1d1c2026fc1b
Showing with 6 additions and 1 deletion.
  1. +6 −1 sanoid
View
7 sanoid
@@ -976,6 +976,11 @@ sub check_zpool() {
## other cases
my ($dev, $sta) = /^\s+(\S+)\s+(\S+)/;
if (!defined($sta)) {
# cache and logs are special and don't have a status
next;
}
## pool online, not degraded thanks to dead/corrupted disk
if ($state eq "OK" && $sta eq "UNAVAIL") {
$state="WARNING";
@@ -1111,7 +1116,7 @@ sub checklock {
# make sure lockfile contains something
if ( -z $lockfile) {
# zero size lockfile, something is wrong
die "ERROR: something is wrong! $lockfile is empty\n";
die "ERROR: something is wrong! $lockfile is empty\n";
}
# lockfile exists. read pid and mutex from it. see if it's our pid. if not, see if

0 comments on commit ba3836e

Please sign in to comment.