Redundant Array of Independent Disk(RAID) in Linux operating system.
RAID is a technology that employs the simultaneous use of two or more partitions on the same or different hard disk drive to achieve greater levels of performance and reliability .
It is a fault tolerance mechanism in which data is not lost even if one of the disk fails.
mdadm-Metadisk admin tool
-C - Create array
/dev/md0- First Metadisk
-n3- No. of Partitions per device.
-l5- RAID 5
3. Format RAID device
#mkfs.ext4 /dev/md0
#mkdir /raid5
#mount /dev/md0 /raid5
Create some files in the above directory.
#touch /raid5/linuxfile{1..10}
To check raid Device.
#mdadm -D /dev/md0
To add a spare Device
#mdadm -a /dev/md0 /dev/sda11
To make partition faulty
#mdadm -f /dev/md0 /dev/sda9
Remove faulty partition
#mdadm -r /dev/md0 /dev/sda9
To stop the raid device
#umount /raid5
#mdadm -S /dev/md0
To reactivate raid device
#mdadm -A /dev/md0 /dev/sda{8,10,11}
To get the data
#mount /dev/md0 /raid5
To check the data
#ls /raid5
RAID5 configuration video
It is a fault tolerance mechanism in which data is not lost even if one of the disk fails.
Types of RAID
- Hardware RAID
- Software RAID
RAID Levels
- RAID 0 (Striping without parity)
- RAID 1 (Disk mirroring)
- RAID 4 ( Parity)
- RAID 5 (Striping with parity)
RAID 1
- works with only 2 hard disk drive.
- Same data is simultaneously written on both disk.
- The reading speed is fast and writing speed is slow.
- Fault tolerance is available.
- Overhead is 50%
RAID 5
- Minimum 3 Hard disk drive.
- Can support maximum of 32 hard disk drive.
- Data is written simultaneously and evenly across multiple hard disk drive.
- The parity is written equally on all disks.
- the reading and writing speed is fast.
- Fault tolerance is available.
Steps for configuring RAID 5
- Create 4 partition with equal sizes
- Create RAID device with three partitions
mdadm-Metadisk admin tool
-C - Create array
/dev/md0- First Metadisk
-n3- No. of Partitions per device.
-l5- RAID 5
3. Format RAID device
#mkfs.ext4 /dev/md0
#mkdir /raid5
#mount /dev/md0 /raid5
Create some files in the above directory.
#touch /raid5/linuxfile{1..10}
To check raid Device.
#mdadm -D /dev/md0
To add a spare Device
#mdadm -a /dev/md0 /dev/sda11
To make partition faulty
#mdadm -f /dev/md0 /dev/sda9
Remove faulty partition
#mdadm -r /dev/md0 /dev/sda9
To stop the raid device
#umount /raid5
#mdadm -S /dev/md0
To reactivate raid device
#mdadm -A /dev/md0 /dev/sda{8,10,11}
To get the data
#mount /dev/md0 /raid5
To check the data
#ls /raid5
RAID5 configuration video
Comments
Post a Comment