RAID Server Configuration

RAID- Redudat array of Independent Disk (Orginally Redudant Array of Inexpensive Disk) 


RAID is a data storage technology that combines multiple disk drive components into a logical unit for the purposes of data redundancy and performance improvement. Data is distributed across the drives in one of several ways, referred to as RAID levels, depending on the specific level of redundancy and performance required.

1- RAID is used as a term for computer data Storage schemed that can devide and
   replicate data among multiple physical drive.
2- The physical drives are said to be in a RAID which is accessed by the os
   as one single drive.
3- The different schemes are named by the word RAID followed by a number (e.q.
   RAID-0 RAID-1)
4- Each scheme provides a different balance between two key goals:
   a. Increase data reliability and
   b. Increase input/output performance

RHEL Supports- 

1- RAID 0       Striping
2- RAID 1       Mirroring
3- RAID 4       Disk striping with Praity and one disk reserve for parity
4- RAID 5       Disk Striping with Single Distribuited Parity
5- RAID 6       Disk Striping with Dual distributed parity
6- RAID 10     Combination of RAID 0 and RAID 1

Command Used- mdadm  

The name is derived from the md (multiple device) device nodes is administers or manages

mdadm –create /dev/md0 –level=0 –raid-devices=2 /dev/sda1 /dev/sdb1 

Note- If we want to Change RAID level we can use level switch with following..

–level=0
–level=1
–level=4
–level=5
–level=6
–level=10 

 RAID 0 (Striping )




1- RAID 0 requies at least two RAID partitions
2- Distributes data across multiple storage device
3- Level 0 RAIDs offer increased performance over standard partition ,and
4- can be used to pool the storage of multiple device into one large virtual device
5- Level 0 RAIDs offer no redudancy and that the failure of one device in the
     array destroys the entire array.

Configure RAID 0-  

Step-1. Create 2 Partition
 
Create a Partition Read…

There are use 2 hdd partition like..
1- /dev/sda1
2- /dev/sdb1

Step-2 We can create RAID 0  array on the’mdadm’ command

 # mdadm –create /dev/md0 –level=0 –raid-devices=2 /dev/sda1 /dev/sdb1

Now mdadm: array /dev/md0 started..

Step-3 Check Detais..

 # mdadm –detail /dev/md0       (/dev/md0 is a raid device name)

Step-4 How to use raid 0

1- Formate /dev/md0

 # mkfs.ext4 /dev/md0 

2- Mount /dev/md0
 # mkdir /RAID0
 # mount /dev/md0 /RAID0
 # mount 

 
How to Remove RAID 0 

Step- 1 Umount /dev/md0

 # umount /RAID0
 # mount 

Step- 2 Distroy RAID 0

 # mdadm –stop /dev/md0               (/dev/md0 is a device name)

Step-3 Now Again check Details
 
 # mdadm –detail /dev/ md0 

/dev/md0: no such file or directory 

_________________________________________________________

RAID 1 (Mirroring) 


 
1- RAID Level 1 provides redudancy by writing identical data to each member disk of  the array, leaving a “mirrored” copy on each disk
2- Popular due to its simplicity and high level of data avalibility .
3- Operates with two or more disks.
4- Provide very good data reliability and improve performance for read-intensive  application but at a relatively high cost
5– The storage capacity of the level 1 array is equal to the capacity of the smallest mirrored  hard disk in a Hardware RAID or the smallest mirrored partition in a software RAID.
6- Level 1 redudancy is the highest possible among all RAID types, with the array being able to operate  with only a single disk present.

Configure RAID 1- 

Step-1. Create Primary partition on each member disk of the array using fdisk utility.

Create a Partition Read…

There are use 2 hdd partition ..
1- /dev/sda1
2- /dev/sdb1

Step-2 We can create RAID 1 array on the’mdadm’ command

 # mdadm –create /dev/md1 –level=1 –raid-devices=2 /dev/sda1 /dev/sdb1 

Now mdadm: array /dev/md1 started..

Step-3 Check Detais..

 # mdadm –detail /dev/md1       (/dev/md1 is a raid device name)

Step-4 How to use raid 1

1- Formate /dev/md1

 # mkfs.ext4 /dev/md1 

2- Mount /dev/md1  # mkdir /RAID1
 # mount /dev/md1 /RAID1
 # mount 

How to Remove RAID 1 

Step- 1 Umount /dev/md1

 # umount /RAID1
 # mount 

Step- 2 Distroy RAID 1

 # mdadm –stop /dev/md1               (/dev/md1 is a device name)

Step-3 Now Again check Details

 # mdadm –detail /dev/ md0 

/dev/md1: no such file or directory

_________________________________________________________

RAID 5 (Disk Striping with Single Distribuited Parity) 




1- Minimum 3 HDD or 3 Partition
2- Provide good performance as block are striped
3- Provide good redudancy , distributed parity
4- Best cost effective option providing both performance and redudancy.
5- RAID level 5 is equal to the capacity of the member partitions, mins the size
   of the partition if they are equal size.
