Monday, February 3, 2014

MegaCli

Managing LSI Raid Cards
Docs:
General Parameters
  • Adapter parameter -aN
    The parameter -aN (where N is a number starting with zero or the string ALL) specifies the adapter ID. If you have only one controller it’s safe to use ALL instead of a specific ID, but you’re encouraged to use the ID for everything that make changes to your RAID configuration.
  • Physical drive parameter -PhysDrv [E:S]
    For commands that operate on one or more pysical drives, the -PhysDrv [E:S] parameter is used, where E is the enclosure device ID in which the drive resides and S the slot number (starting with zero). You can get the enclosure device ID using MegaCli -EncInfo -aALL. The E:S syntax is also used for specifying the physical drives when creating a new RAID virtual drive.
  • Virtual drive parameter -Lx
    The parameter -Lx is used for specifying the virtual drive (where x is a number starting with zero or the string all).

Gather information
  • Controller information
    # MegaCli -AdpAllInfo -aALL # MegaCli -CfgDsply -aALL # MegaCli -AdpEventLog -GetEvents -f events.log -a0 -nolog # MegaCli -fwtermlog -dsply -a0
  • Enclosure information
    # MegaCli -EncInfo -aAll
  • Virtual drive information
    # MegaCli -LDInfo -Lall -aALL
  • Physical drive information
    # MegaCli -PDList -aALL # MegaCli -PDInfo -PhysDrv [E:S] -aALL
  • Battery backup information
    # MegaCli -AdpBbuCmd -aALL
  • Show Consistancy check progress

  • Background initialization (ongoing processes)
    # MegaCli -LDBI -ShowProg|-ProgDsply -aAll
    Set background initialization rate to 90%
    # MegaCli -AdpSetProp BgiRate 90 -aAll

Controller Management
  • Silence active alarm
    MegaCli -AdpSetProp AlarmSilence -aALL
  • Disable alarm
    MegaCli -AdpSetProp AlarmDsbl -aALL
  • Enable alarm
    MegaCli -AdpSetProp AlarmEnbl -aALL
  • Disable battery backup warning on system boot
    MegaCli -AdpSetProp BatWarnDsbl -a0
  • Change adpater rebuild rate to 60%
    MegaCli -AdpSetProp {RebuildRate -60} -aALL
Virtual Drive Management
  • Create RAID 0,1,5 drive
    MegaCli -CfgLdAdd -r(0|1|5) [E:S, E:S, ...] -aN
  • Create RAID 10 drive
    MegaCli -CfgSpanAdd -r10 -Array0[E:S,E:S] -Array1[E:S,E:S] -aN
  • Remove drive
    MegaCli -CfgLdDel -Lx -aN
Physical Drive Management
  • Set state to offline
    MegaCli -PDOffline -PhysDrv [E:S] -aN
  • Set state to online
    MegaCli -PDOnline -PhysDrv [E:S] -aN
  • Mark as missing
    MegaCli -PDMarkMissing -PhysDrv [E:S] -aN
  • Prepare for removal
    MegaCli -PdPrpRmv -PhysDrv [E:S] -aN
  • Show missing drive
    MegaCli -PDGetMissing -a0
  • Replace missing drive
    MegaCli -PdReplaceMissing -PhysDrv [E:S] -ArrayN -rowN -aN
    * The number N of the array parameter is the Span Reference you get using 
    MegaCli -CfgDsply -aALL and the number N of the row parameter is the Physical Disk in that span or array starting with zero (it’s not the physical disk’s slot!).
  • Rebuild drive, drive status should be "Firmware state: Rebuild"
    # MegaCli -PDRbld -Start|-Stop|-ShowProg|-ProgDsply -PhysDrv [E:S] -aN
  • Clear drive
    MegaCli -PDClear -Start|-Stop|-ShowProg -PhysDrv [E:S] -aN
  • Bad to good
    MegaCli -PDMakeGood -PhysDrv[E:S] -aN
  • Blink the fron LED to help locate a particular drive
    # MegaCli -AdpSetProp \{UseDiskActivityforLocate -1\}  -aALLMegaCli -PdLocate -start -physdrv\[E:S\]  -aALL
    Stop the blinking
    MegaCli -PdLocate -stop  -physdrv\[E:S\]  -aALL

