You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As reported in a old issue for the cockpit project, USED disk space is wrongly reported. Original issue link: cockpit-project/cockpit#9052
NOTE: I am opening an issue here because I think it is the more appropriate place, but feel free to close this issue if you want.
As explained in cockpit-project/cockpit#9052 (comment) the issue is about reading the wrong field from libvirt stats: cockpit-machines reads allocation rather than physical. From libvirt man page:
block.<num>.allocation - offset of highest written sector in bytes
block.<num>.physical - physical size of source file in bytes
So block.<num>.physical should be read to show USED disk space (as seen by the host).
From my understanding the fix is very simple: replace !isNaN(vm.disksStats[target].allocation) with !isNaN(vm.disksStats[target].physical) in vmDisksCard.jsx
The text was updated successfully, but these errors were encountered:
martinpitt
added a commit
to martinpitt/cockpit-machines
that referenced
this issue
Feb 28, 2024
Showing "allocation" in the UI doesn't make much sense. According to
the manpage [1] it describes "offset of highest written sector in
bytes". Showing the "physical size of source file in bytes" is much more
useful.
Thanks to @shodanshok for figuring this out!
Fixescockpit-project#1423
[1] https://www.libvirt.org/manpages/virsh.html
As reported in a old issue for the
cockpit
project, USED disk space is wrongly reported. Original issue link: cockpit-project/cockpit#9052NOTE: I am opening an issue here because I think it is the more appropriate place, but feel free to close this issue if you want.
As explained in cockpit-project/cockpit#9052 (comment) the issue is about reading the wrong field from
libvirt
stats:cockpit-machines
readsallocation
rather thanphysical
. From libvirt man page:So
block.<num>.physical
should be read to show USED disk space (as seen by the host).From my understanding the fix is very simple: replace
!isNaN(vm.disksStats[target].allocation)
with!isNaN(vm.disksStats[target].physical)
in vmDisksCard.jsxThe text was updated successfully, but these errors were encountered: