Skip to content

How To Configure Raid-5 In Linux

Our Score
Click to rate this post!
[Total: 0 Average: 0]

In this tutorial we are going to learn how to configure Raid-5 in redhat linux

Firstly before creating the raid we have to create raid partition so just follow these steps for creating Raid partition

Here you can check the diagram how we are going to create raid-5.

Step-1 Here is the command of creating Raid partition

fdisk -l
fdisk /dev/sda
n {for New Partition}
Select Partition 2
t {For Change Partition}
fd {For Raid Partition}
p {For Check Partition Is created Or Not}
w {For Save}
Partprobe /Dev/Sda {For Refresh}
fdisk -l
fdisk /dev/sda
n {for New Partition}
Select Partition 3
t {For Change Partition}
fd {For Raid Partition}
p {For Check Partition Is created Or Not}
w {For Save}
Partprobe /Dev/Sda {For Refresh}
fdisk -l
fdisk /dev/sda
n {for New Partition}
Select Partition 4
t {For Change Partition}
fd{For Raid Partition}
p {For Check Partition Is created Or Not}
w {For Save}
Partprobe /Dev/Sda {For Refresh}

Step-2 Our first portion of creating Raid partition is complete now we have to create Raid by using this partions

#mdadm --create /dev/md0 --level=5 --raid-devices=3 /dev/sda2 /dev/sda3 /dev/sda4

Step-3 After this now how to check the Raid-5 is created or not

#mdadm --detail --/dev/md0

Step-4 After then now we have to create the folder and mount over the Raid-5

#mkdir /G
#mkfs.ext3 /G
#mount /G 
#df -h 

Step-5 Now our Raid-5 is created and all work is done now if we have to delete the raid-5 so here is the commands to delete raid-5

First we have to unmount the folder which we created on the Raid-5

#Umount /G
#df -h

Step-6 Now how to delete the Raid-5

#mdadm --detail --/dev/md0
#mdadm --stop --/dev/md0
#mdadm --remove --/dev/md0

Step-7 Now our Raid-5 is removed now we have to delete the raid partition which we created before

fdisk /dev/sda
d {For Del The Partition}
Select Partition 2
p {For Check Partition Is Del Or Not}
w {For Save}
Partprobe /Dev/Sdb {For Refresh}

fdisk /dev/sda
d {For Del The Partition}
Select Partition 3
p {For Check Partition Is Del Or Not}
w {For Save}
Partprobe /Dev/Sdb {For Refresh}

fdisk /dev/sda
d {For Del The Partition}
Select Partition 4
p {For Check Partition Is Del Or Not}
w {For Save}
Partprobe /Dev/Sda {For Refresh}

This is all how to create or delete Raid-5

Cyber Security Training Notes

Leave a Reply

Discount Offer

Now Get 67% Discount

On Cyber Security Training                                                       Notes  

Click here  To Purchase

%d bloggers like this: