Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disk usage numbers in Qube Manager are deceptive #7535

Open
ddevz opened this issue May 31, 2022 · 7 comments
Open

Disk usage numbers in Qube Manager are deceptive #7535

ddevz opened this issue May 31, 2022 · 7 comments
Labels
affects-4.1 This issue affects Qubes OS 4.1. affects-4.2 This issue affects Qubes OS 4.2. affects-4.3 This issue affects Qubes OS 4.3. C: manager/widget needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. ux User experience

Comments

@ddevz
Copy link

ddevz commented May 31, 2022

How to file a helpful issue

Qubes OS release

4.1

Brief summary

After the Qubes storage widget tells a user they are low on disk space, one can try to free up space by deleting qubes from the Qube Manager. However, the disk space listed under "Disk Usage" is not always the amount that becomes free if you delete that qube. (particularly templates)

I suspect this is related to "cloning" a template making a copy-on write copy of the template instead of a full copy of the data (which is a good thing, but it makes it confusing for the user to try to understand how to free space)

There is also the confusing factor that certain deleted disk space only shows up as free in the Qube storage widget after a reboot.

@ddevz ddevz added P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. labels May 31, 2022
@andrewdavidwong andrewdavidwong added this to the Release 4.1 updates milestone May 31, 2022
@andrewdavidwong andrewdavidwong added the needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. label May 31, 2022
@DemiMarie
Copy link

For the LVM storage driver, getting the actual amount of space used requires using the thin_ls command and somehow figuring out which thin volume corresponds to which logical volume. Not sure about reflink or file.

@ddevz
Copy link
Author

ddevz commented May 31, 2022

From a UX perspective, a user probably needs to have both the current number and the "thin number" in Qube Manager. Presenting just the thin number to the user would probably cause confusion for many people when they first see it.

Also from a UX perspective, it'd be related to #5679 and #4398

@marmarek
Copy link
Member

Generally, any kind of copy-on-write pool (which are both lvm thin and btrfs) made it rather hard to answer "how much space this thing uses". That's because part of the VM disk may be shared with something else. I mean, technically you can figure it out, but then presenting it to the user is tricky. Lets use an example:

  1. Template1 has 10GB disk, fully utilized for simplicity
  2. Template2 was created by by cloning Template1, and then 2GB was modified.

This means, 8GB out of those 10GB are shared between those templates. If you remove just Template2, you will free up just 2GB, but if you remove Template1 first, then removing Template2 will free up whole 10GB.
But then, presenting just "not shared" amount is not enough either, as it doesn't represent how much data you have there.

@andrewdavidwong
Copy link
Member

Generally, any kind of copy-on-write pool (which are both lvm thin and btrfs) made it rather hard to answer "how much space this thing uses". That's because part of the VM disk may be shared with something else. I mean, technically you can figure it out, but then presenting it to the user is tricky. Lets use an example:

  1. Template1 has 10GB disk, fully utilized for simplicity
  2. Template2 was created by by cloning Template1, and then 2GB was modified.

This means, 8GB out of those 10GB are shared between those templates. If you remove just Template2, you will free up just 2GB, but if you remove Template1 first, then removing Template2 will free up whole 10GB. But then, presenting just "not shared" amount is not enough either, as it doesn't represent how much data you have there.

How do other OSes and tools handle this?

@ddevz
Copy link
Author

ddevz commented May 31, 2022

How do other OSes and tools handle this?

one example is the zfs zfs list -t snapshot command which gives a "used" number and a "referenced" number. (referenced being the number as currently computed by Qubes Manager, and used being the "thin number")

@comods
Copy link

comods commented Jun 4, 2022

What about using "Physical Disk Usage" (Space freed if qube is deleted) and "Virtual Disk Usage" (Used space as seen from inside VM, i.e. no-ref-deep-clone size).

@andrewdavidwong andrewdavidwong added the affects-4.1 This issue affects Qubes OS 4.1. label Aug 8, 2023
@andrewdavidwong andrewdavidwong removed this from the Release 4.1 updates milestone Aug 13, 2023
@andrewdavidwong andrewdavidwong added the eol-4.1 Closed because Qubes 4.1 has reached end-of-life (EOL) label Dec 7, 2024

This comment was marked as outdated.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 7, 2024
@andrewdavidwong andrewdavidwong removed the needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. label Dec 7, 2024
@marmarek marmarek added affects-4.2 This issue affects Qubes OS 4.2. affects-4.3 This issue affects Qubes OS 4.3. and removed eol-4.1 Closed because Qubes 4.1 has reached end-of-life (EOL) labels Dec 7, 2024
@marmarek marmarek reopened this Dec 7, 2024
@andrewdavidwong andrewdavidwong added the needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. label Dec 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-4.1 This issue affects Qubes OS 4.1. affects-4.2 This issue affects Qubes OS 4.2. affects-4.3 This issue affects Qubes OS 4.3. C: manager/widget needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. ux User experience
Projects
None yet
Development

No branches or pull requests

5 participants