Install and utilize MegaCLI.

If you are like a lot of techs out there a Dell hypervisor is installed somewhere in your environment. If you have opted to go the vSAN route then you will want to configure your server to utilize its SSDs or spinning disks for that vSAN. Doing the work via Dell Open Managae System Administrator will work but it is tedious and time consuming, so is the local RAID BIOS utility. Fortunately most of the PERC RAID controllers are just a rebranded MegaRAID so that means we can utilize the MegaCLI within the ESXi OS.

To utilize MegaCLI you will first need to download the VIB from any of the sources available. This article is specifically written around version 8.07.07. Once the VIB is obtained you have two options to install the VIB onto the hypervisor; Install via SSH or VMware Update Manager (VUM). VUM should be a simple process, however since the VIB does not include a proper SSL certificate then it will typically fail as sig-check is enforced. At the time I write this article I highly recommend keeping any VIB that is not properly signed out of your VUM installation to prevent errors.

To install MegaCLI via SSH is pretty simple. First, if you have not already enabled SSH login to your hypervisor then you should do so now, then SSH into the host. If your host is able to hit the internet then you can run a simple wget command for the location of your choice. “wget http://www.nuthouse.us/files/vmware-esx-MegaCli-8.07.07.vib” If the host does not have internet access then you can upload it to a datastore with the web or vSphere client. Once the VIB is on the hypervisor you run the install command.

MegaCLI - Install

  1. Copy the vib onto the host.
  2. Install the VIB, no reboot is required:

     esxcli software vib install -v /location_of_file/vmware-esx-MegaCli-8.07.07.vib --no-sig-check 
    

Now the VIB is installed we are ready to use the tool. Any commands being run need to call out the MegaCLI, the easiest way is to simply change directory to the installation location.

Change director to install location:

	cd /opt/lsi/MegaCLI

Display Virtual Disk Information:

	./MegaCli -LDInfo -Lall -aAll

Display Physical Disk Information:

	./MegaCli -PDList -aAll

Configure RAID set:

	./MegaCli -cfgLdAdd -r0 [32:2] [WT] [NORA] [DIRECT] -a0

Where:

  • r0 = RAID type (r0, r1, r5, etc)
  • 32:2 = HBD ID 32 (Default) and after colon is actual disk# as installed in the backplane.
  • WT = Write through (can also be WB for Write Back)
  • NORA = No Read Ahead (can also be Read Ahead (RA) or Adapative Read Ahead (ADRA))
  • DIRECT = Disk Cache Policy of Disabled (can also be Cached to enable Disk Cache Policy)
  • a0 = Controller ID

Configure Virtual Disk name:

	./MegaCli -LDSetProp -Name SSD_Cache_Disk1 -L1 -a0

Where:

  • SSD_Cache_Disk1 = Name of the virtual disk, cannot have spaces or quotes
  • L1 = Virtual Disk volume that is going to be labeled.
  • a0 = Controller ID

Delete Logical Disks:

	./MegaCli -CfgLdDel -L1 -a0

Where:

  • L1 = Logical Unit
  • a0 = Controller ID