Rappels de commande MegaCLI


C'est vieux, mais c'est "pour pas perdre".

Sur les machines équipées de MegaCLI (Linux, Sun Solaris), pour maniper sur les controleur raid, à chaud.

  • lister les disques et leurs état :
1
2
./MegaCli -PdList -aALL | grep alert
./MegaCli -pdlist -a0 | /usr/xpg4/bin/grep -e '^Enclosure Device ID:' -e '^Slot Number:' -e 'alert'

Caches, Battery + WriteBack

  • activation du ReadCache (Adapter)
1
./MegaCli -LDSetProp -Cached -LAll -aAll
  • activation du DiskCache (Disk)
1
./MegaCli -LDSetProp EnDskCache -LAll -aAll
  • activation du AdaptiveReadAhead (Adapter)
1
./MegaCli -LDSetProp ADRA -LALL -aALL
  • état des batteries
1
2
./MegaCli -AdpBbuCmd -GetBbuStatus -a0 | /usr/xpg4/bin/grep -e '^isSOHGood' -e '^Charger Status' -e '^Remaining Capacity'
./MegaCli -AdpBbuCmd -GetBbuStatus -a1 | /usr/xpg4/bin/grep -e '^isSOHGood' -e '^Charger Status' -e '^Remaining Capacity'

Si tout est good :

  • Activation du WB
1
./MegaCli -LDSetProp WB -LALL -aALL
  • mais désactivation automatique si la batterie devient bad
1
./MegaCli -LDSetProp NoCachedBadBBU -LALL -aALL
  • si on se fout de l'état des batteries (ZFS is COW)
1
./MegaCli -LDSetProp CachedBadBBU -LALL -aALL
  • activation du JBOD
!:ne fonctionne pas sur les vieilles cartes raid H700/710, H800/810 (dispo à partir de Hx30), fonctionne sur les H200/H210, H300/H310 et supérieures.
1
MegaCli -AdpSetProp -EnableJBOD -1 -aALL

Remplacer un disque HS

sur R510dataX

  • Repérer le disque fautif
1
2
./MegaCli -pdlist -a0 | /usr/xpg4/bin/grep -e '^Enclosure Device ID:' -e '^Slot Number:' -e 'alert'
./MegaCli -PDInfo -PhysDrv\[32:11\] -a0
  • Éjecter le disque fautif
1
2
./MegaCli -PdPrpRmv -PhysDrv\[32:11\] -a0
./MegaCli -PDOffLine -PhysDrv\[32:11\] -a0
  • échanger physiquement les disques
  • effacer la config VD ou foreign du nouveau disque (si besoin)
1
2
3
4
#./MegaCli -PDMakeGood -PhysDrv \[32:11\] -a0 # si Unconfigured(bad)
./MegaCli -CfgForeign -Scan -a0
./MegaCli -CfgForeign -Clear -a0
#./MegaCli -PDClear -Start -PhysDrv\[32:11\] -a0 # si dans un raid > 0
  • trouver et purger le preserved cache
1
2
3
./MegaCli -AdpAllInfo -a0 -nolog | grep Preserved
./MegaCli -GetPreservedCacheList -a0
./MegaCli -DiscardPreservedCache -L13 -a0
  • créer un nouveau VD (raid0) avec le nouveau Physical Disk (Write Through)
1
2
3
4
5
6
7
8
./MegaCli -CfgLdAdd -r0 '[32:11]' -a0


Adapter 0: Created VD 13

Adapter 0: Configured the Adapter!!

Exit Code: 0x00
  • créer un nouveau disque "d'accès direct" (H200,H310,H730/830)
1
./MegaCli -PDMakeJBOD -PhysDrv[32:1] -a0
  • remettre les configs du VD au propre (cache, WB, readahead, etc)
1
2
3
4
5
./MegaCli -LDSetProp -Cached -LAll -aAll
./MegaCli -LDSetProp EnDskCache -LAll -aAll
./MegaCli -LDSetProp ADRA -LALL -aALL
./MegaCli -LDSetProp WB -LALL -aALL
./MegaCli -LDSetProp NoCachedBadBBU -LALL -aALL
  • prévenir zfs
