Thursday, February 11, 2010

Redhat linux Raid configuration

Step by step creating Raid 5 in Rhel5
===========================
1>create a petition /dev/hda5 , /dev/hda6 and /dev/hda7 of each 1000 mb
2> toggle the parition to fd
3> partprobe
4>create a directory /raid5
5> mdadm -C /dev/md0 -a yes --level=5 -n 3 /dev/hda{5,6,7, }
6>mkfs -t ext3 /dev/md0
7>mount /dev/md0 /raid5

Adding another partion in existing raid 5
=============================
1>umount /dev/md0 /raid5
2>mdadm -S /dev/md0
3>cat /proc/mdstat
4>mdadm --add /dev/md0 /dev/hda8
5>mount /dev/mdo /raid5
6>mdadm --detail /dev/md0

Deleting existing Raid
================
1> umount /dev/md0 /raid5
2>mdadm -S /dev/md0
3>cat /proc/mdstat
4>mdadm --remove /dev/md0 /dev/hda{5,6,7}
5>mdadm --detail /dev/md0
6> fdisk /dev/hda
7>delete 5,6,and 7 pertition
8>w
9>partprobe

No comments: