Create Logical volume

First we need to find out which disks and partitions are being used. So we could use the following commands
#df -h [This will display which partitions are being used]
#fdisk -l [This will show which disks are being used and disks that are not mounted.]
Now we can start the lvm implementation,we have two unused partitions /dev/sda3 and /dev/sda4
In logical volume creation,need to the following sequence

1. create physical volume
2. create volume group
3. create logical volume

1.Create physical volume
#pvcreate /dev/sda3
#pvcreate /dev/sda4
Verify the volumes with pvdisplay command
2.Create volume group
#vgcreate test_volume /dev/sda3 /dev/sda4
#vgchange -a y test_volume [To activate the volume]
Verify the group with vgdisplay

3.Now create logical volume
#lvcreate -L5G -n test_logical test_volume
test_logical –name of logical volume
test_volume–name of volume group

Verify the logical volumes with lvdisplay
Create filesystem for this logical volume
#mkfs.ext3 /dev/test_volume/test_logical
To use this file system, we need to mount and add to /etc/fstab to use permanently.
#mount /dev/test_volume/test_logical /mnt
add the following entry to /etc/fstab
/dev/test_volume/test_logical /mnt ext3 defaults 0 0


Free Dummies Books
Continuous Engineering


  • What continuous engineering is
  • How to continuously improve complex product designs
  • How to anticipate and respond to markets and clients
  • How to get the most out of your engineering resources

Get your free book now

Sponsored by IBM

Free Dummies Books
Service Virtualization

Learn to:

  • Define service virtualization
  • Select the most beneficial services to virtualize
  • Improve your traditional approach to testing
  • Deliver higher-quality software faster

Get your free book now

Sponsored by IBM