CORRECT TEXT
There are three Disk Partitions /dev/hda8, /dev/hda9, /dev/hda10 having size 100MB of each
partition. Create a Logical Volume named testvolume1 and testvolume2 having a size 250MB.
Mount each Logical Volume on lvmtest1, lvmtest2 directory.
Answer:
Explanation:
Steps of Creating LVM: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 /lvtest2 ext3 defaults 0 0
/dev/test0/testvolume1 /lvtest1 ext3 defaults 0 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.