User Tools

Site Tools


computers:megaraid_megacli

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
computers:megaraid_megacli [2010/06/30 16:31] chkuocomputers:megaraid_megacli [2011/01/07 00:38] (current) – [MegaRAID MegaCli] chkuo
Line 1: Line 1:
 ====== MegaRAID MegaCli ====== ====== MegaRAID MegaCli ======
- +MegaCli is a command line tool provided by MegaRAID to configure/monitor their hardware RAID controllers. Currently all hard drives on [[user:oak|Oak]] are controlled by a MegaRAID SAS 8708EM2 w/ 256Mb RAM.
-MegaCli is a command line tool provided by MegaRAID to configure/monitor their hardware RAID controllers.+
  
 ===== Installation ===== ===== Installation =====
 +MegaCli is available as a RPM for RedHat Linux from [[http://www.lsi.com/storage_home/products_home/internal_raid/megaraid_sas/value_line/megaraid_sas_8708em2/index.html|LSI MegaRAID 8708EM2]]. The file name is: **4.00.11_Linux_MegaCLI.zip**
  
-MegaCli is available as a RPM for RedHat Linux. For installation on Ubuntu+For installation on Ubuntu, first we need to install ''alien'' for package format conversion: 
 +<code bash> 
 +$ sudo apt-get install alien 
 +</code>
  
 +There are two possible ways to perform the actual installation:
  
-**masker is working on this part**+==== 1. masker ==== 
 +<code bash> 
 +$ unzip 4.00.11_Linux_MegaCLI.zip 
 +Archive:  4.00.11_Linux_MegaCLI.zip 
 + extracting: MegaCliLin.zip           
 +  inflating: 4.00.11_Linux_MegaCLI.txt  
 +$ unzip MegaCliLin.zip 
 +Archive:  MegaCliLin.zip 
 +  inflating: MegaCli-4.00.11-1.i386.rpm   
 +$ alien -g MegaCli-4.00.11-1.i386.rpm 
 +.... 
 +Directories MegaCli-4.00.11 and MegaCli-4.00.11.orig prepared. 
 +$ mv MegaCli-4.00.11/debian MegaCli-4.00.11/DEBIAN 
 +$ vi MegaCli-4.00.11/DEBIAN control 
 +</code> 
 + 
 +Change ** Orignal "control" ** 
 +<file> 
 +Source: megacli 
 +Section: alien 
 +Priority: extra 
 +Maintainer: MyName 
 + 
 +Package: megacli 
 +Architecture: i386 
 +Depends: ${shlibs:Depends} 
 +Description: MegaCli SAS RAID Management Utility. 
 + MegaCli is used to manage SAS RAID controllers. 
 + . 
 + (Converted from a rpm package by alien version 8.79.) 
 +</file> 
 + 
 +to ** Modified "control" ** 
 +<file> 
 +Source: megacli 
 +Section: alien 
 +Priority: extra 
 +Maintainer: MyName 
 +Package: megacli 
 +Architecture: amd64 
 +Depends:  
 +Description: MegaCli SAS RAID Management Utility. MegaCli is used to manage SAS RAID controllers. 
 +Version: 4.00.11 
 +</code> 
 +(including blank line) 
 +<code> 
 +$ dpkg -b MegaCli-4.00.11 
 +$ sudo dpkg -i MegaCli-4.00.11.deb 
 +</file> 
 + 
 +==== 2. chkuo ==== 
 +<code bash> 
 +$ sudo alien --to-tgz MegaCli-4.00.11-1.i386.rpm  
 +$ tar -xvfz MegaCli-4.00.11.tgz  
 +</code>
  
 ===== Usage ===== ===== Usage =====
 +A quick reference sheet can be found at [[http://tools.rapidsoft.de/perc/perc-cheat-sheet.html]]
  
 +Some commonly used commands:
 +
 +==== Get Info ====
 To see all adapter info: To see all adapter info:
 <code bash> <code bash>
Line 17: Line 79:
 </code> </code>
  
-To see configuration info:+To see RAID configuration info of adapter 0:
 <code bash> <code bash>
-sudo /opt/MegaRAID/MegaCli/MegaCli64 -CfgDsply -aALL+sudo /opt/MegaRAID/MegaCli/MegaCli64 -CfgDsply -a0
 </code> </code>
  
 +To see enclosure info of adapter 0:
 +<code bash>
 +sudo /opt/MegaRAID/MegaCli/MegaCli64 -EncInfo -a0
 +</code>
 +
 +To see virtual drives info of adapter 0:
 +<code bash>
 +sudo /opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -a0
 +</code>
 +
 +
 +To see a list of physical drives of adapter 0:
 +<code bash>
 +sudo /opt/MegaRAID/MegaCli/MegaCli64 -PDList -a0
 +</code>
 +
 +
 +==== To Replace a Hard Drive ====
 +**WARNING: The following procedure has not been verified yet!!**
 +
 +The example here assumes that the one of the physical hard drive (Enclosure 252, Slot 6, Adapter 0; marked as Physical Disk 2 in Span Reference 0x00) has failed and needs to be replaced.
 +
 +1. Set the drive offline if it is still online
 +<code bash>
 +sudo /opt/MegaRAID/MegaCli/MegaCli64 -PDOffline -PhysDrv [252:6] -a0
 +</code>
 +
 +2. Mark the drive as missing
 +<code bash>
 +sudo /opt/MegaRAID/MegaCli/MegaCli64 -PDMarkMissing -PhysDrv [252:6] -a0
 +</code>
 +
 +3. Prepare drive for removal
 +<code bash>
 +sudo /opt/MegaRAID/MegaCli/MegaCli64 -PDPrpRmv -PhysDrv [252:6] -a0
 +</code>
 +
 +4. Replace the failed hard drive
 +
 +5. If the replaced hard drive is listed as ''Unconfigured(bad)'', change the state
 +<code bash>
 +sudo /opt/MegaRAID/MegaCli/MegaCli64 -PDMakeGood -PhysDrv [252:6] -a0
 +</code>
 +
 +6. Add the physical drive back to the virtual drive
 +<code bash>
 +sudo /opt/MegaRAID/MegaCli/MegaCli64 -PdReplaceMissing -PhysDrv [252:6] -Array0 -row2 -a0
 +</code>
 +
 +7. Start the rebuid
 +<code bash>
 +sudo /opt/MegaRAID/MegaCli/MegaCli64 -PDRbld -Start -PhysDrv [252:6] -a0
 +</code>
  
-To check rebuild progress (the example here is for checking physical drive in enclosure 252, slot 7, adapter 0):+8. Check the rebuild progress
 <code bash> <code bash>
-sudo /opt/MegaRAID/MegaCli/MegaCli64 -PDRbld -ShowProg -PhysDrv [252:7] -a0+sudo /opt/MegaRAID/MegaCli/MegaCli64 -PDRbld -ShowProg -PhysDrv [252:6] -a0
 </code> </code>
  
    
computers/megaraid_megacli.1277886690.txt.gz · Last modified: 2010/06/30 16:31 by chkuo