Hot Spare Management
  • Set global hot spare
    MegaCli -PDHSP -Set -PhysDrv [E:S] -aN
  • Remove hot spare
    MegaCli -PDHSP -Rmv -PhysDrv [E:S] -aN
  • Set dedicated hot spare
    MegaCli -PDHSP -Set -Dedicated -ArrayN,M,... -PhysDrv [E:S] -aN

Rebuild a drive that is marked 'Foreign' when inserted:

  1. Bad to Good
    MegaCli -PDMakeGood -PhysDrv [E:S]  -aALL
  2. Clear foreign setting
    MegaCli -CfgForeign -Scan -aALL
    MegaCli -CfgForeign -Clear -aALL
  3. set global hot spare
    MegaCli -PDHSP -Set -PhysDrv [E:S] -aN
MegaCli -PDList -aAll | grep --before-context=12 Firmware Find drive that the "Firmware state" is not "online"

Change/Replace a drive

  1. Enable autorebuild
    # # MegaCli -AdpAutoRbld -Enbl -a0
  2. set the drive offline
    MegaCli -PDOffline -PhysDrv [E:S] -aN
  3. mark the drive as missing
    MegaCli -PDMarkMissing -PhysDrv [E:S] -aN
  4. prepare drive for removal
    MegaCli -PDPrpRmv -PhysDrv [E:S] -aN
  5. change/replace the drive
  6. if you are using hot spares, the replaced drive should become new hot spare
    MegaCli -PDHSP -Set -PhysDrv [E:S] -aN
    if you are not using hot spares, you must re-add the new drive to your RAID virtual drive and start the rebuilding
    MegaCli -PdReplaceMissing -PhysDrv [E:S] -ArrayN -rowN -aN
    MegaCli -PDRbld -Start -PhysDrv [E:S] -aN

To identify the problem drive:
  • Gather information:
    MegaCli -LDInfo -Lall -aALL
    MegaCli -PDList -a0
    MegaCli -CfgDsply -aALL
    MegaCli -AdpGetProp AlarmDsply -aAll
    MegaCli -LDCC -ShowProg -L0 -a0 -Nolog
    MegaCli -FwTermLog -Dsply -a0
  • Locate a physical drive: MegaCli64 -PdLocate -start -physdrv [E:S] -a0
  • To Clear Terminal Log: MegaCli -FwTermLog -Clear -aN
  • Check battery status: MegaCli -AdpBbuCmd -aAll
  • Check BBU (battery backup unit) status:
    MegaCli -AdpBbuCmd -GetBbuStatus -a0 -NoLog | egrep 'charge|battery'
  • Work with bad BBU: MegaCli -LDSetProp CachedBadBBU -LAll -aAll -NoLog
  • To find enclosure IDs: MegaCli -EncInfo -aN
  • To view a particular physical drive: MegaCli -pdinfo -PhysDrv [E:S] -aN
  • To replace a drive:
    MegaCli -PDOffline -PhysDrv [E:S] -aN
    MegaCli -PDMarkMissing -PhysDrv [E:S] -aN
    MegaCli -PDPrpRmv -PhysDrv [E:S] -aN
    ** swap the drive **
    MegaCli -PdReplaceMissing -PhysDrv [E:S] -ArrayN -rowN -aN
    Note: The number N of the array parameter is the Span Reference you get using MegaCli -CfgDsply -aALL and the number N of the row parameter is the Physical Disk in that span which you are replacing, not the slot number. S is the slot number of the NEW disk.
    For example: to replace physical disk 0 in span 1 using disk ID 25 you would use the following command: MegaCli -PdReplaceMissing -PhysDrv [:25] -Array1 -row0 -a0
Warning: Drive rebuilds do not start automatically! You have to actually tell the controller to start rebuilding the drive.
MegaCli -PDRbld -Start -PhysDrv [E:S] -aN
To rebuild a drive that has a "foreign" configuration:
  • Mark the drive as good: MegaCli -PDMakeGood -PhysDrv [E:S] -aALL
  • Clear the foreign setting: MegaCli -CfgForeign -Clear -a0
  • Set global hot spare - drive should start rebuilding after this:
    MegaCli -PDHSP -Set -PhysDrv [E:S] -aN
  • Stop consistency check:MegaCli -LDCC -Abort -L0 -a0 -Nolog
  • Silence Alarm Beeps: MegaCli -AdpSetProp -AlarmSilence -aN
  • Show Rebuild Status:
    watch -n 10 /opt/MegaRAID/MegaCli/MegaCli64 -PDRbld -ShowProg PhysDrv [E:S] -a0