6- RAID 5 read write speeds are good.
7- RAID 5 alwayes use -1 hdd.(e.q.3 hdd space- 10GB+10GB+10GB= 20GB Space).
8- Can handle 1 disk failure.
 

Configure RAID 5- 
Step-1. Create Primary partition on each member disk of the array using fdisk utility.

Create a Partition Read…

There are use 3 partition like ..
1- /dev/sda1
2- /dev/sdb1
3- /dev/sdc1

Step-2 We can create RAID 5 array on the’mdadm’ command

 # mdadm –create /dev/md5 –level=5 –raid-devices=3 /dev/sda1 /dev/sdb1 /dev/sdc1 

Now mdadm: array /dev/md5 started..

Step-3 Check Detais..

 # mdadm –detail /dev/md5       (/dev/md5 is a raid device name)

Step-4 How to use raid 5

1- Formate /dev/md5

 # mkfs.ext4 /dev/md5 

2- Mount /dev/md5
 # mkdir /RAID5
 # mount /dev/md5 /RAID5
 # mount 

 
How to Remove RAID 5 

Step- 1 Umount /dev/md5

 # umount /RAID5
 # mount 

Step- 2 Distroy RAID 5

 # mdadm –stop /dev/md5               (/dev/md5 is a device name)

Step-3 Now Again check Details

 # mdadm –detail /dev/ md5 

/dev/md5: no such file or directory 

_________________________________________________________ 


RAID 6 (Disk Striping with Dual distributed parity) 





1- Min HDD 4
2- This create two parity blocks for each data block.
3- Can handle 2 disk failure
4- This RAID configuration is complex to implement in a RAID controller, as it has to  calculate two parity data for each data block.
5- RAID 6 alwayes use -2 hdd.(e.q.4 hdd space-> 10GB+10GB+10GB+10GB= 20GB Space).  


Configure RAID 6-  


 Step-1. Create Primary partition on each member disk of the array using fdisk utility.

 Create a Partition Read…

There are use 4 hdd partition like.
1- /dev/sda1
2- /dev/sdb1
3- /dev/sdc1
4- /dev/sdd1

Step-2 We can create RAID 6  array on the’mdadm’ command

 # mdadm –create /dev/md6 –level=6 –raid-devices=4 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1 

Now mdadm: array /dev/md6 started..

Step-3 Check Detais or Display..

 # mdadm –detail /dev/md6       (/dev/md6 is a raid device name)

Step-4 How to use raid 6

1- Formate /dev/md6

 # mkfs.ext4 /dev/md6 

2- Mount /dev/md6
 # mkdir /RAID6
 # mount /dev/md6 /RAID6
 # mount 

 
How to Remove RAID 6 

Step- 1 Umount /dev/md6

 # umount /RAID6
 # mount 

Step- 2 Distroy RAID 6

 # mdadm –stop /dev/md6               (/dev/md6 is a device name)

Step-3 Now Again check Details

 # mdadm –detail /dev/ md6 

/dev/md6: no such file or directory

_________________________________________________________ 
How to extend disk in RAID- 

Suppose I want to extand hdd in raid level 6 or other RAID level..

hdd- /dev/sde1

# mdadm –add /dev/md6 /dev/sde1  

Note: ‘/dev/md6’- RAID Level and ‘/dev/sde1’ your new hdd.

Sucessefully add this hdd.
 
Then..
How to grow RAID array..

# mdadm –grow /dev/md6 –raid-device=5

# mdadm –detail /dev/md6 
_________________________________________________________ 

RAID 10 (Combination of RAID 0 and RAID 1)



1- Minimum 4 disks.
2- This is also called as “stripe of mirrors”
3- Excellent redundancy ( as blocks are mirrored )
4- Excellent performance ( as blocks are striped )
5- If you can afford the dollar, this is the BEST option for any mission critical applications (especially databases).


Configure RAID 10-  


 Step-1. Create Primary partition on each member disk of the array using fdisk utility.

 Create a Partition Read…

There are use 4 hdd partition like.
1- /dev/sda1
2- /dev/sdb1
3- /dev/sdc1
4- /dev/sdd1

Step-2 We can create RAID 10  array on the’mdadm’ command

 # mdadm –create /dev/md10 –level=10 –raid-devices=4 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1 

Now mdadm: array /dev/md10 started..

Step-3 Check Detais or Display..

 # mdadm –detail /dev/md10       (/dev/md6 is a raid device name)

Step-4 How to use raid 10

1- Formate /dev/md10

 # mkfs.ext4 /dev/md10

2- Mount /dev/md10
 # mkdir /RAID10
 # mount /dev/md10 /RAID10
 # mount 

How to Remove RAID 10 


Step- 1 Umount /dev/md10

 # umount /RAID10
 # mount 

Step- 2 Distroy RAID 10
  
# mdadm –stop /dev/md10               (/dev/md10 is a device name)

Step-3 Now Again check Details

 # mdadm –detail /dev/ md10

/dev/md10: no such file or directory 


So Enjoy,… 

Leave a Reply

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