DEV Community

Cover image for Remove local and local-lvm from Proxmox
Sergio Peris
Sergio Peris

Posted on • Originally published at sertxu.dev

Remove local and local-lvm from Proxmox

Proxmox, by default, configures two storage volumes on the disk where the Proxmox OS resides: one named local-lvm for storing the disk images and containers, and another named local for storing the ISO images, container templates, and backups.

  • The local-lvm, as its name suggests, is a LVM thin-provisioned.
  • The local is simply a directory stored at /var/lib/vz.

It's common to have more than one disk in a Proxmox host, so the best approach is to separate the Proxmox OS from the disk images. For example, a node with one 480GB disk for the Proxmox OS and two 960GB disks in RAID 0 for storing the disk images and containers.

To remove the local-lvm and local storage volumes, follow the steps below.

Using the Proxmox GUI, navigate to Datacenter > Storage.

There, select the local-lvm storage volume and remove it. Next, select the local storage volume and edit it to disable it, as this storage volume cannot be deleted.

Now, open a shell on your node, as you will run a few commands.

First, you should remove the logical volume:

lvremove /dev/pve/data
Enter fullscreen mode Exit fullscreen mode

Next, you're going to reclaim the free space that is left unused in the logical volume:

lvresize -l +100%FREE /dev/pve/root
Enter fullscreen mode Exit fullscreen mode

Finally, you must expand the disk format to be able to use the newly added space:

resize2fs /dev/mapper/pve-root
Enter fullscreen mode Exit fullscreen mode

With these steps, you've successfully removed the local storage volumes from your Proxmox.

Top comments (0)