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

    • 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 ...
    • How to Partition, Format, and Mount Secondary Drives in Linux - Manual Drive Configuration (MDC)

      Introduction This guide provides detailed instructions on how to manually configure secondary drives in a Linux system, including partitioning, formatting, and mounting the drives. Warning Performing these steps on an existing primary drive or a ...
    • What is Boot Process in Linux OS.

      Boot Process in Linux OS. Have you ever wondered what happens behind the scenes from the time you press the power button until the Linux login prompt appears? Press the power button on your system, and after few moments you see the Linux login ...
    • The customer is not able to configure the RAID on supermicro Server.

      Issues: Unable to find the option to configure RAID on the NVMe drives. Model No.: SYS-220BT-HNTR AS-1125HS-TNR Solution: 1) Server Model: 1125HS-TNR It is AMD system, it does not support NVME raid nor VROC key. It only has SAS hard drive raid with ...