How To Configure Logical Volume Management {Lvm} In Linux Rhel 4&5

In This Tutorial We Are Going To Learn How To Configure Logical Volume Management {LVM} In Linux Rhel 4&5

First We Have To Create This Type Of Diagram

Step-1 Firstly We Have To create The Partition


fdisk -l

fdisk /dev/sda
n {for New Partition}
Select Partition 3
t
8e {For Lvm Partiton}
p {For Check Partition Is created Or Not}
w {For Save}
Partprobe /Dev/Sda {For Refresh}

fdisk -l
fdisk /dev/sdb#n {for New Partition}
Select Partition 1
t
8e {For Lvm Partiton}
p {For Check Partition Is created Or Not}
w {For Save}
Partprobe /Dev/Sdb {For Refresh}

Step-2 Here Is The Coading Of create Lvm

#Pvcreate vg00 /dev/sda3 /dev/sdb1
#pvs
#vgcreate vg00 /dev/sda3 /dev/sdb1
#vgs
#lvcreate -L1G -n Lv1 /dev/vg00
#lvs
#lvcreate -L1G -n Lv2 /dev/vg00
#Lvs
#mkdir /data
#mkfs.ext3 /dev/vg00 /lv1
#mount /dev/vg00/lv1 /data
#df-h

Step-3 For Check Details Of volume group,Logical Volume Or Physical Volume

#Pvdisplay {To Check Detail Of Physical Volume}
#vgdisplay {To Check Detail Of Volume Group}
#lvdisplay {To Check Detail Of Logical  Volume}

Step-4 Now How To delete Them

#umount /data
#df-h
#lvs
#lvremove /dev/vg00/lv1
#lvs
#lvremove /dev/vg00/lv2
#lvs
#vgs
#vgremove /dev/vg00
#vgs
#pvs
#pvremove /dev/sda3 /dev/sdb1
#pvs

Step-5 Now How To Delete The Partition

fdisk /dev/sda
d {For Del The Partition}
Select Partition 3
p {For Check Partition Is Del Or Not}
w {For Save}
#Partprobe /Dev/Sda {For Refresh}

fdisk /dev/sdb
d {For Del The Partition}
Select Partition 1
p {For Check Partition Is Del Or Not}
w {For Save}
Partprobe /Dev/Sdb {For Refresh}

This Is How We Create  Logical Volume Management {Lvm} Or How To Delete Them

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s