Revision as of 10:58, 6 July 2022 by Tony (talk | contribs) (→‎Links)


Megaraid command line tool

Drive mappings

Shown as Disk0 (Slot number 0) by megacli

Enclosure Device ID: 10 Slot Number: 0 Enclosure position: 0 Device Id: 13 Sequence Number: 11 Media Error Count: 0 Other Error Count: 0 Inquiry Data: X9O1S0V1S5HHTOSHIBA HDWD240 KQ000A

In smart it's

/dev/bus/0 -d sat+megaraid,13


Show all info

MegaCli -AdpAllInfo -a0

Show all drives

MegaCli -PDList -aALL


Virtual/physical drives

megaCli -LdPdInfo -a0


Show BBU status

megacli -AdpBbuCmd -a0 -nolog

request BBU learn cycle

MegaCli -AdpBbuCmd -BbuLearn -a0

Show array status

MegaCli -LdInfo L1 -a0 -nolog


Locate one drive

Where '6' is the Slot Number from pdlist/pdfino and '252'  the Enclosure device id.

MegaCli64 -PdLocate -start -physdrv \[252:6\] -a0

Silence alarm

MegaCli -AdpSetProp AlarmSilence -aALL


Primary-5, Secondary-0, RAID Level Qualifier-3

Replace a drive

MegaCli -PDOffline -PhysDrv \[E:S\] -aN
MegaCli -PDMarkMissing -PhysDrv \[E:S\] -aN
MegaCli -PDPrpRmv -PhysDrv [E:S] -aN

Unexpected sense: .... Sense: 5/24/00

These are SCSI sense codes:

Sense key: 5
Sense code: 24
Sense qualifier: 0