CloudShark Support


What is a RAID?

A RAID is a hardware strategy for improving some characteristic of a hard drive, such as the speed or the reliability. Multiple hard drives are configured in an group using a piece of hardware called a RAID controller. The PCA1000 utilizes a RAID to improve the reliability of its hard drives.

The PCA1000 ships with a popular RAID controller card, the MegaRAID SAS 9260-4i. There are two SATA hard drives, each four terabytes, in the PCA1000. The RAID is configured to mirror these drives. (A mirror is also called RAID-1.) This means that the drives are kept identical, and that the maximum storage on the system is four terabytes, not eight. But in so doing, either of the drives can have a single catastrophic failure and the system will continue to operate.

The RAID can technically be converted to a stripe (RAID-0). The properties of a stripe are the inverse of a mirror: The size is doubled, the speed is increased by some reasonable value between 0% and 100%, but the entire virtual disk becomes unusable of any disk in the stripe fails. The risks of data loss are greater than that of a single hard drive system, and so it is unsupported to convert the PCA1000 to a stripe. (The entire operating system requires reinstallation for this procedure, as well.)

How to manage the PCA1000 RAID

You can download the full MegaCLI User Guide linked to by this excellent LSI MegaRAID Walk-through Guide.

Install the MegaCLI binary

To see if you already have the MegaCLI binary installed, type the following on your PCA1000 terminal:

which megacli

If there is an error, then you will need to perform the following steps:

  • Enter the RPM subdirectory:
cd 8.07.10_MegaCLI_Linux/Linux\ MegaCLI\ 8.07.10
  • Extract the contents of the RPM:
rpm2cpio ./MegaCli-8.07.10-1.noarch.rpm | cpio -idmv
  • Copy the MegaCLI64 binary to your system:
cp opt/MegaRAID/MegaCli/MegaCli64 /usr/bin/megacli

Using the MegaCLI tool

To output all of the information about your RAID controller:

megacli -AdpAllInfo -a0

To show the logical disks:

megacli -LDInfo -Lall -a0

To show the physical disks:

megacli -PDList -a0

To show/disable/enable auto rebuild:

megacli -AdpAutoRbld -Dsply -a0
megacli -AdpAutoRbld -Dsbl -a0
megacli -AdpAutoRbld -Enbl -a0

To show/change the rebuild rate (the higher the rate, the more sluggish the system will be for users, but the shorter the duration of the rebuild to restore the RAID):

megacli -AdpGetProp RebuildRate -a0
megacli -AdpSetProp RebuildRate 60 -a0

To silence the alarm:

megacli -AdpSetProp -AlarmSilence -aALL

These next commands require the Enclosure and Slot to be specified. Your Enclosure settings can be set using the following subshell. The Slot on a PCA1000 refers to a specific hard drive within the PCA 1000. You must use the above info commands to determine the correct value. The command to show the physical disks above will show the Slot that it is associated with. Looking at the front of the PCA the hard disk with the lower Slot number will be the disk to the left and the higher Slot number will be to the right.

ENCLOSURE=$(megacli -PDList -aAll|grep "Enclosure Device ID:"|tail -1|awk '{print $4}')
SLOT=0 # Use command above to determine value

To rebuild a drive that is marked as “Foreign” when inserted:

megacli -PDMakeGood -PhysDrv"[$ENCLOSURE:$SLOT]"  -aALL
megacli -CfgForeign -Clear -aALL
megacli -PDHSP -Set -PhysDrv "[$ENCLOSURE:$SLOT]" -aALL
megacli -PdInfo -PhysDrv "[$ENCLOSURE:$SLOT]" -aALL
megacli -pdrbld -showprog -physdrv"[$ENCLOSURE:$SLOT]" -aALL

To replace a drive that has gone bad, run these three steps, and then select from hot swap or cold swap:

megacli -PDOffline -PhysDrv "[$ENCLOSURE:$SLOT]" -a0
megacli -PDMarkMissing -PhysDrv "[$ENCLOSURE:$SLOT]" -a0
megacli -PDPrpRmv -PhysDrv "[$ENCLOSURE:$SLOT]" -a0

To hot swap in a new drive, install the drive and then mark it as a hot spare. The rebuild should start automatically:

megacli -PDHSP -Set -PhysDrv "[$ENCLOSURE:$SLOT]" -a0

For cold swap replacement:

First learn the row of the drive:

megacli -PdGetMissing -a0

Then substitute rowN with the row of the drive:

megacli -PdReplaceMissing -PhysDrv "[$ENCLOSURE:$SLOT]" -ArrayN -rowN -a0 # add the new drive to the raid.
megacli -PDRbld -Start -PhysDrv "[$ENCLOSURE:$SLOT]" -a0 # and force it to rebuild.

To view the status of the rebuild use the command:

megacli -PDRbld -ShowProg -PhysDrv "[$ENCLOSURE:$SLOT]" -aAll

For example:

[root@localhost ~]# megacli -PDRbld -ShowProg -PhysDrv "[$ENCLOSURE:$SLOT]" -aAll

Rebuild Progress on Device at Enclosure 252, Slot 2 Completed 48% in 192 Minutes.

Exit Code: 0x00

About CloudShark

CloudShark is made by QA Cafe, a technology company based in Portsmouth, NH. Our passion for packet captures has grown out of our other product CDRouter.

Get in touch via our Contact us page or by following us on your favorite service: