Archive

Archive for the ‘RAID’ Category

Adjust RAID rebuild rate

May 29, 2015 Leave a comment

 
 
Steps to adjust hardware RAID rebuild rate using ‘megacli’. Most often after a disk replacement in case of disk failure, we want to increase the RAID rebuild rate to speed up the process. Also if RAID rebuild is causing performance issues with host, then we might need to consider reducing the rebuild rate. The command lines pasted below helps to control it,

 
1) Get current RAID rebuild rate,
 

host100:~# megacli -AdpGetProp RebuildRate -a0
                                     
Adapter 0: Rebuild Rate = 15%

Exit Code: 0x00
host100:~# 

 
2) Set RAID rebuild rate to 25%,
 

host100:~# megacli -AdpSetProp RebuildRate 25 -a0
                                     
Adapter 0: Set rebuild rate to 25% success.

Exit Code: 0x00
host100:~#

 
 

Categories: RAID, Storage

Create RAID 0 on Dell PERC 5/i from Linux command line using MegaCli

June 16, 2013 2 comments

 

SCENARIO: Customer have Dell PERC 5/i raid controller with RAID 1 already configured on two drives. His DC added two new drives each with two different sizes(a 1TB and a 2TB size) to the RAID controller but it wasn’t visible inside the server. The fdisk command didn’t listed the two new drives.

The PERC controller will only show the OS the drives that are configured as RAID volumes. If we want the new drive to be seeing by Windows/Linux and not be part of the existing RAID 1 we already have, we can create a new RAID 0 volumes with only the new drives.

 

 

SOLUTION:

 

1) Download the MegaCli and Lib_Utils rpm to the server from the rapidshare urls pasted below(you cannot wget it to the server :P),

https://rapidshare.com/files/3230206587/Lib_Utils-1.00-08.noarch.rpm
http://rapidshare.com/files/565005303/MegaCli-8.01.06-1.i386.rpm

 

2) Install the Lib_Utils and MegaCli rpm packages inside the server,

rpm -ivh Lib_Utils-1.00-08.noarch.rpm
rpm -ivh MegaCli-8.01.06-1.i386.rpm

 

3) Retrieve the physical drive information using MegaCli command,

root@jackal777[/opt/MegaRAID/MegaCli]# ./MegaCli64 -PdList -a0| egrep 'Device|Firm|Inq|Coer'
Enclosure Device ID: 8
Device Id: 0
Non Coerced Size: 1.818 TB [0xe8d088b0 Sectors]
Coerced Size: 1.818 TB [0xe8d00000 Sectors]
Firmware state: Online, Spun Up
Inquiry Data:      WD-WMC300310248WDC WD20EFRX-68AX9N0                    80.00A80
Device Speed: Unknown 
Media Type: Hard Disk Device
Enclosure Device ID: 8
Device Id: 1
Non Coerced Size: 1.818 TB [0xe8d088b0 Sectors]
Coerced Size: 1.818 TB [0xe8d00000 Sectors]
Firmware state: Online, Spun Up
Inquiry Data:      WD-WMC300410955WDC WD20EFRX-68AX9N0                    80.00A80
Device Speed: Unknown 
Media Type: Hard Disk Device
Enclosure Device ID: 8
Device Id: 4
Non Coerced Size: 931.012 GB [0x74606db0 Sectors]
Coerced Size: 931.0 GB [0x74600000 Sectors]
Firmware state: Unconfigured(good), Spun Up
Inquiry Data:      WD-WCAV5E944009WDC WD10EARS-00Y5B1                     80.00A80
Device Speed: Unknown 
Media Type: Hard Disk Device
Enclosure Device ID: 8
Device Id: 5
Non Coerced Size: 1.818 TB [0xe8d088b0 Sectors]
Coerced Size: 1.818 TB [0xe8d00000 Sectors]
Firmware state: Unconfigured(good), Spun Up
Inquiry Data:       MJ0251YMG06ZAAHitachi HUA5C3020ALA640                 ME0KR5A0
Device Speed: Unknown 
Media Type: Hard Disk Device
root@jackal777[/opt/MegaRAID/MegaCli]# 

 

4) We are going to use the last two drives for creating RAID 0 array. The firmware state of these two drives is “Unconfigured(good), Spun Up“. The first two drives is already configured as RAID 1. Details of the two disks is pasted below,

Disk 1:

Enclosure Device ID: 8
Device Id: 4
Non Coerced Size: 931.012 GB [0x74606db0 Sectors]
Coerced Size: 931.0 GB [0x74600000 Sectors]
Firmware state: Unconfigured(good), Spun Up
Inquiry Data:      WD-WCAV5E944009WDC WD10EARS-00Y5B1                     80.00A80
Device Speed: Unknown 
Media Type: Hard Disk Device

Disk 2:

Enclosure Device ID: 8
Device Id: 5
Non Coerced Size: 1.818 TB [0xe8d088b0 Sectors]
Coerced Size: 1.818 TB [0xe8d00000 Sectors]
Firmware state: Unconfigured(good), Spun Up
Inquiry Data:       MJ0251YMG06ZAAHitachi HUA5C3020ALA640                 ME0KR5A0
Device Speed: Unknown 
Media Type: Hard Disk Device

 

The general format for creating raid array 0,1 or 5 using MegaCli is as follows,

MegaCli -CfgLdAdd -r(0|1|5) [E:S, E:S, ...] -aN

 

Where E refers to Enclosure Deivce ID and S refers to Device Id.

Now create the RAID 0 array using drives [8:4] and [8:5] as follows,

 

root@jackal777[/opt/MegaRAID/MegaCli]# ./MegaCli64 -CfgLdAdd -r0[8:4,8:5] -a0
                                     
Adapter 0: Created VD 1

Adapter 0: Configured the Adapter!!

Exit Code: 0x00
root@jackal777[/opt/MegaRAID/MegaCli]# 

 

 

 

NOTE:

Use the MegaCli-8.01.06-1.i386.rpm from url. And use the package Lib_Utils-1.00-08.noarch.rpm from 8.00.29_Linux_MegaCli.zip (downloaded from official website). Dont use the MegaCli-8.00.29-1.i386.rpm from 8.00.29_Linux_MegaCli.zip because the MegaCli version contained inside zip file doesn’t support Logical drive creation. And we have to use version 8.01

 

 

REFERENCES:

http://tools.rapidsoft.de/perc/perc-cheat-sheet.html
http://www.overclock.net/t/359025/perc-5-i-raid-card-tips-and-benchmarks
http://blog.nexcess.net/2010/12/28/managing-hardware-raid-with-megacli/
http://community.spiceworks.com/how_to/show/8781-configuring-virtual-disks-on-a-perc-5-6-h700-controller
http://tools.rapidsoft.de/perc/perc-cheat-sheet.html
http://hwraid.le-vert.net/wiki/LSIMegaRAIDSAS
http://artipc10.vub.ac.be/wordpress/2011/09/12/megacli-useful-commands/
http://hwraid.le-vert.net/wiki/LSIMegaRAIDSAS
http://preston4tw.blogspot.in/2013/03/megacli-80216-breaks-dell-perc-5i.html
https://code.google.com/p/fastvps/downloads/detail?name=MegaCli-8.01.06-1.i386.rpm&can=2&q=

Categories: Linux Command Line, RAID