megacli, ambiguous documentation

mathog <[email protected]> Fri, 01 Sep 2017 10:51:23 -0700
Newsgroups gmane.linux.utilities.smartmontools
Message-ID <[email protected]>
Smartctl 5.43 on Centos 6.

I just discovered to my chagrin that in this command

   smartctl -a  /dev/sda -d sat+megaraid,7

the 7 corresponds to the Device ID, not the slot number.  This is 
unfortunate
because the megacli commands which are used to replace a disk are all in
terms of [Enclosure:Slot Number].  In many cases slots are 1:1 with 
Device IDs,
but I just tried to replace an iffy disk 7 (from the smartctl output)
in an array which had this mapping:

Slot Number Device Id
0           0
1           3
2           1
3           2
4           7
5           4
6           5
7           6

Here Device ID 7 is Slot Number 4, so the wrong disk (Device ID 6) was
removed when [64:7] was used with the megacli commands.   The problem 
was discovered when the same smartctl command was run again and the 
serial number had not changed!  So the original disk was put back in.  
Hopefully the iffy one at Device ID 7 can hang on long enough for the 
RAID rebuild to complete.

Anyway, smartctl -h says:

   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.

"which disk" is ambiguous.  It should say:

   range of 0 to 127 inclusive) denotes the Device ID (not the slot 
number)
   on the controller which is monitored.

Assuming of course that it is always the Device ID rather than the slot 
number
which is used.

Regards,

David Mathog
[email protected]
Manager, Sequence Analysis Facility, Biology Division, Caltech

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot