Using 'megacli' to manage Security Analytics RAID configuration
book
Article ID: 168441
calendar_today
Updated On:
Products
Security Analytics
Issue/Introduction
The latest generation Solera/Security Analytics hardware utilizes LSI-based raid controllers. 'megacli' is a command line utility that allows you to modify all aspects of the RAID configuration including adding or deleting RAID logical units, rebuilding degraded logical devices or diagnosing certain RAID/hard drive issues. The list below is meant to be a reference for the most common megacli commands that are used by the Blue Coat support team.
NOTE: Some of these commands are destructive and have the potential to delete your entire system. Misuse of these commands can render your appliance completely useless. Please use only as directed by Blue Coat technical support.
Resolution
All of these megacli commands can be referenced via the 'megacli -help' command. The output of 'megacli -help can be found in the Additional Information section below.
Legend: E=Enclosure ID S=Slot number X=specific number or the word "all" l=virtual drive number a=adapter
To list information about a specific RAID partition megacli -ldinfo -lx -ax
To create RAID 0, 5 out of all free unconfigured drives on a controller: megacli -cfgallfreedrv -rX wb adra direct cachedbadbbu -aX
To delete a background init process: megacli -LDBI -Abort -lX -aX -nolog
To start a foreground init process: megacli -LDInit -Start -full -lX -aX
To create a new global hotspare: megacli -PDHSP -set -physdrv[E:S] -aX
To remove a hotspare: megacli -PDHSP -RMV -physdrv[E:S] -aX (dedicated or global)
To show the process of a backgrounded init: megacli -LDBI -ShowProg -lX -aX
To disable Background initialization: megacli -LDBI -dsbl -lx -ax
To show the process of a fore ground init process: megacli -LDInit -ShowProg -lX -aX
To cancel a consistency check: megacli -LDCC -Abort -lX -aX
Create a new RAID partition: megacli -cfgldadd -rX[E:S] WB ADRA direct CachedBadBBU -aX (r= raid level)
To create 12 individual Raid 0 drives MegaCli -CfgEachDskRaid0 WB ADRA direct CachedBadBBU -aX
To create 3 drive RAID 5 on internal head unit (for Supermicro DSH 200-series systems or DSH C200-series only) megacli -cfgldadd -r5[E:0,E:1,E:2] wb direct adra cachedbadbbu -a2
To create 8 drive RAID 5 on internal head unit (for Supermicro DSH 3220 systems) megacli -cfgldadd -r5[E:4,E:5,E:6,E:7,E:8,E:9,E:10,E:11] wb direct adra cachedbadbbu -a2
To set the 3 drive system partition as bootable: megacli -adpbootdrive -set -l0 -a2
To set a drive from bad to good state: megacli -pdmakegood -physdrv[E:S] -aX
To scan for foreign configs megacli -cfgforeign -scan -aX
To display foreign configs megacli -cfgforeign -dsply -aX
To clear foreign configs megacli -cfgforeign -clear -aX
To import foreign config megacli -cfgforeign -import -aX
To Locate a drive: megacli -pdlocate -start|-stop -physdrv[E:S] -aX
To set partitions to ReadAheadAdaptive: megacli -LDSetProp ADRA -lX -Immediate -aX
To display boot drives: megacli -AdpBootDrive -Get -aX
To assign system RAID as boot device: megacli -AdpBootDrive -Set -l0 -ax
How to view RAID Rebuild progress megacli -PDRbld -ShowProg -PhysDrv[E:S] -aX
How to update hard drive firmware megacli -PdFwDownload PhysDrv[E:S] -f <filename> -aX
To bypass error on BOOT: megacli -adpBIOS -BE -ax
How to silence the alarm on a specific controller megacli -adpsetprop alarmsilence -aX
How to silence the alarm on all controllers megacli -adpsetprop alarmsilence -aall
How to view/start/stop Patrol Read megacli -adppr start|stop|info -aX
List Firmware Version megacli -adpallinfo -aall | grep FW
How to update RAID firmware megacli -adpfwflash -f filename -aX
How to clear controller configuration (NOTE: use EXTREME caution)