Extending Proxmox local-lvm

When you install Proxmox, it will create default local storage called local-lvm. This is a thin pool so it allows you to over-provision your storage space on your VMs. You need to be careful when over-provisioning as bad things can happen when you run out of space.

When I have a server with more than 1 disk and without RAID, I like to extend my local-lvm storage to include these additional disks.  If you search the Proxmox forums, you’ll be told to just create new storage and adding a disk to LVM means if a disk fails, everything is hosed. Yeah, you won’t see the data protection that you get with RAID 5 or 6, but you also have to remember RAID IS NOT A BACKUP!


So if you can’t rely on RAID or LVM pools, but backups, then you might as well just tell people how to extend their LVM pool.

Telling people how to extend their LVM pool

Here’s what you need to do.

  1. You need to identify which disk is new. So SSH to your Proxmox server before adding the disk and run the command fdisk -l or lsblk. I prefer lsblk due to the layout but if you’re new to Linux, use both. You can see the disk properties with fdisk -l so if you know the model, you can probably identify it easier. If you are re-using a disk, it may have partitions on it. Linux may not see those partitions.
  2. Use fdisk to create a new partition. My drive is /dev/sdb so that’s what I’m using here. Yours might be different. fdisk is called with the following command: fdisk /dev/sdb
  3. Type the command n and press the return key. This creates a new partition.
  4. Type p for partition and press return.
  5. Type 1 for partition number 1 and press return.
  6. For first sector, accept the default by pressing return.
  7. For last sector, accept the default by pressing return.
  8. Type the command t and press return.
  9. Type the hex code 8e and press return.
  10. Press the w key and press return to write the changes.
  11. Create the new physical volume by running the command: pvcreate /dev/sdb1
  12. Add the new partition to the pve volume group with: vgextend -v pve /dev/sdb1
  13. Finally, extend the vg pool with lvresize --extents +100%FREE /dev/pve/data
  14. You should now see a message that the size of logical volume pve/data_tdata changed from the old size plus your extra disk.

If you see a giant ramp up of disk space in the Proxmox console, then congratulations, you didn’t mess it up 🙂

That spike means I did good.

Leave a Comment

Your email address will not be published. Required fields are marked *