Thursday, December 31, 2009

RAID IN REDHAT LINUX

RAID

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

Tasks:
1. Create a RAID-1 Device (/dev/md0..n)
• fdisk /dev/sdb - to create usable raw partitions
• partprobe /dev/sdb - to force a kernel update of the partition layout of
the disk: /dev/sdb
• mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb5 /dev/sdb6
• cat /proc/mdstat - lists active RAID (md) information
• mke2fs -j /dev/md0 - overlays a file system on the RAID device
• mount /dev/md0 /raid1
• update: /etc/fstab

Note:
• use 'mdadm --query /dev/md0' to get information about a RAID device
• You may create RAID volumes/devices on a single or on multiple disks
Ideally, your RAID volumes should span multiple physical disks to improve:
• reliability
• performance
• availability

2. Remove the RAID-1 device
• umount /dev/md0
• mdadm --manage --stop /dev/md0

3. Create a RAID-5 Volume
• fdisk /dev/sdb - to create a partition number 7
• partprobe /dev/sdb - to update the kernel's view of the partition table
• mdadm --create /dev/md0 --level=5 --raid-devices=3 /dev/sdb5
/dev/sdb6 /dev/sdb7
• watch cat /proc/mdstat - refreshes every 2 seconds
• Overlay a file system: mke2fs -j /dev/md0
• mount /dev/md0 /raid5
• Test I/O to RAID-5 device
• Update: /etc/fstab

No comments:

Post a Comment