Configuring RAIDs for High-Speed File I/O

Configure the RAIDs and filesystems to enable high-speed file I/O.

  1. Acquire hardware information required to build the RAIDs correctly.
    1. Generate a list of installed NVMe namespaces by executing the following command in the Linux terminal:
      sudo nvme list
      Note For the purpose of the data storage server, all NVMe drives must have only a single namespace, the default configuration.
      This list includes the nodes, models, and storage capacities of the NVMe namespaces.
    2. Get the NUMA hardware topology of the data storage server by executing the following command in the Linux terminal:
      lstopo
      The output of this command groups hardware components by NUMA node. Each hardware component belongs either to NUMANode L#0 (NUMA-0) or NUMANode L#1 (NUMA-1). Record the NUMA node of each NVMe drive to refer to when configuring the RAIDs.
    Note The number of RAIDs that must be configured on a data storage server varies depending on your system requirements. However, each simultaneous high-speed data stream requires a dedicated RAID. Many of the following steps must be repeated for each RAID that you configure. NI recommends planning your RAID configuration prior to executing these steps so that each RAID can be configured at the same time, as well as reduce the risk of error. Complete every step for each RAID, where required, before proceeding to other steps.
  2. Create each RAID using the following command template:
    sudo mdadm --create  /dev/[RAID NAME] --chunk=512K --level=0 --raid-devices=[N] [NVME 0] [NVME 1] ... [NVME N]

    Where:

    • [RAID NAME] is a user-specified RAID name. Assign a name using alpha-numeric characters, underscores (_), and/or dashes (-). All other characters are prohibited. For example: md0, md1, md2.
    • [N] is the number of NVMe drives a RAID are built on (must be 5 or greater). For example: 5.
    • [NVME X] is the path to an NVMe device under the /dev directory, as listed in the output of the sudo nvme list in step 1. For example: /dev/nvme0n1.
    Note Each RAID must comply with the following rules:
    • Each NVMe drive within a given RAID must belong to the same NUMA node.
    • Each NVMe drive within a given RAID must be of the same model.
    • Each RAID must be built using at least five NVMe drives.
    • No NVMe drive can be used by more than one RAID.
  3. Create an XFS filesystem on each RAID. Execute the following command template in the Linux terminal for each RAID:
    sudo mkfs.xfs /dev/[RAID NAME]

    Where [RAID NAME] is the user-specified name of a RAID created in step 2.

  4. Create a mount point for the filesystem on each RAID and mount them. Execute the following command template in the Linux terminal for each RAID:
    mkdir [MOUNT DIR]
    mount /dev/[RAID NAME] [MOUNT DIR]
    

    Where [MOUNT DIR] is the user-defined directory where a RAID filesystem should be mounted.

    Note NI recommends that you create each mount directory in the /mnt parent directory. Name each mount directory after the RAID to which it is mounted. For example, the RAID at /dev/md0 has a mount directory at /mnt/md0.
  5. Configure all RAIDs to reassemble automatically after reboot. Execute the following commands in the Linux terminal only a single time:
    sudo mdadm --detail --scan | sudo tee -a /etc/mdadm/mdadm.conf
  6. Check the contents of /etc/mdadm/mdadm/conf to ensure that only the desired RAID arrays have been added to the bottom of the file and that there are no duplicate entries.
    If you find duplicates or undesired entries, remove them.
  7. Execute the following command in the Linux terminal:
    sudo update-initramfs -u
  8. Configure the operating system to mount automatically each RAID filesystem upon reboot. This operation requires the UUID for each filesystem created in the previous steps. Run the following command template for each RAID to get the associated filesystem UUID:
    blkid /dev/[RAID NAME]
    The program returns the filesystem UUID, block size, and type for each RAID:
    /dev/[RAID NAME]: UUID="[FILESYSTEM UUID]" BLOCK_SIZE="[BLOCK_SIZE]" TYPE="xfs"
  9. For each RAID, add the following line to the bottom of /etc/fstab using the filesystem UUID obtained from the previous command:
    UUID=[FILESYSTEM UUID] [MOUNT DIR] xfs defaults,nofail 0 2
    Note Ensure that no duplicate entries exist.
  10. Reboot the data storage server to verify that each RAID automatically rebuilds and mounts as expected.