1
2
3
zpool status
zpool replace data c0t6d0
zpool status

Un resilver du disque doit démarrer automatiquement.

Ref : http://docs.oracle.com/cd/E19253-01/819-5461/gbcet/index.html

MegaCli -help

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
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
| {SMARTCpyBkEnbl -val} | {SSDSMARTCpyBkEnbl -val} | NCQEnbl | NCQDsbl
| {MaintainPdFailHistoryEnbl -val} | {RstrHotSpareOnInsert -val}
| {DisableOCR -val} | {BootWithPinnedCache -val}
| AutoEnhancedImportEnbl | AutoEnhancedImportDsbl
| {EnblSpinDownUnConfigDrvs -val}|{UseDiskActivityforLocate -val} -aN|-a0,1,2|-aALL
| {ExposeEnclDevicesEnbl -val} | {SpinDownTime -val}
| {SpinUpEncDrvCnt -val} | {SpinUpEncDelay -val} | {Perfmode -val} -aN|-a0,1,2|-aALL

MegaCli -AdpSetProp -AutoDetectBackPlaneDsbl -val -aN|-a0,1,2|-aALL
   val - 0=Enable Auto Detect of SGPIO and i2c SEP.
         1=Disable Auto Detect of SGPIO.
         2=Disable Auto Detect of i2c SEP.
         3=Disable Auto Detect of SGPIO and i2c SEP.
MegaCli -AdpSetProp -CopyBackDsbl -val -aN|-a0,1,2|-aALL
   val - 0=Enable Copyback.
         1=Disable Copyback.
MegaCli -AdpSetProp -EnableJBOD -val -aN|-a0,1,2|-aALL
   val - 0=Disable JBOD mode.
         1=Enable JBOD mode.
MegaCli -AdpSetProp -DsblCacheBypass -val -aN|-a0,1,2|-aALL
   val - 0=Enable Cache Bypass.
         1=Disable Cache Bypass.
MegaCli -AdpSetProp -LoadBalanceMode -val -aN|-a0,1,2|-aALL
   val - 0=Auto Load balance mode.
         1=Disable Load balance mode.
MegaCli -AdpSetProp -UseFDEOnlyEncrypt -val -aN|-a0,1,2|-aALL
   val - 0=FDE and controller encryption (if HW supports) is allowed.
         1=Only support FDE encryption, disallow controller encryption.
MegaCli -AdpSetProp -PrCorrectUncfgdAreas -val -aN|-a0,1,2|-aALL
   val - 0= Correcting Media error during PR is disabled.
         1=Correcting Media error during PR is allowed.
MegaCli -AdpSetProp -DsblSpinDownHSP -val -aN|-a0,1,2|-aALL
   val - 0= Spinning down the Hot Spare is enabled.
         1=Spinning down the Hot Spare is disabled.
MegaCli -AdpSetProp -DefaultLdPSPolicy -Automatic| -None | -Maximum| -MaximumWithoutCaching -aN|-a0,1,2|-aALL
MegaCli -AdpSetProp -DisableLdPS -interval n1 -time n2 -aN|-a0,1,2|-aALL
   where n1 is the number of hours beginning at time n2
MegaCli -AdpSetProp -ENABLEEGHSP -val -aN|-a0,1,2|-aALL
       val - 0= Disabled Emergency GHSP.
                     1= Enabled Emergency GHSP.
MegaCli -AdpSetProp -ENABLEEUG -val -aN|-a0,1,2|-aALL
       val - 0= Disabled Emergency UG as Spare.
                     1= Enabled Emergency UG as Spare.
MegaCli -AdpSetProp -ENABLEESMARTER -val -aN|-a0,1,2|-aALL
       val - 0= Disabled Emergancy Spare as Smarter.
                     1= Enabled Emergancy Spare as Smarter.
MegaCli -AdpSetProp -DPMenable -val -aN|-a0,1,2|-aALL
   val - 0=Disable Drive Performance Monitoring .
         1=Enable Drive Performance Monitoring.
MegaCli -AdpSetProp -SupportSSDPatrolRead -val -aN|-a0,1,2|-aALL
   val - 0=Disable Patrol read for SSD drives .
         1=Enable Patrol read for SSD drives.
