AI Chat

RAID Configuration Guide for Dedicated Servers: RAID 0, 1, 5, 6 & 10 Explained

RAID Configuration Guide Dedicated Servers
Ask AI to extract steps & commands from this tutorial:

A drive in your dedicated server will fail one day. Without RAID, that can mean lost data and hours of downtime. RAID joins several drives into one logical disk, so the server survives a failure, runs faster, or both.

The hard part is picking the right level. Choose badly and you waste half your storage, or find out during a failure that you had no protection at all.

Quick answer: RAID 0 is fast but has no protection. RAID 1 mirrors two drives. RAID 5 survives one failed drive, RAID 6 survives two, and RAID 10 combines speed with mirroring. No RAID level replaces a backup.

What Is RAID?

RAID stands for Redundant Array of Independent Disks. Your server sees the group of drives as a single disk, while the drives share the work behind the scenes.

Four terms explain every RAID level:

  • Striping: data is split into chunks and spread across drives, so reads and writes happen in parallel.

  • Mirroring: the same data is written to more than one drive.

  • Parity: extra recovery data, calculated from your data, that lets the array rebuild a lost drive.

  • Rebuild: copying or recalculating data onto a replacement drive after a failure.

The Main RAID Levels

RAID 0: Speed Without Protection

RAID 0 stripes data across all drives, with no copies and no parity.

  • Minimum drives: 2

  • Usable capacity: all of it (2 × 2TB = 4TB)

  • Failures survived: none. One dead drive destroys the whole array.

  • Good for: cache, scratch space, and temporary data you can recreate.

RAID 0 is riskier than a single drive, because every extra drive is another chance for failure.

RAID 1: A Simple Mirror

RAID 1 writes identical data to two drives. If one dies, the other carries on.

  • Minimum drives: 2

  • Usable capacity: one drive's worth (2 × 2TB = 2TB)

  • Failures survived: 1

  • Good for: operating system drives and small, important databases.

RAID 5: Capacity Plus Protection

RAID 5 stripes data and spreads parity across all drives. If one drive fails, the array rebuilds the missing data from the rest.

  • Minimum drives: 3

  • Usable capacity: total minus one drive (4 × 2TB = 6TB)

  • Failures survived: 1

  • Good for: file storage and read-heavy workloads where capacity matters.

Writes are slower than RAID 1 or 10, because the server calculates parity on every write. Rebuilds on large hard drives take hours, and a second failure during the rebuild loses the array.

RAID 6: Two Failures Allowed

RAID 6 works like RAID 5 with a second set of parity.

  • Minimum drives: 4

  • Usable capacity: total minus two drives (4 × 2TB = 4TB)

  • Failures survived: 2

  • Good for: large hard-drive arrays, where long rebuilds make a second failure more likely.

RAID 10: Fast and Safe

RAID 10 (or RAID 1+0) mirrors drives in pairs, then stripes data across the pairs.

  • Minimum drives: 4

  • Usable capacity: half the total (4 × 2TB = 4TB)

  • Failures survived: at least 1, and more if they hit different pairs. Losing both drives of one pair loses the array.

  • Good for: busy databases, virtualisation hosts, and any workload with many small writes.

RAID 10 skips parity calculations, so writes stay fast and rebuilds are quick: the array only copies data from the surviving drive in the pair.

RAID Levels Compared

The numbers assume four 2TB drives, except RAID 1 (two drives) and RAID 5 (a four-drive example).

Factor RAID 0 RAID 1 RAID 5 RAID 6 RAID 10
Minimum drives 2 2 3 4 4
Usable capacity 8TB 2TB (2-drive mirror) 6TB 4TB 4TB
Failures survived 0 1 1 2 1 or more
Write speed Highest Moderate Slower (parity) Slowest (double parity) High
Rebuild speed Not possible Fast Slow on large HDDs Slowest Fast
Best for Temporary data OS drives Capacity storage Large HDD arrays Databases

Real speeds depend on your drives and workload. A RAID 1 array can also mirror more than two drives, which gives more safety and no extra capacity.

Which RAID Level Should You Choose?

Your situation Choose
Operating system or small important data on two drives RAID 1
Production database or busy application, four or more drives RAID 10
File or backup storage where capacity matters most RAID 5
Large hard-drive array where safety matters most RAID 6
Temporary data you can recreate RAID 0
One drive only No RAID is possible, so plan backups and add a second drive later

