Steps of Creating LVM:
Physical Disk1
Physical Disk2
Physical Disk3
Physical Volume
Volume Group
Logical Volume 1
Logical Volume 2
Logical Volume 3
1.pvcreate /dev/hda8 /dev/hda9 /dev/hda10
pvdisplay command is used to display the information of physical volume.
2.vgceate test0 /dev/hda8 /dev/hda9 /dev/hda10
vgdisplay command is used to display the information of Volume Group.
3.lvcreate –L 250M –n testvolume1 test0
lvdisplay command is used to display the information of Logical Volume.
4.lvcreate –L 250M –n testvolume2 test0
5.mkfs –t ext3 /dev/test0/testvolume1
6.mkfs –t ext3 /dev/test0/testvolume2
7.mkdir /lvtest1
8.mkdir /lvtest2
9.mount /dev/test0/testvolume1 /lvtest1
10.mount /dev/test0/testvolume2 /lvtest2
11.vi /etc/fstab
/dev/test0/testvolume2/lvtest2ext3defaults0 0
/dev/test0/testvolume1/lvtest1ext3defaults0 0
To create the LVM( Logical Volume Manager) we required the disks having ‘8e’ Linux LVM type. First we should create the physical Volume, then we can create the Volume group from disks belongs to physical Volume. lvcreate command is used to create the logical volume on volume group. We can specify the size of logical volume with –L option and name with -n option.