Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm running Ubuntu inside VMWare with a luks encrypted root partition. I'm following Resize Encrypted Partitions (from help.ubuntu.com) and am stuck at step 11.

ubuntu@ubuntu:~$ sudo lvresize -L +10G /dev/ubuntu-vg/root
Extending logical volume root to 25.74 GiB
Insufficient free space: 2560 extents needed, but only 4 available

fdisk -l shows the additional space available on the physical drive, I'm just not sure on what command is holding me back from using lvresize.

ubuntu@ubuntu:~$ sudo fdisk -l

Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders, total 62914560 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000f36ef

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      499711      248832   83  Linux
/dev/sda2          501758    41940991    20719617    5  Extended
/dev/sda5          501760    41940991    20719616   83  Linux

Disk /dev/mapper/crypt1: 21.2 GB, 21214789632 bytes
255 heads, 63 sectors/track, 2579 cylinders, total 41435136 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/crypt1 doesn't contain a valid partition table

Disk /dev/mapper/ubuntu--vg-root: 16.9 GB, 16903045120 bytes
255 heads, 63 sectors/track, 2055 cylinders, total 33013760 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/ubuntu--vg-root doesn't contain a valid partition table

Disk /dev/mapper/ubuntu--vg-swap_1: 4290 MB, 4290772992 bytes
255 heads, 63 sectors/track, 521 cylinders, total 8380416 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/ubuntu--vg-swap_1 doesn't contain a valid partition table

Info about my physical Volume

lvm> pvdisplay --- Physical volume --- PV Name /dev/dm-0 VG Name ubuntu-vg PV Size 19.76 GiB / not usable 3.81 MiB Allocatable yes PE Size 4.00 MiB Total PE 5057 Free PE 4 Allocated PE 5053 PV UUID b6DksK-NYal-Wvai-0iUc-ku1J-PwZy-wWZtLB
share|improve this question

1 Answer 1

up vote 0 down vote accepted

Use pvdisplay to see how much space is available on your physical volumes that are set up in LVM. You may need to add space to that first.

pvdisplay shows what devices like /dev/sda1, etc are set up to be managed by LVM.

vgdisplay shows info about the volume groups that are made up of the different physical volumes. A volume group can span over several physical volumes.

lvdisplay show info about the logical volumes in the volume groups.

To extend a logical volume, there needs to be available space/extents in the volume group. To expand a volume group, there needs to be space on the physical volumes the volume group is on. You can add physical volumes and expand onto those.

share|improve this answer
    
vgdisplay will tell you about the volume groups. Do you have spare space on some device like /dev/sda5? Looks like you'll have to add a new physical volume to the volume group and then extend the logical volume once the volume-group has more space. –  Joseph Santaniello Dec 6 '13 at 20:21
    
Thanks, that was the answer I was looking for. –  John Dec 6 '13 at 20:59
1  
@JosephSantaniello please edit your answer with your comment to make the answer complete - comments will eventually be deleted. –  guntbert Dec 6 '13 at 23:24
    
I've edited my answer to be more complete as per suggestion. –  Joseph Santaniello Dec 7 '13 at 7:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.