Drive type matters as well. NVMe and SSD arrays rebuild much faster than hard drive arrays, which lowers the risk of RAID 5. On big hard drives, RAID 6 or RAID 10 is the safer choice.

Hardware RAID vs Software RAID

Hardware RAID uses a dedicated controller card with its own processor and cache. It frees your CPU, but if the controller fails, recovery may need an identical card.

Software RAID is handled by the operating system. On Linux the standard tool is mdadm. It needs no special hardware and the array can move to another server more easily.

eServers UK lists software RAID configurations on its Linux dedicated servers, so the mdadm steps below apply to that range. Drive layouts there vary from two SSDs to four hard drives or NVMe pairs, which map to the levels above. Check the exact drive count and RAID options of your configuration before you order.

How to Set Up Software RAID With mdadm

Read this first: mdadm --create and mkfs erase whatever is on the drives you name. Use these steps only on empty data drives, never on the disk your operating system runs from. Check each drive by its size, model, and serial number, because names like /dev/sdb can change between reboots. If your OS drives need RAID, set it up during installation or ask your provider how it is configured. Keep console access (such as IPMI/KVM) available in case something goes wrong.

These steps are for Ubuntu and Debian. AlmaLinux and Rocky Linux are nearly identical.

Step 1: Install mdadm and Identify Your Drives

bash

sudo apt update
sudo apt install -y mdadm
lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINT,MODEL,SERIAL
cat /proc/mdstat
                            

NVMe drives appear as /dev/nvme0n1, /dev/nvme1n1, and so on. A drive with no mount point is not necessarily empty, because it may hold unmounted partitions or old RAID data. Run sudo mdadm --examine /dev/sdb on each candidate: "No md superblock detected" means no old RAID metadata.

The examples below use /dev/sdb to /dev/sde. Replace them with your own drives.

Step 2: Create the Array

Run only the one command that matches your RAID level.

RAID 1 (two drives):


sudo mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb /dev/sdc
                            

RAID 5 (three drives):


sudo mdadm --create /dev/md0 --level=5 --raid-devices=3 /dev/sdb /dev/sdc /dev/sdd
                            

RAID 6 (four drives):


sudo mdadm --create /dev/md0 --level=6 --raid-devices=4 /dev/sdb /dev/sdc /dev/sdd /dev/sde
                            

RAID 10 (four drives):


sudo mdadm --create /dev/md0 --level=10 --raid-devices=4 /dev/sdb /dev/sdc /dev/sdd /dev/sde
                            

RAID 0 (two drives):


sudo mdadm --create /dev/md0 --level=0 --raid-devices=2 /dev/sdb /dev/sdc
                            

Watch the initial sync:


cat /proc/mdstat
                            

You can use the array while it syncs, though speed is lower until it finishes. RAID 0 has nothing to sync.

Step 3: Format and Mount It

bash

sudo mkfs.ext4 /dev/md0
sudo mkdir -p /mnt/data
sudo mount /dev/md0 /mnt/data
df -h /mnt/data
                            

Step 4: Make It Survive a Reboot

Save the array definition so the system finds it at boot. First check that /etc/mdadm/mdadm.conf doesn't already list this array, to avoid duplicate lines:

bash

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

On AlmaLinux or Rocky Linux the file is /etc/mdadm.conf, and you rebuild the boot image with dracut -f.

Next, mount it automatically. Get the filesystem UUID (not the RAID array UUID):


sudo blkid /dev/md0
                            

Add this line to /etc/fstab, using your own UUID:

fstab

UUID=your-filesystem-uuid  /mnt/data  ext4  defaults  0  2
                            

Test the file before you reboot:

bash

sudo findmnt --verify
sudo mount -a
findmnt /mnt/data
                            

About nofail: adding it lets the server boot even if the array is missing. That helps if you need to log in and fix a broken array, but an application that expects /mnt/data could then quietly write to the root disk instead. Add nofail only if nothing critical depends on that mount.

Step 5: Check Array Health

bash

sudo mdadm --detail /dev/md0
                            

A healthy array shows State : clean and each drive as active sync. degraded means a drive is missing or failed, and the array has lost its protection.

What to Do When a Drive Fails

