Proxmox is an Open Source virtualization solution that provides very easy installation at an irresistible price point. The biggest issue I have encountered so far after messing with it for 2 days is its lack of customization for installing across multiple drives. My initial goal was to have a setup that I have accomplished before with ESXi where I have a main drive and a secondary storage drive. In this setup, the main OS drive contains my OS and the secondary drive stores the VMs. Unfortunately, after the installation completed I found myself with both the root and data stores built on the main drives. This meant that I didn’t have enough space to store my ISOs or VMs. In order to fix this I needed to extend both the data and root volumes. Fortunately this is not my first go with LVM. The steps I used are as follows:
- Open up fdisk for the secondary drive, in my case this was
fdisk /dev/sdb. You will need to choose
dto delete any partitions on the disk and then
wto write changes.
sgdisk -gN 1 /dev/sdbin order to convert this disk to GPT format. the
-goption here even if If sgdisk finds a valid MBR or BSD disklabel but no GPT data.
pvcreate /dev/sdb1initializes Physical Volume for later use by the Logical Volume Manager.
vgextend pve /dev/sdb1extends the
pvevolume group (which all 3 Proxmox volumes are a part of) to include the newly allocated Physical Volume.
- This step can be adjusted as needed. For my use case I decided extending my root volume by 80g was sufficient, so I ran
lvresize -L +80g --resizefs /dev/pve/root. If you need more space, go ahead and change that 80g to something else.
- I then allocated the rest of my space to the data volume for my VMs, using the command
lvresize -l +100%FREE --resizefs /dev/pve/data.