Convert LVM to LVM-thin

GRJ

New Member
Feb 10, 2025
2
0
1
during installation were defined the 2 datastores as LVM.
It was only discovered afterwards that no snapshots are possible.
What options are there for converting these datastores to LVM-thin and preserving the installation of the two VM machines?

dir: local
path /var/lib/vz
content vztmpl,iso,backup

lvm: Datastore1
vgname Datastore1
content rootdir,images
nodes proxmox
shared 0

lvm: Datastore2
vgname Datastore2
content images,rootdir
nodes proxmox
shared 0
 
Hi @GRJ ,

Welcome to the forum!

If you have space in the Volume Group (vgdisplay), then it should be as simple as following steps here:
https://pve.proxmox.com/wiki/Storage:_LVM_Thin

Carve out a thin pool on your current VG, migrate the data over (you can use PVE "move disk" feature), delete any remaining thick LVs when you are done.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
I followed the instructions, moved all the VM to Datastore2 with Move, wiped Datastore1 and created new DatastoreSSD with the volume Volssd as thin:
lvcreate -L 40G -n Volssd DatastoreSSD
lvconvert --type thin-pool DatastoreSSD/Volssd
Result see screenshot.

In the /etc/pve/storage.cfg the disk still appears as lvm and not as lvmthin:
lvm: DatastoreSSD
vgname DatastoreSSD
content rootdir,images
nodes proxmox
shared 0


1. what went wrong?

2. when creating a VM with VE I cannot find a way to define a thin disk, what is the procedure?
 

Attachments

  • LVM-thin.png
    LVM-thin.png
    22.1 KB · Views: 4
1. what went wrong?
Nothing is wrong. You've created a new slice/pool out of your existing volume group that can be used thinly. It is in addition to your existing pool, not instead of it.
Now you need to create new storage pool definition that points to the newly created LVM structure.

Datacenter>Storage>Add>LVM Thin
Make sure that Images and RootFS are ticked for usage.



Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Last edited:
  • Like
Reactions: Kingneutron