Add partition to Logical Volume

If you have to add a partition to a logical volume you can follow these steps:

  1. create a partition on the existing disk or on a new album (with fdisk or cfdisk). Suppose you have created /dev/sda6
  2. Run pvcreate on new partition
    # pvcreate /dev/sda6
  3. Adding physical volumes to a volume group (suppose that your volume is /dev/mapper/VolGroup00-LogVol01
    # vgextend /dev/mapper/VolGroup00-LogVol01 /dev/sda6
  4. Then umount the partition mounted on the volume group (suppose the partition is /home)
    # umount /home
  5. Extend logical volume (suppose to extend 50GB)
    # lvextend -L+50G /dev/mapper/VolGroup00-LogVol01
  6. Run e2fsck on logical volume
    # e2fsck -f /dev/mapper/VolGroup00-LogVol01
  7. Resize filesystem. Suppose ext3
    resize2fs /dev/mapper/VolGroup00-LogVol01

Remount partition and run df. Now can see the new added space.

One thought on “Add partition to Logical Volume

  1. In Linux, the above steps are really helpful to create new partition. One must need to know about these codes and commands. But, in Mac there are so many third party applications to modify Mac partitions.

    I have used Stellar Partition manager software to add new partition and resize the the existing one.

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>