mirror of https://github.com/jimsalterjrs/sanoid
Merge pull request #241 from phreaker0/fix-health-check-with-special
fixed monitor-health command for pools containing cache and log devices
This commit is contained in:
commit
9ca09d516e
7
sanoid
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
|
||||
|
|
|
|||
Loading…
Reference in New Issue