How to Setup Software RAID 0 on Linux Server

RAID 0 allows you to combine multiple disks into one large disk. Only use RAID 0 if the data is not important to you, for example, a backup server. If one disk fails in a RAID 0 array, all the data will be lost.

To create a software RAID 0 with 2 or more disks, first, we need to prepare the disks to be used as RAID members. Run the following commands on each of the disks we will be adding to the RAID 0 array.

Replace /dev/sdX with actual device names and run the commands for all devices you will be adding to the RAID 0.

Create RAID 0

To create RAID 0, run the following command

In the above command,

–raid-devices=2 = number of disks in the RAID. In this case, we have 2 disks. If you have more than 2 disks, change the number accordingly.

/dev/sdc1 /dev/sdd1 = device names, change it with your actual device names. If you have more devices, add them.

/dev/md0 = raid device name, it can be md0, md1, md2 etc..

Format RAID device

Before you can use RAID device, you need to format it.

Replace /dev/mdX with your actual device name.

Updating mdadm.conf


It will print RAID definitions like the following example

You need to edit the file

Add the ARRAY definitions at end of the file. If any definitions are already there, don’t repeat them.

Mounting New RAID Device

Before you can mount RAID device, you need to find UUID for the raid device, this can be done with command


In this cause UUID for /dev/md0 is

Edit /etc/fstab


In the above

/home = is the mount point. If you need to mount the new RAID device as another folder, you need to create an empty directory first.

UUID=”9bd3d3ee-cc6b-43d5-91ed-627440cc9154″ = replace with your actual UUID.

Check status of raid

To see the status of the RAID, use the command

Find RAID details

To find RAID details, use the following command

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *