Virtual Machine Disk usage calculations don't seem to make any sense...

jstore

Dabbler
Joined
Nov 6, 2022
Messages
26
I apologize if this is posted somewhere but I couldn't find it and it's not causing a problem but I just don't know why it reports what it's reporting.

Virtual Machine Volume disk calculations seem to make no sense, so I am sure I am missing something. It might be the compression or I don't have it setup correctly.

My VM's live on a SSD pool along with my jails/iocage (somebody tell me if that's not a good idea but it's been running fine for years alibeit I never have more than an handful of vm's)

The calculations for the Pool seem correct. (430GB pool, 293GB used, 137GB free, this I believe based on actual mounted df -k validation 2023-07-24 08_27_34-TrueNAS - 10.0.0.15.png )
The 2 VM's I have on the Pool don't seem to be and show that they have more available space than the pool does.
  • VM1 - is a 40GB volume that shows 64GB used and 177GB free
  • 2023-07-24 08_27_59-TrueNAS - 10.0.0.15.png
  • VM2 - is a 75GB volume that shows 99GB used and 212GB free
2023-07-24 08_27_45-TrueNAS - 10.0.0.15.png
Attached a few screenshots.
 

samarium

Contributor
Joined
Apr 8, 2023
Messages
192
Webui helpfully "simplifies" things. If you want the real details, you are going to have to look at the cli tools output and backcalculate from there.

You need to take into account snapshots, shared space of snapshots which I don't know how to find but it is there, while the normal snapshot listing will only show the dedicated space used by the snapshot.

zvols also have a refresevation

zpool list -v
zfs list -v -o space -r pool/path
zfs get all pool/path/to/zvol | sort

df -k and zvol sizes are only the tip of the iceburg

are some of the variations of commands I would use to track down space

I can't say I understand the intricacies of all the ways space can be allocated and reserved, so I'm going to suggest you read the TN, and maybe OpenZFS documentation, and this way I avoid giving incorrect advise too.
 

jstore

Dabbler
Joined
Nov 6, 2022
Messages
26
Thanks. It's the snapshots. I can rationalize the used now easily. It's the base usage plus snapshots. And for the free amounts it looks like the pool stats take the snapshots into account and the volume stats do not, hence they are high. That's just my educated guess as of now. I'll do some reading.
 
Top