« HOWTO: Create a partition on LVM.HOWTO:Get the splash screen working on wide screens (1680X1050). »

HOWTO: Extend a partition on LVM.

11/07/08

HOWTO: Extend a partition on LVM.

First display the names of the logical volumes, so you know the name of the logical volume you are going to extend.

...

sudo lvdisplay

Te command above will tell you, if you named your lvm disks with a little for thought, which volume group the logical volume is in. Use te command below to find the VG and see how much free space is still left unallocated.

sudo vgdisplay

To extend a lv by adding a further say 40Gb

sudo lvextend -L+40G /dev/vg01/lv_data

and then resize the file system assuming you use ext4 or reiserfs. If you use ext3 or other you may have to umount your partition to resize.

sudo resize2fs -p /dev/vg01/lv_data
sudo resize_reiserfs -f /dev/mapper/vg01-lv_data

You can now check that the extension has taken correctly by using lvdisplay and finally using the disk free command

df -h  /dev/mapper/vg01-lv_data

Filesystem            Size  Used Avail Use% Mounted on 


/dev/mapper/vg01-lv_data 
                      220G   172G   50G  78% /backup 

No feedback yet

Here are a collection of Mini-HOWTOs some of which are too short even for that grand title. I keep them around as it is easier to remember where to look these up that to remember the content of the mini-HOWTO

Search

Contents

powered by b2evolution free blog software