#
# does _not_ check raid status. use arrayprobe for that.
-# Copyright (c) 2008 Peter Palfrader <peter@palfrader.org>
+# Copyright (c) 2008,2009 Peter Palfrader <peter@palfrader.org>
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
for (@$ctrlallshow) {
chomp;
next if /^$/;
- if (/in Slot ([0-9]+) /) {
+ if (/in Slot ([0-9a-z]+)/) {
push @controllers, $1;
next;
};
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)(?:, spare)?\)$/) {
+ } elsif (/^ *physicaldrive (\S+) .* (OK|Predictive Failure|Failed|Rebuilding)(?:, (?:active )?spare)?\)$/) {
my $drive = $1;
my $status = $2;
push @{$status{$status}}, $drive;
my $type;
if ($drive =~ /^[0-9]+:[0-9]+$/) { # scsi drives
$type = 'SCSI';
- } elsif ($drive =~ /^[0-9]+I:[0-9]+:[0-9]+$/) { # SAS
+ } elsif ($drive =~ /^[0-9]+[EI]:[0-9]+:[0-9]+$/) { # SAS
$type = 'SAS';
+ } elsif ($drive =~ /^[0-9]+[C]:[0-9]+:[0-9]+$/) { # New 6GBPS SAS
+ $type = 'SAS+';
} else {
# I'm not going to run pass arguments of unknown form to the shell..
warn ("Unknown diskdrive ID $drive\n");
} elsif ($type eq 'SAS') {
$key = 'PHY Transfer Rate';
if ($value{'PHY Count'} eq '2') {
- $expected = '3.0GBPS, Unknown';
+ if (defined($value{'Redundant Path(s)'})) {
+ $expected = '3.0GBPS, 3.0GBPS';
+ } else {
+ $expected = '3.0GBPS, Unknown';
+ }
} else {
$expected = '3.0GBPS';
}
+ } elsif ($type eq 'SAS+') {
+ $key = 'PHY Transfer Rate';
+ if ($value{'PHY Count'} eq '2') {
+ $expected = '6.0GBPS, Unknown';
+ } else {
+ $expected = '6.0GBPS';
+ }
} else {
warn "Should not be here. Do not know what to do with type '$type'\n";
next;