MegaCli -AdpGetProp CacheFlushInterval | RebuildRate | PatrolReadRate
| BgiRate | CCRate | ReconRate | SpinupDriveCount | SpinupDelay
| CoercionMode | ClusterEnable | PredFailPollInterval | BatWarnDsbl
| EccBucketSize | EccBucketLeakRate | EccBucketCount | AbortCCOnError
| AlarmDsply | SMARTCpyBkEnbl | SSDSMARTCpyBkEnbl | NCQDsply
| MaintainPdFailHistoryEnbl | RstrHotSpareOnInsert
| EnblSpinDownUnConfigDrvs  | DisableOCR
| BootWithPinnedCache | AutoEnhancedImportDsply | AutoDetectBackPlaneDsbl
| CopyBackDsbl | LoadBalanceMode | UseFDEOnlyEncrypt | WBSupport | EnableJBOD
| DsblCacheBypass | ExposeEnclDevicesEnbl | SpinDownTime | PrCorrectUncfgdAreas
| UseDiskActivityforLocate | ENABLEEGHSP | ENABLEEUG | ENABLEESMARTER | Perfmode | -DPMenable -aN|-a0,1,2|-aALL
| DefaultLdPSPolicy | DisableLdPsInterval | DisableLdPsTime | SpinUpEncDrvCnt
| SpinUpEncDelay | PrCorrectUncfgdAreas
| DsblSpinDownHSP | SupportSSDPatrolRead -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 -BBUMfgSet -f filename -aN|-a0,1,2|-aALL
MegaCli -AdpBIOS -Enbl |-Dsbl | -SOE | -BE | EnblAutoSelectBootLd | DsblAutoSelectBootLd | -Dsply -aN|-a0,1,2|-aALL
MegaCli -AdpBootDrive {-Set {-Lx | -physdrv[E0:S0]}}|-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|Suspend|Resume|Stop|Info|SSDPatrolReadEnbl |SSDPatrolReadDsbl
     |{SetDelay Val}|{-SetStartTime yyyymmdd hh}|{maxConcurrentPD 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 -AdpAlILog -aN|-a0,1,2|-aALL
MegaCli -AdpDiag [val] -aN|-a0,1,2|-aALL
      val - Time in second.
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,...] | [-Force] -aN|-a0,1,2|-aALL
MegaCli -PDMakeJBOD -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|-Suspend|-Resume|-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 -EncStatus -aN|-a0,1,2|-aALL
MegaCli -PhyInfo -phyM -aN|-a0,1,2|-aALL
MegaCli -PhySetLinkSpeed -phyM -speed -aN|-a0,1,2|-aALL
MegaCli -PdFwDownload [offline][ForceActivate] {[-SataBridge] -PhysDrv[0:1] }|{-EncdevId[devId1]} -f <filename> -aN|-a0,1,2|-aALL
MegaCli -LDInfo -Lx|-L0,1,2|-Lall -aN|-a0,1,2|-aALL
MegaCli -LDSetProp  {-Name LdNamestring} | -RW|RO|Blocked|RemoveBlocked | WT|WB|ForcedWB [-Immediate] |RA|NORA|ADRA
    | Cached|Direct | -EnDskCache|DisDskCache | CachedBadBBU|NoCachedBadBBU
    -Lx|-L0,1,2|-Lall -aN|-a0,1,2|-aALL
MegaCli -LDSetPowerPolicy -Default| -Automatic| -None| -Maximum| -MaximumWithoutCaching
    -Lx|-L0,1,2|-Lall -aN|-a0,1,2|-aALL
MegaCli -LDGetProp  -Cache | -Access | -Name | -DskCache | -PSPolicy | Consistency -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 [-force]}|-Abort|-Suspend|-Resume|-ShowProg|-ProgDsply -Lx|-L0,1,2|-LALL -aN|-a0,1,2|-aALL
MegaCli -LDBI -Enbl|-Dsbl|-getSetting|-Abort|-Suspend|-Resume|-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 -LDBBMClr -Lx|-L0,1,2,...|-Lall -aN|-a0,1,2|-aALL
MegaCli -getLdExpansionInfo -Lx|-L0,1,2|-Lall -aN|-a0,1,2|-aALL
MegaCli -LdExpansion -pN -dontExpandArray -Lx|-L0,1,2|-Lall -aN|-a0,1,2|-aALL
MegaCli -GetBbtEntries -Lx|-L0,1,2|-Lall -aN|-a0,1,2|-aALL
MegaCli -Cachecade -assign|-remove -Lx|-L0,1,2|-LALL -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] [-Force]|[Secure]
            [-Default| -Automatic| -None| -Maximum| -MaximumWithoutCaching] [-Cache] -aN
