RAID Configuration in RHEL/CentOS 6

Posted: October 11, 2013 in RAID
Tags: , ,

RAID, stands for Redundant Array of Inexpensive Disks. RAID is a method by which same data or information is spread across several disks, using techniques such as disk striping (RAID Level 0),disk mirroring (RAID Level 1), and disk striping with parity (RAID Level 5) to achieve redundancy, lower latency, increased bandwidth, and maximized ability to recover from hard disk crashes. In this example we are using Softwar RAID

Software RAID configuration in RHEL/CentOS

Software RAID is implemented under OS Kernel level. The Linux kernel contains an MD driver that allows the RAID solution to be completely hardware independent. The performance of a software-based array depends on the server CPU performance and load.

Features:
1. the ability to increase availability and reliability of data

Tasks:
1. create a RAID-1 Device (/dev/md0)
a.
 fdisk /dev/sdb – to create usable raw partitions
b.
 n – for new partition
c.
 p – primary or you can use e for extended
d.
 +10G – size of the partition
e.
 t – change to type ‘fd’ (RAID AUTO)
c.
 partprobe /dev/sdb – to force a kernel update of the partition layout of the disk: /dev/sdb
Note: Repeat the Steps for all other members of the Array i.e. /dev/sdb6
  d. mdadm –create /dev/md0 –level=1 –raid-devices=2 /dev/sdb5 /dev/sdb6
  e. cat /proc/mdstat – lists active RAID (md) information (or)
     you can enter watch command. Ex- watch cat /proc/mdstat
  f. mkfs.ext4  /dev/md0 – overlays a file system on the RAID device
  g. Create a directory to mount. Ex- mkdir /raid1
  g. mount /dev/md0 /raid1
  h. update: vim /etc/fstab
          /dev/md0          /raid1          ext4     defaults 1 1

Reboot the machine and confirm that file system get mounted or not. We can use “mount” command to list all mounted file system

Note: use ‘mdadm –query /dev/md0’ to get information about a RAID device

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.