-----
Dump the log file
${megacli} -fwtermlog -dsply -aall > /tmp/ttylog.txt
~/tmp $ grep -n ErrLba ttylog.txt
    The ErrLba= indicates a hardware error on the specified block.  It seems
    the raid controller attempted to read the data, and found it to be
    corrupted.  But, it then wrote it back, and all is now okay again


~/tmp $ grep -n orrected ttylog.txt
    if it sees many of these errors (many being a loose
    definition which varies from disk to disk) the controller will raise a
    predictive failure error.  Until then, we ignore it.

----------


~]# MegaCLI -help
 
      MegaCLI SAS RAID Management Tool  Ver 1.01.39 Aug 01, 2007
 
    (c)Copyright 2007, LSI Logic Corporation, All Rights Reserved.
${megacli} -v 
${megacli} -help|-h|? 
${megacli} -adpCount 
${megacli} -AdpSetProp {CacheFlushInterval -val}|{ RebuildRate -val} 
    |{PatrolReadRate -val}|{BgiRate -val}|{CCRate -val} 
    |{ReconRate -val}|{SpinupDriveCount -val}|{SpinupDelay -val} 
    |{CoercionMode -val}|{ClusterEnable -val}|{PredFailPollInterval -val} 
    |{BatWarnDsbl -val} |{EccBucketSize -val} | {EccBucketLeakRate -val} 
    |{AbortCCOnError val} | AlarmEnbl | AlarmDsbl | AlarmSilence -aN|-a0,1,2|-aALL 
${megacli} -AdpGetProp CacheFlushInterval | RebuildRate | PatrolReadRate | BgiRate 
    | CCRate | ReconRate | SpinupDriveCount | SpinupDelay | CoercionMode
    | PredFailPollInterval | EccBucketSize | EccBucketLeakRate | EccBucketCount
    | ClusterEnable | BatWarnDsbl | AbortCCOnError | AlarmDsply -aN|-a0,1,2|-aALL 
${megacli} -AdpAllInfo -aN|-a0,1,2|-aALL  
${megacli} -AdpGetTime -aN|-a0,1,2|-aALL  
${megacli} -AdpSetTime yyyymmdd hh:mm:ss -aN   
${megacli} -AdpSetVerify -f fileName -aN|-a0,1,2|-aALL  
${megacli} -AdpBIOS -Enbl |-Dsbl | -SOE | -BE | -Dsply -aN|-a0,1,2|-aALL 
${megacli} -AdpBootDrive {-Set -Lx}|-Get -aN|-a0,1,2|-aALL 
${megacli} -AdpAutoRbld -Enbl|-Dsbl|-Dsply -aN|-a0,1,2|-aALL
${megacli} -AdpCacheFlush -aN|-a0,1,2|-aALL
${megacli} -AdpPR -Dsbl|EnblAuto|EnblMan|Start|Stop|Info|{SetDelay Val} 
         -aN|-a0,1,2|-aALL
${megacli} -AdpCcSched -Dsbl|-Info|{-ModeConc | -ModeSeq [-ExcludeLD -LN|-L0,1,2]
   [-SetStartTime yyyymmdd hh ] [-SetDelay val ] } -aN|-a0,1,2|-aALL
${megacli} -AdpCcSched -SetStartTime yyyymmdd hh -aN|-a0,1,2|-aALL
${megacli} -AdpCcSched -SetDelay val  -aN|-a0,1,2|-aALL
${megacli} -FwTermLog -BBUoff|BBUoffTemp|BBUon|BBUGet|Dsply|Clear -aN|-a0,1,2|-aALL
${megacli} -AdpShutDown -aN|-a0,1,2|-aALL
${megacli} -PDList -aN|-a0,1,2|-aALL 
${megacli} -PDGetNum -aN|-a0,1,2|-aALL 
${megacli} -pdInfo -PhysDrv[E0:S0,E1:S1,...] -aN|-a0,1,2|-aALL  
${megacli} -PDOnline  -PhysDrv[E0:S0,E1:S1,...] -aN|-a0,1,2|-aALL 
${megacli} -PDOffline -PhysDrv[E0:S0,E1:S1,...] -aN|-a0,1,2|-aALL 
${megacli} -PDMakeGood -PhysDrv[E0:S0,E1:S1,...] -aN|-a0,1,2|-aALL 
${megacli} -PDHSP {-Set [-Dedicated [-ArrayN|-Array0,1,2...]] [-EnclAffinity] [-nonRevertible]} 
         |-Rmv -PhysDrv[E0:S0,E1:S1,...] -aN|-a0,1,2|-aALL 
