-
-
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
External USB drives possibly interrupting backup by going to sleep #7797
Comments
First, Qubes Backup should definitely fail. That means it should indicate an error and return a non-zero exit code. If it does not, that is a bug. The second is that your hardware might have problems. One possibility is a failing hard drive, but another is that it uses device-managed shingled magnetic recording (SMR). SMR drives can freeze for long periods of time during garbage collection, and this can cause Linux to treat them as failed and disconnect them. |
Regarding the hard drive I looked at the manufacturer's technical specifications sheet and all the 3.5" versions of that category used CMR (which I assume must be an acronym for Conventional Magnetic Recording). It could have been failing but it's supposed to be a high-end one within its 5-year warranty and it hasn't shown any other signs of failure yet. I could scan it for bad sectors if that might be useful. Today I tried to reproduce the error on the same hard drive using the same USB 3.0 docking station but unfortunately the backup finished and verified successfully. However:
-rw-r--r-- 1 user user 50G Oct 1 09:21 urandom.1
-rw-r--r-- 1 user user 100G Oct 1 09:47 urandom.3
-rw-r--r-- 1 user user 200G Oct 1 09:37 zero.2
-rw-r--r-- 1 user user 50G Oct 1 09:49 zero.4
So sleep happens, although not causing any I/O errors under these settings. The old fedora-32 template was saved from the disaster, so maybe I should try again using it for both sys-usb and dispVM in HVM mode and with enough backed up VMs to almost fill the entire drive so it causes multiple sleep events within the same backup session. |
That's normal on LVM. |
While I recommend doing verifies in the future, dont feel too bad about that decision because that the "verify" does not actually seem to verify that the backup happened, meaning that you could have done the verify and gotten the "everything backed up fine", and still had the same problem. (The EOF message implies to me that this would have happened to you) (note: I've just turned the verify problem into it's own issue at #7809 ) |
In case it may be useful, the USB 3.0 dock I used to perform the backup was a Sharkoon QuickPort Combo USB3.0. Both the computer and the dock were plugged into an Uninterruptible Power Suply. |
To be clear: This happens only when using the dock; it does not happen when bypassing the dock and plugging the external USB hard drive directly into the computer? |
This dock's function is to allow using internal drives as external ones. After the failure I kept doing backups on that hard drive but bypassing the dock and plugging the drive directly into the motherboard's SATA port. When I do backups like this the motor never stops and the verify seems to work fine. (However I never dared to restore them on my PC yet. I could install Qubes on another drive and try to restore them there to confirm the verification process didn't give a false success message if that may be useful) |
This comment has been minimized.
This comment has been minimized.
Affects R4.2.3 |
In the cube that the drive is attached to I ran a script that created and delete a file every 5 seconds hoping that would make the drive stay awake, but the backup still got stuck unfortunately |
You need to call |
Is it even a problem if the drive spins down? Normally it should just transparently spin up again when data transfer resumes. This is not supposed to upset filesystem mounts etc. I think it's usually not that spinning down causes a pause in the backup, but the reverse: Some temporary or indefinite pause in the backup causes the drive to spin down. @SarneWeber Do you see any kernel errors? |
Thanks for reminding me to call Then, I tried something else - I tried to use ssh to store the backup on a different computer, with a different (this time internal) drive. The drive has not gone to sleep, and yet the backup is still stuck at the same amount of bytes written as the case was with my external USB drive. Therefore, I believe I was mistaken, as rustybird suggested. I am still curious about what the problem is that causes my backups to get stuck. But I'm unsure if a comment on this issue is an appropiate place, as the description of the issue likely does not match my issue. So please tell me if it is inappropriate. Here's some details about my issue:
|
@SarneWeber, if I understand you correctly, you're saying that this issue does not really affect Qubes 4.2 after all and therefore should not have been reopened. In that case, I'll re-close this issue. Regarding your related problem, please note that this issue tracker (qubes-issues) is not intended to serve as a help desk or tech support center. Instead, we've set up other venues where you can ask for help and support, ask questions, and have discussions. (By contrast, the issue tracker is more of a technical tool intended to support our developers in their work.) Thank you for your understanding. |
This issue is being closed because:
If anyone believes that this issue should be reopened, please leave a comment saying so. |
@SarneWeber This could be a combination of two problems:
|
Qubes OS release
Upgrade from 4.0 to 4.1.1
Brief summary
When doing a backup of relatively large VMs on an external USB drive the motor stops spinning at a certain point and the resulting file contains only a sequential portion of the data.
It's already mentioned it in my comment in issue #7567 as this might be a cause for I/O errors and the fix could probably solve both issues.
Steps to reproduce
Expected behavior
The restored VMs' logical volumes' storage byte count is identical to the original one before starting the backup.
Actual behavior
In the Qubes Backup Restore tool an I/O error popped out and half of the VMs showed 0 bytes of Disk Usage in the Qube Manager.
When doing an emergency recovery all of those 0-byte VMs had an Unexpected EOF error in all of their chunks when decrypting them with scrypt. One of the VMs' chunks were readable until the 490'th.
The text was updated successfully, but these errors were encountered: