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
usr/share/rear/prep/USB/Linux-i386/350_check_usb_disk.sh - if we pass… #2172
Conversation
… in the actual raw block device, we fail to confirm it via udev since TEMP_USB_DEVICE never gets set via the first two conditions... so, let's check to see if we've set RAW_USB_DEVICE also.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't test it myself but the explanation in
#2171 (comment)
makes sense to me and in general code of the form
if variable is empty then assign variable
should be o.k.
@gdha
|
@sidrew |
…ne documentation previous commit
Sure thing... what's the etiquette here for adding another change? Second pull request? Modify original pull request? My github-fu is lacking... Oh, nevermind... duh. Looks like it pulled in my follow-up commit automagically. Neato. |
So, I think looking at this more, that passing in a raw block device, such as /dev/sdc isn't ever going to work, since the usb code path doesn't assert that any partition be created and used, such as /dev/sdc1 ... I was assuming that if you gave a raw block device, it would assume that. So, this change, as the tool is presently designed... is mostly pointless. |
@sidrew
or e.g. with a format workflow specific option like
to prepare your USB device for use with ReaR. Note the mandatory '--' before the format workflow specific "rear format" prepares a whole disk device like /dev/sdc |
Sure, that's not the issue. I had formatted the drive. The problem is that when the base block device is passed in via USB_DEVICE, e.g. /dev/sdr ... rear tries to use that to install the rescue image. It doesn't scan the device looking for any label... it doesn't assume /dev/sdr1 ... This pull request was to address that if I passed the base block device, this helper script was unable to determine RAW_USB_DEVICE... since it's expecting to have a partition passed in USB_DEVICE. This patch addressed it being able to figure out RAW_USB_DEVICE... but, doesn't address the overall issue that really, the rest of the workflow needs to know about a partition in which to install rescue and backup data. |
… in the actual raw block device, we fail to confirm it via udev since TEMP_USB_DEVICE never gets set via the first two conditions... so, let's check to see if we've set RAW_USB_DEVICE also.
Relax-and-Recover (ReaR) Pull Request Template
Please fill in the following items before submitting a new pull request:
Pull Request Details:
Type: Bug Fix
Impact: Normal
Reference to related issue (URL): OUTPUT=USB neither works with BACKUP_URL=nfs://... nor with whole disk USB_DEVICE=/dev/sdc #2171
How was this pull request tested? Tested in situ on affected server using real usb device.
Brief description of the changes in this pull request:
Allows us to assert the original raw block device inferred from udev info.