${megacli} -PDRbld -Start|-Stop|-ShowProg |-ProgDsply 
        -PhysDrv [E0:S0,E1:S1,...] -aN|-a0,1,2|-aALL  
${megacli} -PDClear -Start|-Stop|-ShowProg |-ProgDsply 
        -PhysDrv [E0:S0,E1:S1,...] -aN|-a0,1,2|-aALL  
${megacli} -PdLocate {[-start] | -stop} -physdrv[E0:S0,E1:S1,...] -aN|-a0,1,2|-aALL 
${megacli} -PdMarkMissing -physdrv[E0:S0,E1:S1,...] -aN|-a0,1,2|-aALL 
${megacli} -PdGetMissing -aN|-a0,1,2|-aALL 
${megacli} -PdReplaceMissing -physdrv[E0:S0] -arrayA, -rowB -aN 
${megacli} -PdPrpRmv [-UnDo] -physdrv[E0:S0] -aN|-a0,1,2|-aALL  
${megacli} -EncInfo -aN|-a0,1,2|-aALL 
${megacli} -PhyInfo -phyM -aN|-a0,1,2|-aALL  
${megacli} -LDInfo -Lx|-L0,1,2|-Lall -aN|-a0,1,2|-aALL 
${megacli} -LDSetProp  {-Name LdNamestring} | -RW|RO|Blocked | WT|WB|RA|NORA|ADRA 
        | Cached|Direct | -EnDskCache|DisDskCache | CachedBadBBU|NoCachedBadBBU
        -Lx|-L0,1,2|-Lall -aN|-a0,1,2|-aALL 
${megacli} -LDGetProp  -Cache | -Access | -Name | -DskCache -Lx|-L0,1,2|-LALL  
        -aN|-a0,1,2|-aALL 
${megacli} -LDInit {-Start [-full]}|-Abort|-ShowProg|-ProgDsply -Lx|-L0,1,2|-LALL -aN|-a0,1,2|-aALL 
${megacli} -LDCC -Start|-Abort|-ShowProg|-ProgDsply -Lx|-L0,1,2|-LALL -aN|-a0,1,2|-aALL 
${megacli} -LDBI -Enbl|-Dsbl|-getSetting|-Abort|-ShowProg|-ProgDsply -Lx|-L0,1,2|-LALL -aN|-a0,1,2|-aALL  
${megacli} -LDRecon {-Start -rX [{-Add | -Rmv} -Physdrv[E0:S0,...]]}|-ShowProg|-ProgDsply 
        -Lx -aN 
${megacli} -LdPdInfo -aN|-a0,1,2|-aALL 
${megacli} -LDGetNum -aN|-a0,1,2|-aALL 
${megacli} -CfgLdAdd -rX[E0:S0,E1:S1,...] [WT|WB] [NORA|RA|ADRA] [Direct|Cached]
        [CachedBadBBU|NoCachedBadBBU] [-szXXX [-szYYY ...]]
        [-strpszM] [-Hsp[E0:S0,...]] [-AfterLdX] -aN 
${megacli} -CfgEachDskRaid0 [WT|WB] [NORA|RA|ADRA] [Direct|Cached] 
        [CachedBadBBU|NoCachedBadBBU] [-strpszM] -aN|-a0,1,2|-aALL
${megacli} -CfgClr -aN|-a0,1,2|-aALL 
${megacli} -CfgDsply -aN|-a0,1,2|-aALL 
${megacli} -CfgLdDel -LX|-L0,2,5...|-LALL -aN|-a0,1,2|-aALL 
${megacli} -CfgFreeSpaceinfo -aN|-a0,1,2|-aALL 
${megacli} -CfgSpanAdd -r10 -Array0[E0:S0,E1:S1] -Array1[E0:S0,E1:S1] [-ArrayX[E0:S0,E1:S1] ...] 
        [WT|WB] [NORA|RA|ADRA] [Direct|Cached] [CachedBadBBU|NoCachedBadBBU]
        [-szXXX[-szYYY ...]][-strpszM][-AfterLdX] -aN
