153 |
rodolico |
1 |
megaraid,N - [Linux only] the device consists of one or more SCSI/SAS disks connected to a MegaRAID controller. The non-negative
|
|
|
2 |
integer N (in the range of 0 to 127 inclusive) denotes which disk on the controller is monitored. Use syntax such as:
|
|
|
3 |
smartctl -a -d megaraid,2 /dev/sda
|
|
|
4 |
smartctl -a -d megaraid,0 /dev/sdb
|
|
|
5 |
smartctl -a -d megaraid,0 /dev/bus/0
|
|
|
6 |
This interface will also work for Dell PERC controllers. It is possible to set RAID device name as /dev/bus/N, where N is a SCSI
|
|
|
7 |
bus number.
|
|
|
8 |
|
|
|
9 |
The following entry in /proc/devices must exist:
|
|
|
10 |
For PERC2/3/4 controllers: megadevN
|
|
|
11 |
For PERC5/6 controllers: megaraid_sas_ioctlN
|
|
|
12 |
|
|
|
13 |
egrep '(megaraid_sas_ioctl)|(megadev)' /proc/devices
|
|
|
14 |
|
|
|
15 |
for i in 0 1 2 3 4 5 6 7 8 9 ; do smartctl -h -d megaraid,$i /dev/sda ; done
|
|
|
16 |
|
|
|
17 |
|
|
|
18 |
for i in 0 1 2 3 4 5 ; do smartctl -H -d megaraid,$i /dev/sda ; done
|
|
|
19 |
|
|
|
20 |
|
|
|
21 |
for i in 0 1 2 3 4 5 ; do smartctl -H -d megaraid,$i /dev/bus/0 ; done
|
|
|
22 |
|
|
|
23 |
|
|
|
24 |
my @devices = `smartctl --scan`;
|
|
|
25 |
chomp @devices;
|
|
|
26 |
|
|
|
27 |
while ( my $device = shift @devices ) {
|
|
|
28 |
if ( $device =~ m/([a-z0-9/]+)\s+(-d [^ ]+) # (.*)$/ ) {
|
|
|
29 |
$devices{$2}{$1} = $3;
|
|
|
30 |
} else {
|
|
|
31 |
die "could not parse [$device]\n";
|
|
|
32 |
}
|
|
|
33 |
}
|