Megacli: Difference between revisions

From DWIKI
mNo edit summary
mNo edit summary
Line 1: Line 1:
= Links =
*[http://erikimh.com/megacli-cheatsheet/ MegaCli Cheat sheet]
*[https://www.ibm.com/support/pages/megaraid-storage-manager-reports-unexpected-sense-codes-servers Unexpected Sense codes]


= Megaraid command line tool =
= Megaraid command line tool =
Line 8: Line 13:
*[http://www.lsi.com/DistributionSystem/AssetDocument/files/docs/techdocs/storage_stand_prod/sas/embedded_mr_sw_ug.pdf http://www.lsi.com/DistributionSystem/AssetDocument/files/docs/techdocs/storage_stand_prod/sas/embedded_mr_sw_ug.pdf]  
*[http://www.lsi.com/DistributionSystem/AssetDocument/files/docs/techdocs/storage_stand_prod/sas/embedded_mr_sw_ug.pdf http://www.lsi.com/DistributionSystem/AssetDocument/files/docs/techdocs/storage_stand_prod/sas/embedded_mr_sw_ug.pdf]  
*[https://www.advancedclustering.com/act_kb/replacing-a-disk-with-megacli/ Replacing a disk with megacli]  
*[https://www.advancedclustering.com/act_kb/replacing-a-disk-with-megacli/ Replacing a disk with megacli]  
*[https://raid.wiki.kernel.org/index.php/Hardware_Raid_Setup_using_MegaCli Megacli on Linux]
*[https://raid.wiki.kernel.org/index.php/Hardware_Raid_Setup_using_MegaCli Megacli on Linux]  


= Drive mappings =
= Drive mappings =
Line 22: Line 27:
  /dev/bus/0 -d sat+megaraid,13
  /dev/bus/0 -d sat+megaraid,13


=Commands=
= Commands =
==Show all info==
 
== Show all info ==
 
  MegaCli -AdpAllInfo -a0
  MegaCli -AdpAllInfo -a0


==Show all drives==
== Show all drives ==
 
  MegaCli -PDList -aALL
  MegaCli -PDList -aALL


 
== Virtual/physical drives ==


==Virtual/physical drives==
  megaCli -LdPdInfo -a0
  megaCli -LdPdInfo -a0


 
 


== Show BBU status ==
== Show BBU status ==
Line 39: Line 49:
  megacli -AdpBbuCmd -a0 -nolog
  megacli -AdpBbuCmd -a0 -nolog


==Show array status==
== Show array status ==
 
  MegaCli -LdInfo L1 -a0 -nolog
  MegaCli -LdInfo L1 -a0 -nolog


 
 


== Locate one drive ==
== Locate one drive ==
Line 50: Line 61:
  MegaCli64 -PdLocate -start -physdrv \[252:6\] -a0
  MegaCli64 -PdLocate -start -physdrv \[252:6\] -a0


 


= FAQ =
= FAQ =
Line 56: Line 68:


[https://globalroot.wordpress.com/2013/06/18/megacli-raid-levels/ https://globalroot.wordpress.com/2013/06/18/megacli-raid-levels/]
[https://globalroot.wordpress.com/2013/06/18/megacli-raid-levels/ https://globalroot.wordpress.com/2013/06/18/megacli-raid-levels/]
     
 
== Replace a drive ==
== Replace a drive ==
  MegaCli -PDOffline -PhysDrv \[E:S\] -aN
  MegaCli -PDOffline -PhysDrv \[E:S\] -aN
  MegaCli -PDMarkMissing -PhysDrv \[E:S\] -aN
  MegaCli -PDMarkMissing -PhysDrv \[E:S\] -aN
  MegaCli -PDPrpRmv -PhysDrv [E:S] -aN
  MegaCli -PDPrpRmv -PhysDrv [E:S] -aN

Revision as of 09:29, 7 December 2020

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

Commands

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

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

 

FAQ

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

https://globalroot.wordpress.com/2013/06/18/megacli-raid-levels/

Replace a drive

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