MegaCli -CfgCacheCadeAdd [-rX] -Physdrv[E0:S0,...] {-Name LdNamestring} [WT|WB|ForcedWB] [-assign -LX|L0,2,5..|LALL] -aN|-a0,1,2|-aALL
MegaCli -CfgEachDskRaid0 [WT|WB] [NORA|RA|ADRA] [Direct|Cached]
    [CachedBadBBU|NoCachedBadBBU] [-strpszM]|[Secure] [-Default| -Automatic| -None| -Maximum| -MaximumWithoutCaching] [-Cache] -aN|-a0,1,2|-aALL
MegaCli -CfgClr [-Force] -aN|-a0,1,2|-aALL
MegaCli -CfgDsply -aN|-a0,1,2|-aALL
MegaCli -CfgCacheCadeDsply -aN|-a0,1,2|-aALL
MegaCli -CfgLdDel -LX|-L0,2,5...|-LALL [-Force] -aN|-a0,1,2|-aALL
MegaCli -CfgCacheCadeDel -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][-Force]|[Secure]
            [-Default| -Automatic| -None| -Maximum| -MaximumWithoutCaching] [-Cache] -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][-Force]| RA|ADRA]
    [Direct|Cached] [CachedBadBBU|NoCachedBadBBU] [-strpszM]
    [-HspCount XX [-HspType -Dedicated|-EnclAffinity|-nonRevertible]]|
    [Secure] [-Default| -Automatic| -None| -Maximum| -MaximumWithoutCaching] [-Cache] -aN

MegaCli -CfgSave -f filename -aN
MegaCli -CfgRestore -f filename -aN
MegaCli -CfgForeign -Scan | [-Passphrase sssssssssss] -aN|-a0,1,2|-aALL
MegaCli -CfgForeign -Dsply [x] | [-Passphrase sssssssssss] -aN|-a0,1,2|-aALL
MegaCli -CfgForeign -Preview [x] | [-Passphrase sssssssssss] -aN|-a0,1,2|-aALL
MegaCli -CfgForeign -Import [x] | [-Passphrase sssssssssss] -aN|-a0,1,2|-aALL
MegaCli -CfgForeign -Clear [x]|[-Passphrase sssssssssss] -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 {-info -warning -critical -fatal} {-f <fileName>} -aN|-a0,1,2|-aALL
MegaCli -AdpEventLog -GetSinceShutdown {-info -warning -critical -fatal} {-f <fileName>} -aN|-a0,1,2|-aALL
MegaCli -AdpEventLog -GetSinceReboot {-info -warning -critical -fatal} {-f <fileName>} -aN|-a0,1,2|-aALL
MegaCli -AdpEventLog -IncludeDeleted {-info -warning -critical -fatal} {-f <fileName>} -aN|-a0,1,2|-aALL
MegaCli -AdpEventLog -GetLatest n {-info -warning -critical -fatal} {-f <fileName>} -aN|-a0,1,2|-aALL
MegaCli -AdpEventLog -GetCCIncon -f <fileName> -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 <fileName> -aN|-a0,1,2|-aALL
MegaCli -AdpBbuCmd -GetGGEEPData offset [Hexaddress] NumBytes n -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|-Auto -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
MegaCli -PDCpyBk -Start -PhysDrv[E0:S0,E1:S1] -aN|-a0,1,2|-aALL
MegaCli -PDCpyBk -Stop|-Suspend|-Resume|-ShowProg|-ProgDsply -PhysDrv[E0:S0] -aN|-a0,1,2|-aALL
MegaCli -PDInstantSecureErase -PhysDrv[E0:S0,E1:S1,...] | [-Force] -aN|-a0,1,2|-aALL
MegaCli -PDInstantSecureErase -PhysDrv[E0:S0,E1:S1,...] | [-Force] -aN|-a0,1,2|-aALL
MegaCli -AdpSetprop -enblPI 1 -aN|-a0,1,2|-aALL
MegaCli -AdpGetprop -enblPI -aN|-a0,1,2|-aALL
MegaCli -AdpSetprop -preventPiImport 1 -aN|-a0,1,2|-aALL
MegaCli -AdpGetprop -preventPiImport -aN|-a0,1,2|-aALL
MegaCli -CfgLdAdd rX[E0:S0,E1:S1,...] -enblPI -aN|-a0,1,2|-aALL
MegaCli -CfgEachDskRaid0 -enblPI -aN|-a0,1,2|-aALL
MegaCli -CfgSpanAdd -cfgspanadd -rX -array0[E0:S1,E1:S1.....] array1[E0:S1,E1:S1.....] -szxxx -enblPI -aN|-a0,1,2|-aALL
MegaCli -CfgAllFreeDrv -rX enblPI -aN|-a0,1,2|-aALL
MegaCli -AdpSetVerify -f verify.txt -aN|-a0,1,2|-aALL
MegaCli -LDMakeSecure -Lx|-L0,1,2,...|-Lall -aN|-a0,1,2|-aALL
MegaCli -DeleteSecurityKey | [-Force] -aN
MegaCli -CreateSecurityKey -Passphrase sssssssssss [-KeyID kkkkkkkkkkk] -aN
MegaCli -CreateSecurityKey useEKMS -aN
MegaCli -ChangeSecurityKey -OldPassphrase sssssssssss | -Passphrase sssssssssss |
      [-KeyID kkkkkkkkkkk] -aN
