[pve-devel] [pve-manager] Adding real disk usage information (discussion)
d.csapak at proxmox.com
Mon Apr 19 08:55:00 CEST 2021
On 4/16/21 22:18, Bruce Wainer wrote:
> I am interested in seeing real disk usage information for VM Disks and CT
> Volumes, on storage types that have thin provisioning and/or snapshots.
> Specifically I would like to see "Current Disk Usage (Thin)" and either
> "Snapshot Usage" or "Total Disk Usage". I only use local ZFS on servers at
> this time, but I'm sure the GUI side would be best made flexible.
while this sounds sensible, this will get hard very fast.
For example, take a LVM-Thin storage.
I have a template which has an LV which uses some space.
This can have X linked clones, where each clone can have Y snapshots.
since lvmthin lvs/snapshots/etc. are only very loosely coupled.
It is very hard to attribute the correct number to any
of those vms/templates. (e.g. do you want to calculate the
template storage again for each vm? only once? what if
you cloned a vm from a snapshot?)
It gets even harder on storage that can deduplicate (e.g. ZFS) or
where the 'real' usage is dynamically inflated by some form of replica
So, while this sounds nice, and we would probably not oppose a clean
solution, this is not a trivial problem to solve.
> Is someone interested in helping with this? Where would I start, especially
> on the GUI part, if I were to develop this myself?
anyway, to answer this question, the storage plugins in the backend can
be found in the pve-storage git repo
the point where the status api calls of the vms/cts are called live
in qemu-server and pve-container respectively
(the api part is in PVE/API2/)
you can find the gui part in pve-manger in www/manager6
also if you want to send patches, please read the developer
documentation  especially the bit about the CLA
if you have any more question, please ask :)
hope this helps
> Thank you,
> Bruce Wainer
> pve-devel mailing list
> pve-devel at lists.proxmox.com
More information about the pve-devel