Rather than getting confused by
physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SAS, 146 GB, OK, active spare for 1I:1:1)
treat it the same as "active spare".
push @{$status{'Failed'}}, $1;
} elsif (/^Error: The specified controller does not have any physical drives on it.$/) {
$nodrives = 1;
- } elsif (/^ *physicaldrive (\S+) .* (OK|Predictive Failure|Failed|Rebuilding)(?:, (?:active )?spare)?\)$/) {
+ } elsif (/^ *physicaldrive (\S+) .* (OK|Predictive Failure|Failed|Rebuilding)(?:, (?:active )?spare.*)?\)$/) {
my $drive = $1;
my $status = $2;
push @{$status{$status}}, $drive;