From Proxmox, the hypervisor:
As you can see above, I have created 3 VM's with each a 32GB thin provisioned disk. I then extended vm-102 to 80g, and it shows (correctly) that only about 9% is used.
Now the problem is, when I go into the actual VM, which is a Centos-7 server using LVM, it still shows the original 32G disk. I could of course expand that to fill the 80G but then what would be the point of using thin provisioning?
Probably a matter of me not quite understanding what I'm doing here, but then again, that's why I do it - to learn - so if some kind souls could ELI5 to me so i could make sense of it, eventually how I can set up the VM so it appears to have whatever I allocated max, but only use what it needs - such as I expect is the purpose of thin provisioning. Thanks!!
Code:
[root@pve ~]# vgs
VG #PV #LV #SN Attr VSize VFree
pve 2 6 0 wz--n- 873.72g 573.53g
[root@pve ~]# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
base-101-disk-0 pve Vri---tz-k 32.00g vmdata
tz pve -wi-ao---- 100.00g
vm-100-disk-0 pve Vwi-aotz-- 32.00g vmdata 19.28
vm-102-disk-0 pve Vwi-aotz-- 80.00g vmdata base-101-disk-0 9.94
vm-103-disk-0 pve Vwi-aotz-- 32.00g vmdata base-101-disk-0 23.68
vmdata pve twi-aotz-- 200.00g 10.42 21.92
[root@pve ~]#
As you can see above, I have created 3 VM's with each a 32GB thin provisioned disk. I then extended vm-102 to 80g, and it shows (correctly) that only about 9% is used.
Now the problem is, when I go into the actual VM, which is a Centos-7 server using LVM, it still shows the original 32G disk. I could of course expand that to fill the 80G but then what would be the point of using thin provisioning?
Code:
[root@vm-102 ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 centos lvm2 a-- <31.00g 4.00m
[root@vm-102 ~]# vgs
VG #PV #LV #SN Attr VSize VFree
centos 1 2 0 wz--n- <31.00g 4.00m
[root@vm-102 ~]# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
root centos -wi-ao---- 28.99g
swap centos -wi-ao---- 2.00g
[root@vm-102 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/centos-root 29G 5.4G 24G 19% /
devtmpfs 3.9G 0 3.9G 0% /dev
tmpfs 3.9G 4.0K 3.9G 1% /dev/shm
tmpfs 3.9G 8.8M 3.9G 1% /run
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/sda1 1014M 232M 783M 23% /boot
/dev/loop0 1.3G 2.3M 1.2G 1% /tmp
tmpfs 594M 0 594M 0% /run/user/0
[root@vm-102 ~]#
Probably a matter of me not quite understanding what I'm doing here, but then again, that's why I do it - to learn - so if some kind souls could ELI5 to me so i could make sense of it, eventually how I can set up the VM so it appears to have whatever I allocated max, but only use what it needs - such as I expect is the purpose of thin provisioning. Thanks!!
Last edited: