Insufficient free space: XXX extents needed, but only 0 available

jtvdw

Member
Dec 6, 2018
44
0
6
Cape Town, South Africa
Hi,

I'm trying to run this command but geting this error:

Command: lvresize --size +100% --resizefs /dev/mapper/pve-root, Error: Insufficient free space: XXX extents needed, but only 0 available

Running ProxMox 5.1 and the lvm disk size is only 120GB and want to increase it to use the who dis or just double the size, wasn't successfull in doing it.

Any hellp would be appreciated.

Thanks.
 
Command: lvresize --size +100% --resizefs /dev/mapper/pve-root, Error: Insufficient free space: XXX extents needed, but only 0 available

Running ProxMox 5.1 and the lvm disk size is only 120GB and want to increase it to use the who dis or just double the size, wasn't successfull in doing it.

If you want to extend an lvm the proper physical capacity has to be available of course. Did you extend the physically available space and if so, how?

In order to check free capacity run
Code:
pvs
vgs
 
I'm running Proxmox VE with Ubuntu Server 20.04 as VM.
I SSH'd in to proxmox and did:
Code:
qm resize 100 scsi0 +30G
After which I can see that my disk indeed changed to 50Gb (20Gb previously).

When I SSH in to Ubuntu and do:
sudo fdisk -l
I get:

Code:
[...]

Disk /dev/sda: 50 GiB, 53687091200 bytes, 104857600 sectors
Disk model: QEMU HARDDISK
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: A3432ED5-AA42-4E83-9296-5AE5FFABDDC4

Device       Start      End  Sectors Size Type
/dev/sda1     2048     4095     2048   1M BIOS boot
/dev/sda2     4096  2101247  2097152   1G Linux filesystem
/dev/sda3  2101248 41940991 39839744  19G Linux filesystem

[...]

So /dev/sda has increased, but what If I'm understanding the next lines correctly I needed /dev/sda3 to increase.
Code:
eddo@Electron:~$ sudo pvs
  PV         VG        Fmt  Attr PSize   PFree
  /dev/sda3  ubuntu-vg lvm2 a--  <19.00g    0

eddo@Electron:~$ sudo vgs
  VG        #PV #LV #SN Attr   VSize   VFree
  ubuntu-vg   1   1   0 wz--n- <19.00g    0
Also I can't expand it with sudo lvextend --size +30G /dev/mapper/ubuntu--vg-ubuntu--lv because I get the same error as the thread starter.

Any nudge in the right direction would be greatly appreciated. :)


Edit:
I just realised that this was probably the wrong forum to post in, as this is more about ubuntu than proxmox at this stage. Sorry about that.
 
Last edited:
I'm running Proxmox VE with Ubuntu Server 20.04 as VM.
I SSH'd in to proxmox and did:
Code:
qm resize 100 scsi0 +30G
After which I can see that my disk indeed changed to 50Gb (20Gb previously).

When I SSH in to Ubuntu and do:
sudo fdisk -l
I get:

Code:
[...]

Disk /dev/sda: 50 GiB, 53687091200 bytes, 104857600 sectors
Disk model: QEMU HARDDISK
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: A3432ED5-AA42-4E83-9296-5AE5FFABDDC4

Device       Start      End  Sectors Size Type
/dev/sda1     2048     4095     2048   1M BIOS boot
/dev/sda2     4096  2101247  2097152   1G Linux filesystem
/dev/sda3  2101248 41940991 39839744  19G Linux filesystem

[...]

So /dev/sda has increased, but what If I'm understanding the next lines correctly I needed /dev/sda3 to increase.
Code:
eddo@Electron:~$ sudo pvs
  PV         VG        Fmt  Attr PSize   PFree
  /dev/sda3  ubuntu-vg lvm2 a--  <19.00g    0

eddo@Electron:~$ sudo vgs
  VG        #PV #LV #SN Attr   VSize   VFree
  ubuntu-vg   1   1   0 wz--n- <19.00g    0
Also I can't expand it with sudo lvextend --size +30G /dev/mapper/ubuntu--vg-ubuntu--lv because I get the same error as the thread starter.
You have to increase (i.e. when using parted to delete it and create it again with a larger size) the partition /dev/sda3 first.
 
You have to increase (i.e. when using parted to delete it and create it again with a larger size) the partition /dev/sda3 first.
Thank you for replying!
Since I'm new at this I'm sure your method is better, but I solved it by SSHing into the Ubuntu VM and doing:

sudo fdisk /dev/sda

I then wrote down the cylinder start for /dev/sda3 and removed that partition, followed by creating a new partition at the same start as the old one and leaving the end cylinder blank so it would span the rest of the disk.
I then did:

pvresize /dev/sda3,
lvresize -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv, and
resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv

and that was it.
Does using parted mean that I can do it all from within Proxmox instead?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!