Creating Software RAID 5

RAID 5 Requires 3 or more physical disks. It provides the redundancy of RAID 1 combined with the speed and size benefits of RAID 0. RAID 5 uses striping, like RAID 0, but also stores parity blocks distributed across each member disk. In the event of a failed disk, these parity blocks are used to reconstruct the data on a replacement disk. RAID 5 can withstand the loss of one member disk.

I have a server with 4 * 4 TB Disks. Here is parted -l result on the server.

On this server /dev/sda, /dev/sdb, /dev/sdc and /dev/sdd are 4 TB disks and are not in use. Lets format these disk to be used as RAID 5.

Following commands need to be executed for each of the disks.

This will partition the disks, set file system as raid.

Repeat the steps for /dev/sdb, /dev/sdc and /dev/sdd.

Now you have all disks formatted, ready to be used in raid array.

Create RAID 5 array with command

Once raid created, you can see status with command

Before we can use raid array, we need to create a file system on the raid with command

formatting raid 5 array

Create mdadm.conf file with following command

Mount Raid 5 Array

I want to mount the new raid 5 array as /home. For this i edited /etc/fstab, added

After rebooting, i have 11 TB RAID 5 drive mounted as /home

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

Leave a Reply

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