-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Update documentation on how to shrink private storage in Qubes 4.0 #5169
Comments
Regarding
Seems to be gone nevertheless. |
Did a sudo fstrim -av inside your VM with a large private volume not return the unused storage back to the LVM thin pool? |
@heinrich-ulbricht If you really want to shrink the size of your AppVM's private pool, use the following command from dom0. Replace
Output (you need to confirm resize of logical volume):
As the command says, it may destroy your data, which is why the Qubes tools do not allow shrinking logical volumes. With standalone VMs you can also resize I'm not sure if Qubes needs documentation on this. Since they're thin volumes, over-sizing really only becomes an issue if you actually use all the space allocated, and in that case resizing is dangerous. |
Thank you for your input. On this topic unfortunately I'm an end user and my questions will lack technical background (for the time being). I'm sorry for that.
Case 2 (mine):
Are those expectations correct? And which of the proposed solutions (by @brendanhoar and @esote) is applicable to this case? Regarding "need to document this": extending the storage is documented here under the title "Resize Disk Image": https://www.qubes-os.org/doc/resize-disk-image/. I expecteded to find at least a hint there how to shrink a volume (which is a form of resizing). Even if it's just a comment like "you don't have to care because of thin volumes" - this would be helpful as well. So I had to dig into old documentation and (apparently) old instructions which such a comment would have helped to avoid. As for the proposed solutions: I'm happy to try all and report back :) |
There's really no point in worrying about the private volume size in the Qubes interface, unless you are concerned about a runaway process in the VM using more space than expected. The use of a thin ("sparse") backing pool generally mitigates the private volume size. If you invoke discard/trim inside the VM after deletions, the unused space in the logical volume will be returned to the LVM thinpool for use by all VMs. If it really bothers you that a number is large in the Qubes interface and you have a template-based VM, just create a new VM and move the files there, then delete the original. Brendan |
The answer I usually see is: "You can't." |
This is what I would do. |
I've added a section to https://www.qubes-os.org/doc/resize-disk-image/ @andrewdavidwong @heinrich-ulbricht |
Thanks, @unman. |
Thank you, I find such a hint at the appropriate place very helpful. @unman One minor note: there now seems to be broken heading markup in the document: |
@heinrich-ulbricht Thanks for this. Fixed. |
The problem you're addressing (if any)
How to shrink private storage of AppVMs?
Describe the solution you'd like
I'd like to read documentation on how to do it using the currently existing tools in Qubes 4.0.
Where is the value to a user, and who might that user be?
Useful in the following circumstances:
Describe alternatives you've considered
One might create a new AppVM and move data around. Don't want.
Additional context
I over-sized my AppVMs a bit too much leaving me with a near-full disk preventing upgrades to Fedora 30. Doh.
Relevant documentation you've consulted
Google leads to this page apparently documenting how to do it: http://nukama.github.io/doc/ResizeDiskImage/ - starting with:
But it seems outdated with regards to v4.0 (?). E.g. calling
qvm-start
with--no-guid
parameter returns saying it doesn't recognize the parameter--no-guid
. Furthermoreqrexec
doesn't time out even after settingkernelopts rd.break
.Related, non-duplicate issues
#3725 covers this topic as well but seems to aim for simple tooling to do this. I just need an updated documentation.
The text was updated successfully, but these errors were encountered: