Description |
MegaCLI Command |
System Commands |
Show the software version |
MegaCLI -v |
Show help information |
MegaCLI -help|-h|? |
Show the number of controllers connected |
MegaCLI -adpCount |
Controller Commands |
Show the status of properties related to the controllers |
MegaCli -AdpGetProp <PropertyName>-aN|-a0,1,2|-aALL The following properties can be used with this command: abortcconerror alarmdsply autodetectbackplanedsbl Autoenhancedimportdsply autosnapshotspace batwarndsbl bgirate bootwithpinnedcache cachebypass ccrate clusterenable coercionmode copybackdsbl Defaultldpspolicy defaultsnapshotspace defaultviewspace disableldpsinterval disableldpstime disableocr dsbl eccbucketcount eccbucketleakrate eccbucketsize enableeghsp enableesmarter enableeug| enablejbod enblspindownunconfigdrvs loadbalancemode maintainpdfailhistoryenbl ncqdsply patrolreadrate perfmode predfailpollinterval rebuildrate reconrate rstrhotspareoninsert smartcpybkenbl spindowntime spinupdelay spinupdrivecount spinupencdelay spinupencdrvcnt ssdsmartcpybkenbl usediskactivityforlocate usefdeonlyencrypt |
Set properties on the selected controllers |
Megacli -AdpSetProp <propertyname>-an|-a0,1,2|-aall The following properties can be set using this command: abortcconerror alarmdsply autodetectbackplanedsbl autoenhancedimportdsply autosnapshotspace batwarndsbl bgirate bootwithpinnedcache cachebypass ccrate clusterenable coercionmode copybackdsbl defaultldpspolicy defaultsnapshotspace defaultviewspace disableldpsinterval disableldpstime disableocr dsbl eccbucketcount eccbucketleakrate eccbucketsize enableeghsp enableesmarter enableeug| enablejbod enblspindownunconfigdrvs loadbalancemode maintainpdfailhistoryenbl ncqdsply patrolreadrate perfmode predfailpollinterval rebuildrate reconrate rstrhotspareoninsert smartcpybkenbl spindowntime spinupdelay spinupdrivecount spinupencdelay |
Set properties on the selected controllers |
autocarve=<on|off> autodetect=<on|off > disk=<p:-p>|all autorebuild=<on|off> carvesize=<1024..32768> dpmstat=<on|off> ondegrade=<cacheoff|follow> rebuild=<enable|disable|><1..5> rebuildmode=<adaptive|lowlatency> rebuildrate=<1..5> selftest=<enable|disable> spinup=<value> stagger=<value> verify=advanced|basic|<1..5> verify=basic [pref=ddd:hh]where hh={00..23} and ddd={mon|tue|wed|thu|fri|sat|sun} verify=enable|disable|<1..5> verifymode=<adaptive|lowlatency> verifyrate=<1..5> spinupencdrvcnt sdsmartcpybkenbl usediskactivityforlocate usefdeonlyencrypt |
Show the number of controllers connected |
MegaCLI -adpCount |
Show all information about the adapter, such as cluster state, BIOS, alarm, firmware, version, and so on |
MegaCli -AdpAllInfo -aN|-a0,1,2|-aALL |
Show the freespace available in the controller |
MegaCLI -CfgFreeSpaceinfo -aN|-a0,1,2|-aALL |
Download the controller firmware |
MegaCli -AdpFwFlash -f filename [-NoSigChk] [-NoVerChk] -aN|-a0,1,2|-aALL |
Show the preserved cache status |
MegaCLI-GetPreservedCacheList -aN|-a0,1,2|-aALL |
Set the controller time |
MegaCLI –AdpSetTime yyyymmdd hh:mm:ss -aN|-a0,1,2|-aALL |
Set the controller time |
MegaCLI –AdpGetTime -aN |
RAID Configuration commands |
Create a RAID configuration of RAID type 0, 1, 5, and 6 |
MegaCli –CfgLDAdd -R0|-R1|-R5|-R6[E0:S0,E1:S1,...] [WT|WB] [NORA|RA|ADRA] [Direct|Cached] [CachedBadBBU|NoCachedBadBBU] [-szXXXXXXXX [-szYYYYYYYY [... ]]] [-strpszM] [–Hsp[E5:S5,...]] [–afterLdX] -aN |
Create a CacheCade virtual drive |
MegaCLI -CfgCacheCadeAdd [-rX] -Physdrv[E0:S0,...] {-Name LdNamestring} [WT|WB|ForcedWB] [-assign -LX|L0,2,5..|LALL] -aN|-a0,1,2|-Aall |
Create a RAID configuration of RAID type 10, 50, and 60 |
MegaCli –CfgSpanAdd -aN|-a0,1,2|-aALL -R10|-R50|R60 –Array0[E0:S0,E1:S1,...] –Array1[E0:S0,E1:S1,...] [...] [WT | WB] [NORA | RA | ADRA] [Direct | Cached] [CachedBadBBU|NoCachedBadBBU] [-szXXXXXXXX [-szYYYYYYYY [... ]]] [-strpszM] [–afterLdX] -aN |
Delete a virtual drive |
MegaCli -CfgClr [-Force] -aN|-a0,1,2|-aALL |
Show the topology information of the drive group |
MegaCLI -CfgDsply -aN|-a0,1,2|-Aall |
Show information for a CacheCade virtual drive |
MegaCLI -CfgCacheCadeDsply -aN|-a0,1,2|-Aall |
Delete a virtual drive hosting the operating system |
MegaCLI -CfgLdDel -LX|-L0,2,5...|-LALL [-Force] -aN|-a0,1,2|-aALL |
Delete a CacheCade virtual drive |
MegaCLI -CfgCacheCadeDel -LX|-L0,2,5...|-LALL -aN|-a0,1,2|-Aall |
Show, delete, and import the foreign configuration commands |
MegaCli –CfgForeign –Scan | {-Preview | –Dsply| -Import | -Clear[FID]} -aN|-a0,1,2|-aALL" |
Patrol Read Commands |
Show the patrol read status and patrol read parameters, if any in progress |
MegaCli -AdpPR -info -aN|-a0,1,2|-aALL |
Set the patrol read options on a single adapter, multiple adapters, or all adapters (x = single controller) |
MegaCli -AdpPR –Dsbl|EnblAuto|EnblMan|Start|Stop| Info|Suspend|Resume|Stop| SSDPatrolReadEnbl | SSDPatrolReadDsbl |{SetDelay Val}|{-SetStartTime yyyymmdd hh}|{maxConcurrentPD Val} -aN|-a0,1,2|-aALL |
Disable patrol read |
MegaCli -AdpPR -Dsbl -aN|-a0,1,2|-aALL |
Enable automatic patrol read. |
MegaCli -AdpPR -EnblAuto -aN|-a0,1,2|-aALL |
Enable manual patrol read. |
MegaCli -AdpPR -EnblMan -aN|-a0,1,2|-aALL |
Start patrol read. |
MegaCli -AdpPR -Start -aN|-a0,1,2|-aALL |
Suspend a running patrol read |
MegaCli -AdpPR -Suspend -aN|-a0,1,2|-aALL |
Resume a suspended patrol read |
MegaCli -AdpPR -Resume -aN|-a0,1,2|-aALL |
Stop a running patrol read |
MegaCli -AdpPR -Stop -aN|-a0,1,2|-aALL |
Include SSD drives in patrol read |
MegaCli -AdpPR -SSDPatrolReadEnbl -aN|-a0,1,2|-aALL |
Exclude SSD drives in patrol read |
MegaCli -AdpPR -SSDPatrolReadDsbl -aN|-a0,1,2|-aALL |
Delay a patrol read |
MegaCli -AdpPR -SetDelay Val -aN|-a0,1,2|-aALL |
Schedule a patrol read |
MegaCli -AdpPR -SetStartTime yyyymmdd hh -aN|-a0,1,2|-aALL |
Set the value for maximum concurrent physical drives for the patrol read |
MegaCli -AdpPR -maxConcurrentPD Val -aN|-a0,1,2|-aALL |
Consistency Check Commands |
Schedule a consistency check |
MegaCLI -AdpCcSched -Dsbl|-Info| {-ModeConc | -ModeSeq [-ExcludeLD -LN|-L0,1,2] [-SetStartTime yyyymmdd hh ] [-SetDelay val ] } -aN|-a0,1,2|-aALL |
Show consistency check status and consistency parameters, in progress, if any |
MegaCLI -AdpCcSched -Info |
OPROM BIOS Commands |
Schedule a consistency check |
MegaCli -AdpBIOS -Dsply -aN|-a0,1,2|-aALL |
Show consistency check status and consistency parameters, if any in progress |
MegaCli -AdpBootDrive {-Set {-Lx|-physdrv[E0:S0]}} -aN|-a0,1,2|-aALL |
Sets the BIOS properties for the controller |
MegaCli -AdpBIOS -Enbl | -Dsbl | -Dsply | SOE | BE EnblAutoSelectBootLd | DsblAutoSelectBootLd -aN|-a0,1,2|-aALL |
Battery (BBU) Commands |
Show battery-related information |
MegaCli -AdpBbuCmd -aN|-a0,1,2|-aALL |
Show the battery learn properties |
MegaCli -AdpBbuCmd -GetBbuProperties -aN|-a0,1,2|-aALL |
Show the battery information, firmware status, and the gas gauge status |
MegaCli -AdpBbuCmd -GetBbuStatus -aN|-a0,1,2|-aALL |
Show battery capacity information |
MegaCli -AdpBbuCmd -GetBbuCapacityInfo -aN|-a0,1,2|-aALL |
Show battery design information |
MegaCli -AdpBbuCmd -GetBbuDesignInfo -aN|-a0,1,2|-aALL |
Set battery properties |
MegaCli -AdpBbuCmd -SetBbuProperties -f <fileName> -aN|-a0,1,2|-aALL |
Start battery learn cycle |
MegaCli -AdpBbuCmd -BbuLearn -aN|-a0,1,2|-aALL |
Set the battery to low power storage mode |
MegaCli -AdpBbuCmd -BbuMfgSleep -aN|-a0,1,2|-aALL |
Seal the gas gauge EEPROM write access |
MegaCli -AdpBbuCmd -BbuMfgSeal -aN|-a0,1,2|-aALL |
Security Commands |
Set the key ID for the controller |
MegaCli -CreateSecurityKey -SecurityKey sssssssssss | [-Passphrase sssssssssss] | [-KeyID kkkkkkkkkkk] -aN |
Change the security key for the controller |
MegaCli -ChangeSecurityKey -OldSecurityKey sssssssssss | -SecurityKey sssssssssss| [-Passphrase sssssssssss] | [-KeyID kkkkkkkkkkk] -aN |
Delete the security key |
MegaCLI -DestroySecurityKey | [-Force] -aN |
Set the security key for the controller |
MegaCli -SetKeyID -KeyID kkkkkkkkkkk -aN |
Virtual Drive Commands |
Show the virtual drive information |
MegaCli –LDInfo –Lx|-L0,1,2|-Lall -aN|-a0,1,2|-aALL |
Set virtual drive properties |
MegaCli –LDSetProp WT|WB|NORA|RA|ADRA|-Cached|Direct| CachedBadBBU|NoCachedBadBBU| -RW|RO|Blocked |{-Name nameString} | -EnDskCache|DisDskCache –Lx| -L0,1,2|-Lall -aN|-a0,1,2|-aALL |
Set power-saving (dimmer switch) properties |
MegaCli -LDSetPowerPolicy -Default| -Automatic| -None| -Maximum| -MaximumWithoutCaching -Lx|-L0,1,2|-Lall -aN|-a0,1,2|-aALL |
Show virtual drive expansion information |
MegaCli -getLdExpansionInfo -Lx|-L0,1,2|-Lall -aN|-a0,1,2|-aALL |
Expand the virtual drive within the existing array; also use if you replace the drives with larger drives, beyond the size of the existing array |
MegaCli -LdExpansion -pN -dontExpandArray -Lx|-L0,1,2|-Lall -aN|-a0,1,2|-aALL |
Secure the virtual drive |
MegaCLI –LDMakeSecure -Lx|-L0,1,2,...|-Lall –An |
Show specific properties of virtual drives |
MegaCli –LDGetProp -Cache|-Access|-Name|-DskCache -Lx|-L0,1,2|-Lall -aN|-a0,1,2|-aALL |
Start virtual drive initialization |
MegaCli –LDInit –Start [Fast|Full] -Lx|-L0,1,2|-Lall -aN|-a0,1,2|-aALL |
Stop a running virtual drive initialization. |
MegaCli –LDInit -Abort -Lx|-L0,1,2|-Lall -aN|-a0,1,2|-aALL |
Show the initialization progress |
MegaCli –LDInit –ShowProg -Lx|-L0,1,2|-Lall -aN|-a0,1,2|-aALL |
Start a consistency check on an uninitialized virtual drive |
MegaCli –LDCC –Start –Lx|-L0,1,2|-Lall -aN|-a0,1,2|-aALL |
Start, stop, suspend, resume, and show the progress of a consistency check operation |
MegaCli -LDCC -Start|-Abort|-Suspend|-Resume|-ShowProg| -ProgDsply -Lx|-L0,1,2|-LALL -aN|-a0,1,2|-aALL |
Enable/disable automatic background initialization. Show, stop, pause, resume, and show the progress of the background initialization |
MegaCLI -LDBI -Enbl|-Dsbl| -getSetting|-Abort|-Suspend|-Resume|-ShowProg|-ProgDsply -Lx|-L0,1,2|-LALL -aN|-a0,1,2|-Aall |
Start and show progress for a migrate operation |
MegaCli –LDRecon {–Start –Rx [Add|Rmv PhysDrv[E0:S0,E1:S1,...] ] } | –ShowProg|-ProgDsply –Lx –aN |
Delete preserved cache |
MegaCLI -DiscardPreservedCache -Lx|-L0,1,2|-Lall -force -aN|-a0,1,2|-aALL |
Assign the CacheCade virtual drive |
MegaCLI -Cachecade -assign|-remove -Lx|-L0,1,2|-LALL -aN|-a0,1,2|-aALL |
Physical Drive Commands |
Show drive information |
MegaCli -pdInfo -PhysDrv[E0:S0,E1:S1,...] -aN|-a0,1,2|-aALL |
Start, stop, suspend, or resume an ongoing rebuild operation. |
MegaCLI PDRbld -Start|-Stop|-Suspend|-Resume| -ShowProg|-ProgDsply -PhysDrv[E0:S0,E1:S1,...] -aN|-a0,1,2|-aALL |
Start, stop, pause, resume, or show the progress of a copyback operation |
MegaCLI PDCpyBk -Start|-Stop |-Suspend|-Resume| -ShowProg|-ProgDsply -PhysDrv[E0:S0,E1:S1,...] -aN|-a0,1,2|-aALL |
Mark a drive as missing |
MegaCli -PdMarkMissing -physdrv[E0:S0,E1:S1,...] -aN|-a0,1,2|-aALL |
Show missing drive information |
MegaCli -PdGetMissing -aN|-a0,1,2|-aALL |
Replace the configured drive that is identified as missing, and then start an automatic rebuild |
MegaCli -PdReplaceMissing -physdrv[E0:S0] -arrayA, -rowB -aN |
Set the drive state to online |
MegaCli –PDOnline -PhysDrv[E0:S0,E1:S1....] -aN|-a0,1,2 |
Set the drive state to offline |
MegaCli –PDOffline -PhysDrv[E0:S0,E1:S1....] -aN|-a0,1,2|-aALL |
Set the drive state to JBOD |
MegaCli –PDMakeGood -PhysDrv[E0:S0,E1:S1....] -aN|-a0,1,2|-aALL |
Add and delete hotspare drives |
MegaCli –PDHSP {–Set [{-Dedicated -ArrayN |-Array0,1...}] [-EnclAffinity] [-nonRevertible] } |-Rmv -PhysDrv[E0:S0,E1:S1,...] -aN|-a0,1,2|-aALL |
Start, stop, pause, resume or show the progress of an initialization process |
MegaCli –PDClear -Start |-Stop|-ShowProg |-ProgDsply - PhysDrv[E0:S0,E1:S1....] -aN|-a0,1,2|-aALL |
Start a drive locate and activate (blink) the drive’s LED or stop a drive locate (LED blinking) and deactivate the drive’s LED |
MegaCli –PDLocate {[-start] |-stop} -physdrv[E0:S0,E1:S1,...] -aN|-a0,1,2|-aALL |
Spin down an unconfigured drive and prepare it for removal or spin up spun-down drive and mark the drive state as unconfigured good |
MegaCli -PDPrpRmv [-Undo] -PhysDrv[E0:S0,E1:S1....] -aN|-a0,1,2|-aALL |
Show physical drive information of all connected drives |
MegaCli –PDList -aN|-a0,1..|-aAll |
Flash the physical drive firmware |
MegaCLI PdFwDownload[offline] [ForceActivate] {[-SataBridge] -PhysDrv[0:1]}| {-EncdevId[devId1]} -f <filename> -aN|-a0,1,2|-Aall |
Erase the drive's security configuration and securely erase data on a drive |
MegaCli -PDInstantSecureErase -PhysDrv[E0:S0,E1:S1,...] | [-Force] -aN|-a0,1,2|-aALL |
Show the security key for secured physical drives |
MegaCli -GetKeyID [-PhysDrv[E0:S0]] -aN |
Start, stop, and show the progress of a secure erase operation |
MegaCli -SecureErase Start[ Simple| [Normal [ |ErasePattern ErasePatternA|ErasePattern ErasePatternA ErasePattern ErasePatternB]]|[Thorough [ |ErasePattern ErasePatternA|ErasePattern ErasePatternA ErasePattern ErasePatternB]]] | Stop| ShowProg| ProgDsply [-PhysDrv [E0:S0,E1:S1,...] | -Lx|-L0,1,2|-LALL] -aN|-a0,1,2|-aALL |
Enable/disable the direct physical drive mapping mode. Show the current state of the direct physical drive mapping. |
MegaCLI DirectPdMapping -Enbl|-Dsbl|-Dsply -aN|-a0,1,2|-Aall |
Enclosure Commands |
Show enclosure information |
MegaCli –EncInfo -aN|-a0,1,2|-aALL |
Show enclosure status |
MegaCli –EncStatus -aN|-a0,1,2|-aALL |
PHY Commands |
Show PHY information |
MegaCli –PHYInfo -phyM -aN|-a0,1,2|-aALL |
Set PHY link speed |
MegaCLI PhySetLinkSpeed -phyM -speed -aN|-a0,1,2|-aALL |
Show the PHY error counters. |
Megacli PhyErrorCounters -An |
Alarm Commands |
Show alarm properties |
MegaCli -AdpGetProp AlarmDsply -aN|-a0,1,2|-aALL |
Set alarm properties |
MegaCli -AdpSetProp AlarmEnbl|AlarmDsbl|AlarmSilence -aN|-a0,1,2|-aALL |
Event Log Properties Commands |
Show event logs. |
MegaCli -AdpEventLog -GetEventLogInfo -aN|-a0,1,2|-aALL |
Show the specified type of event logs. |
MegaCli -AdpEventLog -GetEvents {-info -warning -critical -fatal} {-f <fileName>} -aN|-a0,1,2|-aALL |
Show the specified event logs |
MegaCli -AdpEventLog -GetSinceShutdown {-info -warning -critical -fatal} {-f <fileName>} -aN|-a0,1,2|-aALL |
Delete the event logs. |
MegaCli -AdpEventLog -Clear -aN|-a0,1,2|-aALL |
Premium Feature Key Commands |
Show the Safe ID of the controller |
MegaCli -ELF -GetSafeId -a0 |
Show the Advanced Software Options that are enabled on thecontroller, including the ones in trial mode. |
MegaCli -ELF –ControllerFeatures -a0 |
Apply the Activation Key in preview mode. |
MegaCli -ELF -Applykey key –val -preview -a0 |
Apply the Activation Key |
MegaCli -ELF -Applykey key –val -a0 |
Deactivate the trial key |
MegaCli -ELF –DeactivateTrialKey -a0 |
Show the re-host information and, if re-hosting is necessary, show the controller and key vault serial numbers. |
MegaCli -ELF -ReHostInfo -a0 |
Indicate to the controller that the re-host is complete |
MegaCli -ELF -ReHostComplete -a0 |