${megacli} -CfgSpanAdd -r50 -Array0[E0:S0,E1:S1,E2:S2,...] -Array1[E0:S0,E1:S1,E2:S2,...] 
        [-ArrayX[E0:S0,E1:S1,E2:S2,...] ...] [WT|WB] [NORA|RA|ADRA] [Direct|Cached] 
        [CachedBadBBU|NoCachedBadBBU][-szXXX[-szYYY ...]][-strpszM][-AfterLdX] -aN
${megacli} -CfgSave -f filename -aN   
${megacli} -CfgRestore -f filename -aN   
${megacli} -CfgForeign -Scan -aN|-a0,1,2|-aALL    
${megacli} -CfgForeign -Dsply [x] -aN|-a0,1,2|-aALL    
${megacli} -CfgForeign -Preview [x] -aN|-a0,1,2|-aALL    
${megacli} -CfgForeign -Import [x] -aN|-a0,1,2|-aALL    
${megacli} -CfgForeign -Clear [x] -aN|-a0,1,2|-aALL    
        x - index of foreign configurations. Optional. All by default. 
${megacli} -AdpEventLog -GetEventLogInfo -aN|-a0,1,2|-aALL 
${megacli} -AdpEventLog -GetEvents         -f  -aN|-a0,1,2|-aALL 
${megacli} -AdpEventLog -GetSinceShutdown  -f  -aN|-a0,1,2|-aALL 
${megacli} -AdpEventLog -GetSinceReboot    -f  -aN|-a0,1,2|-aALL 
${megacli} -AdpEventLog -IncludeDeleted    -f  -aN|-a0,1,2|-aALL 
${megacli} -AdpEventLog -GetLatest n -f  -aN|-a0,1,2|-aALL 
${megacli} -AdpEventLog -GetCCIncon -f  -LX|-L0,2,5...|-LALL -aN|-a0,1,2|-aALL 
${megacli} -AdpEventLog -Clear -aN|-a0,1,2|-aALL 
${megacli} -AdpBbuCmd -aN|-a0,1,2|-aALL  
${megacli} -AdpBbuCmd -GetBbuStatus -aN|-a0,1,2|-aALL  
${megacli} -AdpBbuCmd -GetBbuCapacityInfo -aN|-a0,1,2|-aALL  
${megacli} -AdpBbuCmd -GetBbuDesignInfo -aN|-a0,1,2|-aALL  
${megacli} -AdpBbuCmd -GetBbuProperties -aN|-a0,1,2|-aALL  
${megacli} -AdpBbuCmd -BbuLearn -aN|-a0,1,2|-aALL  
${megacli} -AdpBbuCmd -BbuMfgSleep -aN|-a0,1,2|-aALL  
${megacli} -AdpBbuCmd -BbuMfgSeal -aN|-a0,1,2|-aALL  
${megacli} -AdpBbuCmd -SetBbuProperties -f  -aN|-a0,1,2|-aALL 
${megacli} -AdpFacDefSet -aN 
${megacli} -AdpFwFlash -f filename [-NoSigChk] [-NoVerChk] -aN|-a0,1,2|-aALL  
${megacli} -AdpGetConnectorMode -ConnectorN|-Connector0,1|-ConnectorAll -aN|-a0,1,2|-aALL  
${megacli} -AdpSetConnectorMode -Internal|-External -ConnectorN|-Connector0,1|-ConnectorAll -aN|-a0,1,2|-aALL  
${megacli} -PhyErrorCounters -aN|-a0,1,2|-aALL  
${megacli} -DirectPdMapping -Enbl|-Dsbl|-Dsply -aN|-a0,1,2|-aALL  
 
    Note: The directly connected drives can be specified as [:S] 
 
    Wildcard '?' can be used to specify the enclosure ID for the drive in the 
      only enclosure without direct connected device or the direct connected 
      drives with no enclosure in the system.
 
    The following options may be given at the end of any command above: 
 
      [-Silent] [-AppLogFile filename] [-NoLog]
----------
 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

No comments:

Post a Comment