Exclusive Metin2 game shield on FreeBSD: Automatic siege mode, VIP list, and whitelist from your dashboard. See how it works
Create a server

Guide

How to Set Up a RAID Array in Linux

Software RAID (mdadm) adds redundancy or throughput across disks. On a VPS/dedicated with spare disks, RAID1 is the common case.

Steps

  1. Install mdadm and list disks (adjust /dev/sdX to your hardware):

    sudo apt update
    sudo apt install -y mdadm
    lsblk
    sudo fdisk -l
  2. Create a RAID1 from two clean disks (destroys data!):

    sudo mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/sdb /dev/sdc
    cat /proc/mdstat
  3. Format, mount and persist in fstab:

    sudo mkfs.ext4 /dev/md0
    sudo mkdir -p /mnt/raid
    echo '/dev/md0 /mnt/raid ext4 defaults,nofail 0 2' | sudo tee -a /etc/fstab
    sudo mount -a
    df -h /mnt/raid
  4. Save mdadm config for boot:

    sudo mdadm --detail --scan | sudo tee -a /etc/mdadm/mdadm.conf
    sudo update-initramfs -u
    sudo mdadm --detail /dev/md0

Tips

  • On many cloud VPS the “disk” is already virtual — confirm RAID makes sense in the panel.
  • Watch /proc/mdstat after a disk failure before rebuilding.

ext step

More disks and RAM for serious storage: Deploy your Cloud VPS.

Related guides