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

Check tmp free space before start extraction #101

Closed
wants to merge 1 commit into from

Conversation

donob4n
Copy link

@donob4n donob4n commented Aug 20, 2019

Tries to fix QubesOS/qubes-issues#4791

I think that the problem could be more complex if the destination pool is on the same device of the temporary directory.

Also I am not sure if all the data is being extracted before deleting anything, according to my recent experience it seems the case but looking at the code I am not sure about this.

Well at least I think this does not hurt and it prevents to extract a lot of gigabytes for just failing after some hours.

@codecov
Copy link

codecov bot commented Aug 20, 2019

Codecov Report

Merging #101 into master will increase coverage by 0.16%.
The diff coverage is 80%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #101      +/-   ##
==========================================
+ Coverage   74.75%   74.92%   +0.16%     
==========================================
  Files          47       47              
  Lines        5677     5682       +5     
==========================================
+ Hits         4244     4257      +13     
+ Misses       1433     1425       -8
Impacted Files Coverage Δ
qubesadmin/backup/restore.py 57.52% <80%> (+0.1%) ⬆️
qubesadmin/tools/qvm_run.py 79.76% <0%> (+2.97%) ⬆️
qubesadmin/spinner.py 77.41% <0%> (+6.45%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 769f8a5...fbd6bd3. Read the comment docs.

@marmarek
Copy link
Member

Also I am not sure if all the data is being extracted before deleting anything

What do you mean deleting?

@donob4n
Copy link
Author

donob4n commented Aug 20, 2019

What do you mean deleting?

I mean removing unneeded (already restored) temporary files. I am not sure if

it is being executed for some temp files before the whole process ends.

In that case the free space restriction could be lowered, but if the temporary directory and the current pool are on the same device it should be hardened.

Do you known exactly when the temporary files are deleted?

@marmarek
Copy link
Member

it is being executed for some temp files before the whole process ends.

Yes, it's deleted as soon as the content is imported into the volume. Ideally (when decrypt, decompress and import is fast enough) there should be only a need for a single chunk of data (about 100MB). But in practice the opposite is true.

There are some ideas how to solve it without requiring disk space for the whole backup:
QubesOS/qubes-issues#3230 (comment)

@donob4n
Copy link
Author

donob4n commented Aug 20, 2019

Well, seeing that the space problem is not a real requirement I am closing this.

I will try to test with the "checkpoint" method.

@donob4n donob4n closed this Aug 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants