Rev 244 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
megaraid,N - [Linux only] the device consists of one or more SCSI/SAS disks connected to a MegaRAID controller. The non-negative
integer N (in the range of 0 to 127 inclusive) denotes which disk on the controller is monitored. Use syntax such as:
smartctl -a -d megaraid,2 /dev/sda
smartctl -a -d megaraid,0 /dev/sdb
smartctl -a -d megaraid,0 /dev/bus/0
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
bus number.
The following entry in /proc/devices must exist:
For PERC2/3/4 controllers: megadevN
For PERC5/6 controllers: megaraid_sas_ioctlN
egrep '(megaraid_sas_ioctl)|(megadev)' /proc/devices
for i in 0 1 2 3 4 5 6 7 8 9 ; do smartctl -h -d megaraid,$i /dev/sda ; done
for i in 0 1 2 3 4 5 ; do smartctl -H -d megaraid,$i /dev/sda ; done
for i in 0 1 2 3 4 5 ; do smartctl -H -d megaraid,$i /dev/bus/0 ; done
my @devices = `smartctl --scan`;
chomp @devices;
while ( my $device = shift @devices ) {
if ( $device =~ m/([a-z0-9/]+)\s+(-d [^ ]+) # (.*)$/ ) {
$devices{$2}{$1} = $3;
} else {
die "could not parse [$device]\n";
}
}