How To Configure Raid-5 In Linux Rhel-4&5

In This Tutorial We Are Going To Learn How To configure Raid-5 

Firstly Before Creating The Raid We Have To Create Raid Partition Just Follow These Steps For Creating Raid Partition

Here you Can Check The Diagram

Step-1 Here Is The Commans 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 Now 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 Now How to check The Raid-5 Is Created Or not

#mdadm –detail –/dev/md0

Step-4 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 Now How To Delete Them

First We Have To Unmount The Folder Which We Created On The Raid-0

#Umount /G
#df -h

Now We Delete The Raid-5

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

Step-6 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 We Create Or Delete Raid-5 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s