qubes-dom0-update doesn't handle low disk space conditions well #5052
Labels
C: core
eol-4.0
Closed since Qubes 4.0 has been EOL for over one year
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.
Milestone
Qubes OS version
R4.0
Affected component(s) or functionality
qubes-dom0-update
Brief summary
When the system has very low disk space,
qubes-dom0-update
fails with an error message that just says "failed with exit code 1" instead of something more helpful (like "No space left on device").To Reproduce
sudo tune2fs -m <percentage> /dev/mapper/qubes_dom0-root
, where<percentage>
is the % of your filesystem that will be reserved for the superuser only;df -h /
should report 0 in the "available" columnqubes-dom0-update
with updates pendingExpected behavior
Either the update succeeds or the update fails and tells me that I'm out of disk space.
Actual behavior
The update fails with this output:
Additional context
ext4 reserves a certain percentage of disk space for the superuser; see this Stack Exchange question for an explanation of why. This can come out to tens of gigabytes on large partitions. For example, in my case my Qubes partition is 590GB which comes out to ~29.5 GB of disk space reserved for the superuser only.
The reason I said the expected behavior might include the update succeeding is because in this case, there actually is plenty of free space, but it seems that some process invoked by
qubes-dom0-update
is running as a non-superuser. If it ran as the superuser, it would have permission to write to the reserved space in the filesystem. I do think it's probably a better idea to signal an ENOSPC error, though; that route seems like it's playing with fire.Relevant documentation you've consulted
None
Related, non-duplicate issues
https://github.com/QubesOS/qubes-issues/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+qubes-dom0-update+free+space
The text was updated successfully, but these errors were encountered: