I am building automation to spin up Proxmox VE servers. This means I need to do everything via a CLI / Script methodology.
I have been fighting this one for about 4 or 5 hours today. My goal is to take a single full disk, and convert it to an LVM Thin storage target for VMs. I can do this with ease via the web GUI, but am stumped on how to replicate it at the command line. I've read at least a dozen different postings that have various recipes on how to try to tackle this unsuccessfully ... but nothing I've been able to find that does it successfully. Most of the folks end up with "just use the GUI"...
My attempt:
This results in a "vmdata" LVM target in the GUI - but it ends up with "0" size available. It does not end up giving me an "LVM Thin" pool target.
Pointers/thoughts/or references that I've missed to successful recipes greatly appreciated.
Thanks,
~~shane
I have been fighting this one for about 4 or 5 hours today. My goal is to take a single full disk, and convert it to an LVM Thin storage target for VMs. I can do this with ease via the web GUI, but am stumped on how to replicate it at the command line. I've read at least a dozen different postings that have various recipes on how to try to tackle this unsuccessfully ... but nothing I've been able to find that does it successfully. Most of the folks end up with "just use the GUI"...
My attempt:
sgdisk -N 1 /dev/sdc
pvcreate --metadatasize 250k -y -ff /dev/sdc1
vgcreate vmdata /dev/sdc1
pvesm add lvmthin vmdata -vgname vmdata -thinpool vmdata
This results in a "vmdata" LVM target in the GUI - but it ends up with "0" size available. It does not end up giving me an "LVM Thin" pool target.
Pointers/thoughts/or references that I've missed to successful recipes greatly appreciated.
Thanks,
~~shane