Understanding VM storage, and adding partition to VM

insomniacity

New Member
Jul 28, 2024
1
0
1
I have a new cluster, one node - 4TB drive, default install. One VM, with 32G of storage.

Question 1: Where, really, is the 32G of data?
Based on https://opensource.com/business/16/9/linux-users-guide-lvm, I think it's...
4TB drive -> GPT layout -> 3rd partition -> LVM -> default 'pve' volume group -> ??? -> LV 'vm-100-disk-0' from lvdisplay?

Question 2: I get the idea of LVM thin - overprovision by only provisioning blocks as they are used. I can see (pvesm lvmthinscan pve) that I have a thin pool called 'data'. Is ??? above an LVM thin pool? So that means vm-100-disk-0 is thin, and has written <32G to disk?

Question 3: How would I add a separate data volume that I could shift between this VM and future VMs I create?
'lvcreate', then 'pvesm add lvm'? What then? Should it be within the thin pool?

Again, default install, but:
Code:
# fdisk -l
Disk /dev/nvme0n1: 3.64 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: CT4000P3PSSD8
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: E4E838F1-0D24-48FA-ABEB-45DC3B883022

Device           Start        End    Sectors  Size Type
/dev/nvme0n1p1      34       2047       2014 1007K BIOS boot
/dev/nvme0n1p2    2048    2099199    2097152    1G EFI System
/dev/nvme0n1p3 2099200 7814037134 7811937935  3.6T Linux LVM


Disk /dev/mapper/pve-swap: 8 GiB, 8589934592 bytes, 16777216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/pve-root: 96 GiB, 103079215104 bytes, 201326592 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/pve-vm--100--disk--0: 32 GiB, 34359738368 bytes, 67108864 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 65536 bytes / 65536 bytes
Disklabel type: gpt
Disk identifier: 1B0B8617-E8C6-488B-B2B1-D5C01180A4CE

Device                                   Start      End  Sectors Size Type
/dev/mapper/pve-vm--100--disk--0-part1    2048     4095     2048   1M BIOS boot
/dev/mapper/pve-vm--100--disk--0-part2    4096  4198399  4194304   2G Linux filesystem
/dev/mapper/pve-vm--100--disk--0-part3 4198400 67106815 62908416  30G Linux filesystem

Code:
# cat /etc/pve/storage.cfg
dir: local
        path /var/lib/vz
        content iso,vztmpl,backup

lvmthin: local-lvm
        thinpool data
        vgname pve
        content rootdir,images