Finding the true size of VMs/CTs on lvm-thin

johnha

Well-Known Member
Jan 1, 2018
34
5
48
Hi, I've been searching for a way to do this. I have a pretty standard PVE installation (ext4, lvm-thin). I'm trying to find a way to get the true amount of disk space used by the various KVMs and LXC containers. I've read the documentation and tried pvesm, read google results, searched the forum, read blog posts, refreshed my education on LVM, etc. but I still can't seem to figure it out...

I mean, somehow the GUI knows because this little cylinder icon fills up when my drive gets consumed:
proxmox.jpg

But is there a command line way to get a list of my VMs and CTs and show the real size on the disk?

The only way I've found to do this (by estimation) is by looking at my backups and seeing how much space they are using.

I'm sure this has been asked and answered ... but if someone could point me in the right direction, or help me out with some example commands, I would really appreciate it! Thank you so much!!
-John
 
Thank you so much @H4R0 -- I knew about those commands, but forgot. I guess using lvs and looking at the Data Percentage is the closest I'll get to what I'm looking for. Thanks again!
 
Old thread. but same topic: how do I find out the actual data disk size from LVS? Do I need to calculate the procentage, o can I see that stats in DB/TB somewhere?

So for example here, vm-100-disk-0 is 4693 GB in **real** size?

1693165572163.png
 
So for example here, vm-100-disk-0 is 4693 GB in **real** size?
The real part is maybe not what you think. There are a lot of factors playing into this:
  • deleted files (you need to trim or overwrite the free space with zeros)
  • used LVM extends, (defrag your extends if possible)
  • filesystem blocksize (defrag your disk)
  • partition alignment (check for alignment of extend and partition boundaries)
To get more information, use:

Code:
lvdisplay pve/vm-100-disk-0
 
  • Like
Reactions: enoch85

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!