MegaCli -ChangeSecurityKey -Passphrase sssssssssss |
      [-KeyID kkkkkkkkkkk] -aN
MegaCli -ChangeSecurityKey useEKMS -oldPassphrase sssssssssss -aN
MegaCli -ChangeSecurityKey -useEKMS -aN
MegaCli -GetKeyID [-PhysDrv[E0:S0]] -aN
MegaCli -SetKeyID -KeyID kkkkkkkkkkk -aN
MegaCli -VerifySecurityKey -Passphrase sssssssssss -aN
MegaCli -GetPreservedCacheList -aN|-a0,1,2|-aALL
MegaCli -DiscardPreservedCache -Lx|-L0,1,2|-Lall -force -aN|-a0,1,2|-aALL

   sssssssssss  - It must be between eight and thirty-two
                  characters and contain at least one number,
                  one lowercase letter, one uppercase
                  letter and one non-alphanumeric character.
   kkkkkkkkkkk -  Must be less than 256 characters.
MegaCli -ShowSummary [-f filename] -aN
MegaCli -ELF -GetSafeId -aN|-a0,1,2|-aALL
MegaCli -ELF -ControllerFeatures -aN|-a0,1,2|-aALL
MegaCli -ELF -Applykey key <-val> [Preview] -aN|-a0,1,2|-aALL
MegaCli -ELF -TransferToVault -aN|-a0,1,2|-aALL
MegaCli -ELF -DeactivateTrialKey -aN|-a0,1,2|-aALL
MegaCli -ELF -ReHostInfo -aN|-a0,1,2|-aALL
MegaCli -ELF -ReHostComplete -aN|-a0,1,2|-aALL
MegaCli -LDViewMirror -Lx|-L0,1,2,...|-Lall -aN|-a0,1,2|-aALL
MegaCli -LDJoinMirror -DataSrc <val> [-force] -Lx|-L0,1,2,...|-Lall -aN|-a0,1,2|-aALL
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
MegaCli -Version -Cli|-Ctrl|-Driver|-Pd   -aN|-a0,1,2|-aALL
MegaCli -Perfmon {-start -interval <val>} | {stop} | {-getresults -f <Filename>} -aN

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.
Note:[-aALL] option assumes that the parameters specified are valid
   for all the Adapters.
The following options may be given at the end of any command above:
   [-Silent] [-AppLogFile filename] [-NoLog] [-page[N]]
   [-] is optional.
   N - Number of lines per page.