How to create software RAID

RAID stands for  Redundant Arrays of Inexpensive Disks, In a RAID configuration, multiple disks are combined together to improve performance, reliability, and data redundancy.RAID can be handled either by the operating system software called SOFTWARE RAID or it may be implemented via a purpose built RAID disk controller card is known as HARDWARE RAID. Following article explains, how to configure the software RAID.

Types of Raid Level
  1. Linear Mode
  2. RAID 0 (Striping)
  3. RAID 1 (Mirroring)
  4. RAID 5 (striping with parity)
 

Step-1 Create two partitions and change ID to fd ( Here in the following example I have used /dev/sda5 and /dev/sda6 ).

Step-2 Run following command to create Striping raid0.

[ root @ leolinux ~]#   mdadm     --create    /dev/md0    --level=0    --raid-devices=2    /dev/sda6  

    /dev/sda7

 

Step-3 Now format raid device /dev/md0.

[ root @ leolinux ~]#  mkfs    -t    ext4    /dev/md0

 

Step-4  Create mount point.

[ root @ leolinux ~]#   mkdir    /myraid

 

Step-5  Mount raid device /dev/md0 into /myraid directory.

[ root @ leolinux ~]#  vim   /etc/fstab

   /dev/md0      /myraid      ext4     defaults     0   0
 
   ESC
   :wq!
 
[ root @ leolinux ~]#    mount -a

 

Step-6  To display  raid device  details.

[ root @ leolinux ~]#   mdadm    --detail     /dev/md0

 
[ root @ leolinux ~]#   cat     /proc/mdstat

 

cheer !!