On RAID 1, 5, 6, and 10 the server keeps running, but you have no safety margin until the drive is replaced. A second failure can lose everything, so act the same day.

  1. Find the failed drive.

    
    cat /proc/mdstat
    sudo mdadm --detail /dev/md0
                                        

    Match the failed member to a physical drive by serial number (lsblk -o NAME,SERIAL), not by the /dev/sdX name alone.

  2. Mark it failed and remove it. Run these only after you are sure /dev/sdc is the faulty member of /dev/md0 (replace both names with yours):

    
    sudo mdadm --manage /dev/md0 --fail /dev/sdc
    sudo mdadm --manage /dev/md0 --remove /dev/sdc
                                        
  3. Replace the physical drive. On a hosted server, open a support ticket with the failed drive's serial number. eServers lists a guaranteed 1-hour hardware replacement on its Linux servers, and its bare-metal range includes IPMI/KVM access for console work while you wait. Don't pull a drive from a running server unless the hardware supports hot-swapping.

  4. Add the new drive. Find its name with lsblk, since it may differ from the old one, then add it (replace /dev/sdX with the new drive):

    
    sudo mdadm --manage /dev/md0 --add /dev/sdX
                                        

    If your array uses partitions instead of whole disks, create the same partition layout on the new drive first.

  5. Watch the rebuild.

    
    watch cat /proc/mdstat
                                        

    The array is not fully protected until the rebuild finishes. Avoid reboots and heavy workloads meanwhile. If you see several failed drives or read errors, stop and ask your provider for help, because further changes can make recovery harder.

Set Up Failure Alerts

A degraded array that nobody notices is waiting for a second failure. Add your email to /etc/mdadm/mdadm.conf:

conf

MAILADDR [email protected]
                            

This only works if the server can send email, so set up a mail relay and test it:

bash

sudo mdadm --monitor --scan --test --oneshot
                            

Check that the test message actually arrives in your inbox.

RAID Is Not a Backup

RAID protects you from a drive failing. It does not protect you from:

  • Deleting a file by accident (the deletion happens on every drive at once)

  • Ransomware or corrupted data

  • A bad command or software bug that overwrites good data

  • Fire, theft, or damage to the whole server

  • More drives failing than the array can handle

Keep backups on a separate server or storage system, and test restoring from them regularly.

Frequently Asked Questions

Which RAID level is best for a dedicated server? +

It depends on the job. RAID 1 suits OS drives, RAID 10 suits databases and busy applications, and RAID 5 or 6 suits large storage.

What is the difference between RAID 5 and RAID 10? +

RAID 5 gives more usable space (total minus one drive) but writes slower and rebuilds slower. RAID 10 gives half the space, with faster writes and quick rebuilds.

Is RAID 0 safe for production? +

Only for data you can recreate. One failed drive destroys the whole array.

How many drives do I need for RAID 10? +

At least four, in pairs.

Is software RAID good enough for production? +

Yes, for most workloads. Linux mdadm is mature and has no controller to fail. Its reliability still depends on good drives, monitoring, and tested recovery steps.

Can I use RAID with NVMe drives? +

Yes. mdadm supports NVMe drives, and rebuilds are faster than on hard drives.

Can I change the RAID level later? +

Some changes, such as adding drives to an array, are possible. Switching levels is risky and usually means backing up, rebuilding, and restoring, so decide carefully at the start.

Do I need RAID on a VPS? +

Usually not. The provider handles storage redundancy underneath, though how well varies by provider.

Conclusion

RAID is a basic building block of a reliable dedicated server. Match the level to your workload, set up failure alerts, and keep real backups alongside it.

To choose hardware with the right drive layout, explore eServers UK's bare-metal dedicated servers, Linux dedicated servers, or storage dedicated servers for high-capacity builds. Confirm the available RAID options for your chosen configuration before you order.

Discover eServers Dedicated Server Locations

eServers provides reliable dedicated servers across multiple global regions. Whether you need low latency, regional compliance, or proximity to your audience, our wide geographic coverage ensures the perfect hosting environment for your project.

Our Bandwidth providers

We are Partners with 15 +

At eServers , we proudly partner with 15+ leading global tech providers to deliver secure, high-performance hosting solutions. These trusted alliances with top hardware, software, and network innovators ensure our clients benefit from modern technology and enterprise-grade reliability.

Hosting Solutions