Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Megacli tool commands to gather information of MegaRAID  (Read 3542 times)

0 Members and 1 Guest are viewing this topic.

Leo.Prince

  • Guest
Megacli tool commands to gather information of MegaRAID
« on: November 03, 2013, 06:42:40 pm »
Hi,

MegaCli is a command line configuration utility for LSI-based RAID controllers. We can build, repair and remove raid devices with this tool. I am here lists some of the commands that will be useful for everyone to check the status/gather information of the current status of the MegaRAID server.

First of all Installing MegaCli

1, Downloading package to the server.

http://www.lsi.com/downloads/Public/MegaRAID%20Common%20Files/8.04.07_MegaCLI.zip

2, Unzip the contents of the folder using the 'unzip' command and then untar it using the tar command.

3, You will have two .rpm files. Install it using rpm.

Code: [Select]
rpm -ivh *.rpm
4. The default directory for the installed utility will be in the /opt/MegaRAID/MegaCli folder. It will either be called MegaCli or MegaCli64.

5. To make running the command by just typing 'MegaCli' we will setup an alias like so:

Code: [Select]
alias MegaCli="/opt/MegaRAID/MegaCli/MegaCli64"
6, Don't forget to add the same line to /root/.bashrc so it stays there after boot.

You are now ready to use the MegaCli utility. Now I am listing some of the useful commands that can be used to gather information.

To get Control information

Code: [Select]
MegaCli -AdpAllInfo -aALL
Enclosure information

Code: [Select]
MegaCli -EncInfo -aALL
Virtual/Logical drive information

Code: [Select]
MegaCli -LDInfo -Lall -aALL
Physical drive information

Code: [Select]
MegaCli -PDList -aALL
MegaCli -PDInfo -PhysDrv [E:S] -aALL

Battery backup information

Code: [Select]
MegaCli -AdpBbuCmd -aALL
There are plenty of commands and scope for this MegaCli tool which is out of bound of this article. Hence I am stopping this here. I hopes you are having a basic idea to use MegaCli within a MegaRAID environment.

Thanks, Leo Prince.