Set up RAID 0 using mdadm

Set up RAID 0 using mdadm

Steps to configure RAID 0 in Centos7.


Code

  1. lsblk
  2. yum install -y mdadm
  3. mdadm --create --verbose /dev/md0 --level=0 --raid-devices=2 /dev/sdb /dev/sdc
  4. mkfs.ext4 /dev/md0
  5. mkdir /mnt/raid0-drive
  6. mount /dev/md0 /mnt/raid0-drive
  7. df -h



Code Summary 

LSBLK: - LSBLK is used to display details about block devices and these block devices(Except ram disk) are basically those files that represent devices connected to the pc.
MDADM: - MDADM command is used to monitor and manage software RAID devices.

Use Case

lsblk: - Get Block Devices Name
yum install -y mdadm:- Install MDADM
mdadm --create --verbose /dev/md0 --level=0 --raid-devices=2 /dev/sdb /dev/sdc: - Here 
      /dev/md0: - Creating RAID
      --level=0:- Define RAID Level
      --raid-devices=2:- No of Storage Devices
      /dev/sdb:- Name of Storage Device1 (get this using lsblk command) which you want to create RAID.
      /dev/sdc:- Name of Storage Device2 (get this using lsblk command) which you want to create RAID.
mkdir /mnt/raid0-drive: - Creates Directory.
mkfs.ext4 /dev/md0: - Creating File System
mount /dev/md0 /mnt/raid0-drive: - Mount RAID to system
df -h: - Report File System Disk Space Usage.

    • Related Articles

    • Linux Software RAID Failure Alert - Troubleshooting Guide

      Purpose This document provides a standardized approach for handling and troubleshooting the Linux Software RAID Failure alert, enabling L1 and L2 engineers to respond quickly, minimize risk, and maintain system stability. Alert Name Linux Software ...
    • RAID Card Detection Validation Procedure

      This document outlines the standard technical steps to validate whether a RAID controller card is installed and detected correctly in a server system. These steps should be followed by field engineers and support teams whenever RAID detection issues ...
    • How to enable SAN Connectivity and RAID Controller using HBA Card?

      HBA Card is used for enabling communication between servers and storage devices SAN (Storage Area Network A Storage Area Network (SAN) is a specialized, high-speed network that provides block-level network access to storage RAID Controller RAID ...
    • Backup, Snapshot, and Restore Linux installations using Timeshift

      If you mess up (or are going to mess up) some config files or drivers, it is always good to have a fallback point. The de-facto standard for doing this on Linux is Timeshift. Timeshift for Linux is an application that provides functionality similar ...
    • Creating RAID using an add-on Card through the BIOS

      Creating Raid Configuration using an Add-on RAID Card through BIOS To create a RAID configuration using an add-on RAID card through the BIOS, you'll typically follow these general steps. Keep in mind that specific steps can vary based on the RAID ...