The new version of MEGACLI-1.01.24-0.I386.RPM installs the program under/OPT and can customize the installation directory, for example: rpm–relocate/opt/=/usr/sbin/-I megacli-1.01.24-0.i386.rpm to replace the installation directory/opt into/usr/sbin. Download Address: Http://www.lsi.com/support/downloads/megaraid/miscellaneous/linux/Linux_MegaCLI_1.01.24.zip I introduce here to install under/OPT.
1. First introduce the Linux system itself to view
Software RAID: View RAID levels, status, etc information
#cat/proc/mdstat
Hardware RAID: View RAID manufacturer, model, level
#dmesg | Grep-i raid
#cat/PROC/SCSI/SCSI
2. The best way to hardware RAID is to view it through the administrative tools of the installed RAID manufacturer, the following installation Megacli tool view
First download MEGACLI, unzip. #rpm-IVH megacli-1.01.24-0.i386.rpm installed under/OPT, so the execution command is/OPT/MEGACLI oh.
command to use:
#/opt/megacli-ldinfo-lall-aall Check RAID level
#/opt/megacli-adpallinfo-aall Check RAID card information
#/opt/megacli-pdlist-aall View Hard Drive information
#/opt/megacli-adpbbucmd-aall View battery Information
#/opt/megacli-fwtermlog-dsply-aall View RAID Card log
#/opt/megacli-adpcount "Number of display adapters"
#/opt/megacli-adpgettime–aall "Show Adapter Time"
#/opt/megacli-adpallinfo-aall "Show All Adapter Information"
#/opt/megacli-ldinfo-lall-aall "Show all Logical disk group information"
#/opt/megacli-pdlist-aall "Show All Physical Information"
#/opt/megacli-adpbbucmd-getbbustatus-aall |grep ' charger status ' "View charging status"
#/opt/megacli-adpbbucmd-getbbustatus-aall "Show Bbu status information"
#/opt/megacli-adpbbucmd-getbbucapacityinfo-aall "Display BBU capacity Information"
#/opt/megacli-adpbbucmd-getbbudesigninfo-aall "Show Bbu Design Parameters"
#/opt/megacli-adpbbucmd-getbbuproperties-aall "Show current BBU Properties"
#/opt/megacli-cfgdsply-aall "Display RAID card model, RAID settings, disk related information"
3. Changes in the state of the tape, from the dial, to the disk in the process.
Device | normal| damage| rebuild| Normal
Virtual Drive | optimal| degraded| degraded| Optimal
Physical Drive | online| Failed–> unconfigured| rebuild| Online
4. View the disk caching policy
#/opt/megacli-ldgetprop-cache-l0-a0
Or
#/opt/megacli-ldgetprop-cache-l1-a0
Or
#/opt/megacli-ldgetprop-cache-lall-a0
Ro
#/opt/megacli-ldgetprop-cache-lall-aall
Ro
#/opt/megacli-ldgetprop-dskcache-lall-aall
5. Set Disk caching policy
Caching Policy Explanation:
WT (Write through
WB (Write back)
NORA (No read ahead)
RA (Read ahead)
ADRA (Adaptive read ahead)
Cached
Direct
Example:
#/opt/megacli-ldsetprop wt| wb| nora| ra| Adra-l0-a0
Or
#/opt/megacli-ldsetprop-cached|-direct-l0-a0
Or
Enable/disable Disk Cache
#/opt/megacli-ldsetprop-endskcache|-disdskcache-l0-a0
6. Create a RAID5 array, consisting of a physical disk 2,3,4, the hot spare for the array is the physical disk 5
#/opt/megacli-cfgldadd-r5 [1:2,1:3,1:4] WB Direct-hsp[1:5]-a0
7. Create an array, do not specify hot standby
#/opt/megacli-cfgldadd-r5 [1:2,1:3,1:4] WB direct-a0
8. Delete array
#/opt/megacli-cfglddel-l1-a0
9. Add Disk Online
#/opt/megacli-ldrecon-start-r5-add-physdrv[1:4]-l1-a0
10. After the array is created, there will be a process of initializing the synchronized block to see its progress.
#/opt/megacli-ldinit-showprog-lall-aall
Or as shown in a dynamic visual text interface
#/opt/megacli-ldinit-progdsply-lall-aall
11. View the progress of the array background initialization
#/opt/megacli-ldbi-showprog-lall-aall
Or as shown in a dynamic visual text interface
#/opt/megacli-ldbi-progdsply-lall-aall
12. Specify 5th disk as global hot standby
#/opt/megacli-pdhsp-set [-enclaffinity] [-nonrevertible]-physdrv[1:5]-a0
13. Designated dedicated hot standby for an array
#/opt/megacli-pdhsp-set [-dedicated [-array1]] [-enclaffinity] [-nonrevertible]-physdrv[1:5]-a0
14. Delete Global hot standby
#/opt/megacli-pdhsp-rmv-physdrv[1:5]-a0
15. Put a piece of physical disk off/Line
#/opt/megacli-pdoffline-physdrv [1:4]-a0
#/opt/megacli-pdonline-physdrv [1:4]-a0
16. View Physical Disk Rebuild progress
#/opt/megacli-pdrbld-showprog-physdrv [1-5]-a0
Or as shown in a dynamic visual text interface
#/opt/megacli-pdrbld-progdsply-physdrv [1-5]-a0