How to set JBOD for LSI MegaRAID Cards with CacheCade

This article applies to all LSI MegaRAID cards that support JBOD. Was tested on OVH’s FS-72T servers with LSI MegaRAID SAS 9271-8i with firmware 23.34.0-0019.

For all commands to work you need megacli installed. For OVH servers you just need to boot the machine in rescue-pro64 more.

1. Flash the latest LSI MegaRAID firmware or ask your provider to do it for you. You can get information about your LSI card by running:

megacli -AdpAllInfo -aALL

2. Reboot into rescue mode and check if the JBOD feature is available and enabled:

megacli AdpGetProp enablejbod -aALL

If JBOD is not enable you should enable it:

megacli AdpSetProp EnableJBOD 1 -aALL

If JBOD is not available for your card, your only option is to create multiple RAID0 arrays – one per physical drive. Leave a comment if you need help in doing so.

3. Force-clear the entire array. You need to -Force it because you want to remove the SSD from CacheCade and expose it to the OS:

megacli -CfgClr -Force -aAll

Important: this will basically destory/clear all settings, including previously set RAID arrays etc. Don’t run this if you care about data already stored on your drives!

4. List your drives.

megacli PDList -aALL

Usually OVH uses enclosure 8 / slots 0-11 for HDDs and enclosure 252 / slot 4 for the SSD.

5. Set the disks as “Good”:

megacli PDMakeGood -PhysDrv[8:0,8:1,8:2,8:3,8:4,8:5,8:6,8:7,8:8,8:9,8:10,8:11,252:4] -Force -a0

6. Create the JBOD.

megacli PDMakeJBOD -PhysDrv[8:0,8:1,8:2,8:3,8:4,8:5,8:6,8:7,8:8,8:9,8:10,8:11,252:4] -a0

You should use PhysDriv[enclosure:slot,enclosure:slot], from step #4, specifying all drives.

7. The end result should be similar with this:

Adapter: 0: EnclId-8 SlotId-0 state changed to JBOD.
Adapter: 0: EnclId-8 SlotId-1 state changed to JBOD.
Adapter: 0: EnclId-8 SlotId-2 state changed to JBOD.
Adapter: 0: EnclId-8 SlotId-3 state changed to JBOD.
Adapter: 0: EnclId-8 SlotId-4 state changed to JBOD.
Adapter: 0: EnclId-8 SlotId-5 state changed to JBOD.
Adapter: 0: EnclId-8 SlotId-6 state changed to JBOD.
Adapter: 0: EnclId-8 SlotId-7 state changed to JBOD.
Adapter: 0: EnclId-8 SlotId-8 state changed to JBOD.
Adapter: 0: EnclId-8 SlotId-9 state changed to JBOD.
Adapter: 0: EnclId-8 SlotId-10 state changed to JBOD.
Adapter: 0: EnclId-8 SlotId-11 state changed to JBOD.
Adapter: 0: EnclId-252 SlotId-4 state changed to JBOD.

8. Reboot and install your desired OS via IPMI. After finishing the install don’t reboot.

Notes:
– installing the OS via OVH’s automated install system will remove all above settings as their tools don’t support JBOD;
– on CentOS7 you can access the CLI by pressing ctrl+alt+f3, after installation is done.

9. Use smartctl to identify the serial number of the drive you are installing the OS onto.

smartctl -i /dev/sdX | grep Serial

Where sdX is the drive you’ve currently installed the OS onto.

If smartctl doesn’t works you could try lsblk:

lsblk --nodeps -o name,serial

Note down the serial number, or use Sprunge to paste text online.

10. Reboot into rescue mode and identify the exact drive you’ve used when installing:

megacli -PDList -Aall

You are looking for the last variable from “Inquiry Data”. Example:

Inquiry Data: HGST HUH728060AL5200 A9072QG8RABC

In this example the serial number is “A9072QG8RABC”.

11. Cross check the serial number you noted down from smartctl and compare it with current results. After identifying the drive you should note down the “Enclosure” and “Slot Number” of that drive. Example:

Enclosure Device ID: 8
Slot Number: 11

12. Check what drive is declared as bootable in the array:

megacli -AdpBootDrive -get -a0

You should get something like:

Adapter 0: Boot Physical Drive -- EnclId- 8 Slotid - 2.

In the example above the bootable drive is on Enclosure 8, Slot 2. Cross-check with the information you’ve got at #11.

In case the Enclosure and Slot are not the correct ones, set the new correct drive as bootable:

megacli -AdpBootDrive -set -physdrv[Enclosure:Slot] -a0

Example:

megacli -AdpBootDrive -set -physdrv[8:2] -a0

13. Reboot & Enjoy.

Was this tutorial useful? Buy me a drink by using the “donate” button below. đŸ™‚

Leave a Comment

Your email address will not be published. Required fields are marked *