Skip to content

Infrastructure Management

Ashish Rai edited this page Jul 15, 2024 · 1 revision

This page is a comprehensive collection of procedures undertaken for the management of hardware that runs Vital.

Installation and setup of disks

Most of the machines currently running the different services of Vital are SuperMicro machines (old infrastructure). These machines come with a hardware RAID manager called MegaRAID (by Broadcom). MegaRAID is a high-performance, enterprise-grade alternative to software RAID managers.

With MegaRAID, newly installed disks need to be configured before they can be used by the OS. There are two ways to do this - the MegaRAID configuration utility in BIOS or the storcli binary. This document will cover disk configuration with storcli.

Download and install storcli

  • Download the latest supported storcli package from the Broadcom website.
    • You need to agree to a license before the download starts, so you cannot use wget or curl to download. Download in your local machine with a browser and copy it to the remote machine.
  • Unzip the package and get the *.deb file for Ubuntu (or the OS you're running on the remote machine).
  • Install the package with sudo dpkg -i package-name.deb
  • The package will be installed at /opt/MegaRAID/storcli/storcli64
    • Optionally, you can set an alias in your ~/.bashrc for storcli - alias storcli="/opt/MegaRAID/storcli/storcli64"

Configuration of newly installed disk

Create virtual disk with storcli

  • The physical disks could be in one of the states: Online, Offline, Unconfigured Bad, Unconfigured Good, JBOD (Just a Bunch of Disks).
  • List all physical disks
    • storcli64 /c0 /eall /sall show
  • All newly installed disks are in the 'Unconfigured Good' state to begin with.
    • You will need the enclosure and slot IDs of the new disk during configuration
  • Create a virtual disk using one or more physical disk(s):
    • RAID0 virtual disk with backing of one physical disk: storcli /c0 add vd type=raid0 drives=<EID>:<Slt> name=NewDisk
    • RAID1 virtual disk with backing of two physical disks: storcli /c0 add vd type=raid1 drives=<EID>:<Slt>,<EID>:<Slt> name=NewDisk
  • Verify the newly added virtual disk
    • storcli /c0 show
  • Verify if the disk can be used by the OS
    • For Ubuntu and Debian based systems, check the output of lsblk or fdisk -l.

For more commands, refer the official storcli guide.

Create a partition

  • Create a GPT partition table
    • partedUtil mklabel /dev/sdX gpt
  • Create a new GPT partition on the disk - partedUtil /dev/sdX
  • Format the new partition with a filesystem - mkfs.ext4 /dev/sdX1
  • Finally, mount the partition to a directory
    • mkdir -p /mnt/newdir
    • mount /dev/sdX1 /mnt/newdir

Clone this wiki locally