Print a warning if foreign DG detected

This commit is contained in:
Georg Schönberger
2014-10-20 12:30:47 +02:00
parent db812a7758
commit d0201be2d2

View File

@@ -491,7 +491,7 @@ sub getPhysicalDevices{
}
if(defined($currBlock)){
# If a drive is not in a group, a - is at the DG column
if($line =~ /^\d+\:\d+\s+\d+\s+\w+\s+[0-9-]+.*/){
if($line =~ /^\d+\:\d+\s+\d+\s+\w+\s+[0-9-F]+.*/){
@splittedLine = map { s/^\s*//; s/\s*$//; $_; } split(/\s+/,$line);
# The current block is the c0/e252/s0 name
$line_ref->{'pd'} = $currBlock;
@@ -613,6 +613,12 @@ sub getPDStatus{
push @{$statusLevel_a[1]}, $PD->{'pd'}.'_SMART_flag';
}
}
if(exists($PD->{'DG'})){
if($PD->{'eq'} eq 'F'){
$status = 'Warning';
push @{$statusLevel_a[1]}, $PD->{'pd'}.'_DG';
}
}
if(exists($PD->{'Drive Temperature'})){
my $temp = $PD->{'Drive Temperature'};
if($temp ne 'N/A' && $temp ne '0C (32.00 F)'){