Extend Linux Logical Volume

This support document describes the steps needed to extend the a logical volume in Linux

STEP 1. View the current file system to device mappings

 a.  df -h

STEP 2. Use cfdisk to create another partition with the free space on /dev/sdb

 a.  cfdisk /dev/sdb
 b. In the cfdisk menu select the available free space
 c. Select create PRIMARY
 d. Select the SIZE of the new primary partition
 e. Select TYPE > Select type 8E (Linux LVM)
 f. Select WRITE 
 g.  fdisk -l (run fdisk -l to verify the new partition was created)

STEP 3. The next step is to use pvcreate which initializes the Physical Volume for later use by the Logical Volume Manager (LVM)

reboot server previous to using pvcreate, or it won’t see the new partition

pvcreate /dev/sdb2

STEP 4. Run volume group display to see the name of the volume groups on the server:


STEP 5. Add the new partition you created to the volume group which you are extending

vgextend vg_server01 /dev/sdb2

STEP 6. Extend the volume on the volume group

lvextend /dev/mapper/vg_server01-lv_home /dev/sdb2

STEP 7. Resize the file system:

 a.  resize2fs /dev/mapper/vg_server01-lv_home

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