Monday, January 10, 2011

Implimenting LVM over RAID 5

Implimenting LVM over RAID 5 

What is LVM : LVM stands for Logical Volume Manager, It is needed to be implimented if you want to increase your Logical Volume size in online (Increase without restart) condition, mostly in case of large production scenarios. In normal scenarios, we just setup server with normal "Ext3" to which we cant expand if it gets full. So here LVM concept comes.

Why LVM on RAID 5 : To get data redundancy as well as online memory expand.


As you saw in my previous article, how to impliment RAID 5 on RHEL / CentOS now next step is what you will do if you want Data redundancy as well as online memory expanding feature ?
Yes, we impliment LVM over the RAID 5 volume. See below how ???


1. Here i am assuming that we have successfully created a "/dev/md0" raid volume.



2. Now in LVM 1st we will create Physical Volume

#pvcreate /dev/md0
   Physical volume "/dev/md0" successfully created (Output)

3. Next create Volume Group named "vg0_data" with device "/dev/md0"

#vgcreate vg0_data /dev/md0
   /dev/cdrom: open failed: No medium found (Output)
   Volume group "vg0_data" successfully created (Output)

4. Make Logical Volume "vol0_Data" of 20GB on Volume group "vg0_data". Here if you notice i have total 39.98 GB space on my Physical Volume and Voume Group.

#lvcreate -L 20G -n vol0_Data vg0_data
   Logical volume "vol0_Data" created (Output)


5. Check all four below commands as in below two snap, see what type of output you get on your system,





5. The last thing is remaining guess what ??? Making a file system :)

#mkfs -t ext3 /dev/vg0_data/vol0_Data
#mkdir /data
#mount /dev/vg0_data/vol0_Data /data



6. To make it permanent, edit "/etc/fstab" file, as in below snap



check it using "mount -a".


~Thanks

No comments:

Post a Comment