RAID for cosharps-pxmx-01 is set up on device /dev/sda as RAID6. You can manage RAID on the machine with the storcli and smartctl commands.


Here are some useful commands:


Check the status of all drives:

storcli /c0 /eall /sall show all | awk '/^0:/{print "EID:Slot="$1,"DID="$2,"State="$3}'


View Errors for disk 2:

smartctl -a -d megaraid,2 /dev/sda


Show LED indicator for the drive: (Controller 0, Enclosure 0, Slot 2)

storcli /c0 /e0 /s2 start locate 
storcli /c0 /e0 /s2 stop locate 

After replacing a drive

You must get rid of the old log file for that drive so it doesn't report errors again. 


Example: 


For a drive with the serial number JK11A8B9J992GL 


Find the file /var/lib/smartmontools/smartd.Hitachi_HDS722020ALA330-JK11A8B9J992GL.ata.state~ (or something similar) and delete it. 


View the serial number for drive 11 at the top of the output:

sudo smartctl -a -d megaraid,11 /dev/sda

Also note that the Device ID (DID) of the drive does not match the slot that it is in. The above command targets device 11 which is in physical slot 2:

storcli /c0 /eall /sall show all | awk '/^0:/{print "EID:Slot="$1,"DID="$2,"State="$3}'

EID:Slot=0:0 DID=9 State=Onln
EID:Slot=0:1 DID=16 State=Onln
EID:Slot=0:2 DID=11 State=Onln <----
EID:Slot=0:3 DID=14 State=Onln
EID:Slot=0:4 DID=2 State=Onln
EID:Slot=0:5 DID=15 State=Onln
EID:Slot=0:6 DID=7 State=Onln
EID:Slot=0:7 DID=13 State=Onln
EID:Slot=0:8 DID=3 State=Onln
EID:Slot=0:9 DID=6 State=Onln
EID:Slot=0:10 DID=10 State=Onln
EID:Slot=0:11 DID=5 State=Onln
EID:Slot=0:12 DID=8 State=Onln
EID:Slot=0:13 DID=1 State=Onln
EID:Slot=0:14 DID=12 State=Onln
EID:Slot=0:15 DID=4 State=Onln