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

Remove accidental unmount of source partition #35

Merged
merged 2 commits into from Feb 14, 2020

Conversation

shasheene
Copy link
Member

A recent commit added a retry msg box to unmount busy partitions. During a restore operation, unmounting the source partition was added and the commit tested without issue. However, the source partition variable during a restore operation contains the original device node used during the backup operation, which may have been on a different computer. Thus this device node has no bearing on the restore operation, and it may even happen to be the device node that holds the backup files being restored (causing the restore to fail). This partition should therefore not be unmounted.

Ensures the source partition (eg, /dev/sdb1) is NOT unmounted during a restore
operation. Unmounting this was mistakenly added in a recent commit. [1]

Given the source partition is read from a file not a block device, the source
partition variable ($part) only indicates what the original source partition
device node was, so is mostly not relevant during the restore process. In fact,
if the sdb1 partition happens to be the source drive where the backups are
stored, this breaks the restore operation. This breakage was not caught during
testing of the prior commit as backup drive and the original partition being
restored happened to not have the same device node string.

[1] 8f4f0db
Removes unnecessary printing of the number of busy device nodes, which was used
for debug purposes during development of a prior commit.
@shasheene shasheene merged commit 1b55a30 into rescuezilla:master Feb 14, 2020
@shasheene shasheene linked an issue Feb 25, 2020 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant