Megacli Command
MegaCli -CfgDsply -aALL
To check all Config,Physical,Vitrual disk status.
MegaCli -PDList -aALL
To check all physical disk status.
MegaCli -LDinfo -Lall -aALL
To show and check all virtual disk
MegaCli -PDRbld -ProgDsply -PhysDrv [1:4] -aALL
To show the rebuild status of Physical disk 1:4
MegaCli -PDOffline -PhysDrv [1:4] -a0
MegaCli -PDOnline -PhysDrv [1:4] -a0
To make physical disk online / offline
MegaCli -PDHSP -Rmv -PhysDrv[1:5] -a0
To remove hotspare for physical disk 1:5 for all array
MegaCli -PDHSP -Set [-EnclAffinity] [-nonRevertible] -PhysDrv[1:5] -a0
MegaCli -PDHSP -Set [-Dedicated [-Array1]] [-EnclAffinity] [-nonRevertible] -PhysDrv[1:5] -a0
To make hotspare for all array or specific array
MegaCli -LDRecon -Start -r5 -Add -PhysDrv[1:4] -L1 -a0
To add new raid 5 member online for Physical disk 1:4. It is required reboot to view the size changes. (df-h)
MegaCli -LDInit -ShowProg -LALL -aALL
MegaCli -LDInit -ProgDsply -LALL -aALL
To show the progress of array initialization
MegaCli -LDBI -ShowProg -LALL -aALL
MegaCli -LDBI -ProgDsply -LALL -aALL
To show the progress of background mode of array initialization
MegaCli -CfgLdAdd -r5 [1:2,1:3,1:4] WB Direct -a0
MegaCli -CfgLdAdd -r5 [1:2,1:3,1:4] WB Direct -Hsp[1:5] -a0
Create array raid5 with 3 physical disk 1:2,1:3,1:4 (with hotstapre or not)
MegaCli -CfgLdDel -L1 -a0
Delete array 1
WT (Write through
WB (Write back)
NORA (No read ahead)
RA (Read ahead)
ADRA (Adaptive read ahead)
Cached
Direct
sample :
MegaCli -LDSetProp WT|WB|NORA|RA|ADRA -L0 -a0
or
MegaCli -LDSetProp -Cached|-Direct -L0 -a0
or
enable / disable disk cache
MegaCli -LDSetProp -EnDskCache|-DisDskCache -L0 -a0
enable / disable disk cache or set cache property/policy of array
MegaCli -LDGetProp -Cache -LALL -aALL
To show the cache property/policy for all array
MegaCli -AdpAllInfo -aAll
View information about the battery backup-up unit state
MegaCli -AdpBbuCmd -aAll
View information about virtual disks Useful for checking RAID level, stripe size, cache policy and RAID state:
MegaCli -LDInfo -Lall -aALL
View information about physical drives
MegaCli -PDList -aALL
To see information about the patrol read state and the delay between patrol read runs:
MegaCli -AdpPR -Info -aALL
To find out the current patrol read rate, execute
MegaCli -AdpGetProp PatrolReadRate -aALL
To reduce patrol read resource usage to 2% in order to minimize the performance impact:
MegaCli -AdpSetProp PatrolReadRate 2 -aALL
To disable automatic patrol read:
MegaCli -AdpPR -Dsbl -aALL
To start a manual patrol read scan:
MegaCli -AdpPR -Start -aALL
To stop a patrol read scan:
MegaCli -AdpPR -Stop -aALL
If your system is not connected to a UPS, you should disable the physical disk cache in order to prevent data loss.
MegaCli -LDGetProp EnDskCache -LAll -aALL
To enable it (only do this if you have a UPS and redundant power supplies):
MegaCli -LDGetProp DisDskCache -LAll -aALL
Detail about disks:
MegaCli -ShowSummary -aALL
Check patrol read warnings:
MegaCli -AdpEventLog -GetSinceReboot -warning -fatal -a0

Server is hosted by Alanstudio
Linux Operating System
Recommend screen resolution 1024 x 768 / IE / FireFox
Alan Studio © 2007 by Alan Cheung Hin Lun. All rights reserved.
|