In this day and age, you need your machines to be up and running 100% of the time, or as close to that as possible. This means that rebooting a server just to get some detail about your RAID configuration is completely out of the question.
Luckily, some RAID cards have the ability to be configured even from a running system. In the case of this article, we’re looking at LSI or PERC (As the Dell guys call them) cards.
For this guide, we assume you are running an RPM based version of Linux, e.g. Red Hat Enterprise Linux, CentOS, Scientific Linux, etc.
Step 1: Download the MegaRAID software package. You will need to accept the terms and conditions on the following page:
Step 1: Seems like LSI was taken over by another company. Finding it was a bit harder, but here is the latest version of the software. (as at 14 October 2015)
Step 2: Copy the file to an appropriate location on your Linux machine. In this case, we will use /var/tmp/
Step 3: Execute the following commands (in the exact order)
# Log in as 'root' user or use 'sudo' to execute the following commands [root@rhel_host ~] cd /var/tmp [root@rhel_host tmp] unzip 8-07-14_MegaCLI.zip [root@rhel_host tmp] cd Linux [root@rhel_host Linux] rpm -Uvh MegaCli-8.07.14-1.noarch.rpm ....wait for installer to finish.... [root@rhel_host Linux] alias MegaCli="/opt/MegaRAID/MegaCli/MegaCli64" |
Step 4: Make the alias command, above, permanent
# Navigate to your home directory [root@rhel_host MegaCLI_Linux] cd ~ # Open your .bashrc file and add the following line [root@rhel_host ~] vim .bashrc alias MegaCli='/opt/MegaRAID/MegaCli/MegaCli64' |
Step 5: Test the install. As an example, let’s list all the logical volumes in the machine (output may differ based on configuration.
[root@rhel_host MegaCLI_Linux] MegaCli -LDInfo -Lall -aALL Adapter 0 -- Virtual Drive Information: Virtual Drive: 0 (Target Id: 0) Name :Virtual Disk 0 RAID Level : Primary-5, Secondary-0, RAID Level Qualifier-3 Size : 1.088 TB Sector Size : 512 Parity Size : 278.875 GB State : Optimal Strip Size : 64 KB Number Of Drives : 5 Span Depth : 1 Default Cache Policy: WriteBack, ReadAdaptive, Direct, No Write Cache if Bad BBU Current Cache Policy: WriteBack, ReadAdaptive, Direct, No Write Cache if Bad BBU Default Access Policy: Read/Write Current Access Policy: Read/Write Disk Cache Policy : Enabled Encryption Type : None Bad Blocks Exist: No Is VD Cached: Yes Cache Cade Type : Read Only Virtual Drive: 1 (Target Id: 1) Name :JBOD RAID Level : Primary-0, Secondary-0, RAID Level Qualifier-0 Size : 278.875 GB Sector Size : 512 Parity Size : 0 State : Optimal Strip Size : 64 KB Number Of Drives : 1 Span Depth : 1 Default Cache Policy: WriteBack, ReadAdaptive, Direct, No Write Cache if Bad BBU Current Cache Policy: WriteBack, ReadAdaptive, Direct, No Write Cache if Bad BBU Default Access Policy: Read/Write Current Access Policy: Read/Write Disk Cache Policy : Disk's Default Encryption Type : None Bad Blocks Exist: No Is VD Cached: Yes Cache Cade Type : Read Only Exit Code: 0x00 |
Check back soon for a small guide on some simple functions for the MegaRAID utility
Here is the Broadcom link: https://www.broadcom.com/site-search?q=megacli