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.

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

  1. works with only 2 hard disk drive.
  2. Same data is simultaneously written on both disk.
  3. The reading speed is fast and writing speed is slow.
  4. Fault tolerance is available.
  5. Overhead is 50%

RAID 5

  1. Minimum 3 Hard disk drive.
  2. Can support maximum of 32 hard disk drive.
  3. Data is written simultaneously and evenly across multiple hard disk drive.
  4. The parity is written equally on all disks.
  5. the reading and writing speed is fast.
  6. Fault tolerance is available.

Steps for configuring RAID 5

  1. Create 4 partition with equal sizes
  2. Create RAID device with three partitions
#mdadm -C /dev/md0 -n3 /dev/sda{8,9,10} -l5
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

Popular posts from this blog

Reasoning-Number Series

Reasoning-Letter Series

Profit and Loss