« HOWTO: Create a Snapshot on LVM.HOWTO: Create a partition on LVM. »

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.

Follow up:

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 asuming you use reiserfs. If you use ext3 or other you may have to umount your partition to resize.

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

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
PoorExcellent
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)
What can birds and aeroplanes both do?
antispam test