Yet another LVM post

tooj

New Member
May 12, 2020
3
0
1
46
Hello,
I've been trying to partition my server a particular way so that I can create file and block storage volumes within my default pve lvm. However, I have had nothing but problems after reading for hours about lvm and volume management.

I'd like to setup the lvm in the following way:


Code:
     +-----------------------------------------------+
     |-----------------------------------------------|
     || sda1 || sda2 || sda3  ||        sda4        ||
pve  || swap || root || isos  ||        vhds        || /dev/sda
lvm  ||  32G ||  8G  ||  32G  ||        200G        ||
     |-----------------------------------------------|
     +-----------------------------------------------+

sda3 will be file (dir) storage for OS ISOs.
sda4 will be block storage for VMs.


I can remove the default data volume but I cannot create the other two volumes. I get errors about pools not existing.
What am I doing wrong or am I going about things all wrong?


I also have another disk I will use for data. I don't have problems setting up a data volume on that disk.
 
You are thinking in terms of partitions. But LVM uses logical volumes. They can vary in size and name but share storage on a VG (volume group). And a VG can have multiple PV (physical volumes). With that said, the default installation with xfs/ext4 will put root and data on an aforementioned VG. So, if you want another separate filesystem, you will need to add a LV with the wanted size to the pve/data LV (nested).

Aside from the above, why not just put the ISOs under /var/lib/vz/templates and have a bigger root?
 
You are thinking in terms of partitions. But LVM uses logical volumes. They can vary in size and name but share storage on a VG (volume group). And a VG can have multiple PV (physical volumes). With that said, the default installation with xfs/ext4 will put root and data on an aforementioned VG. So, if you want another separate filesystem, you will need to add a LV with the wanted size to the pve/data LV (nested).

Aside from the above, why not just put the ISOs under /var/lib/vz/templates and have a bigger root?
Thank you. What are the advantages of having a bigger root? If the VHDs go in data, what extra data would root need?
 
Thank you. What are the advantages of having a bigger root? If the VHDs go in data, what extra data would root need?
The free space to host your templates and for whatever else you want to install.