-
Notifications
You must be signed in to change notification settings - Fork 246
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
Allowing multipath devices to be candidate disk during mapping. #1314
Conversation
- Need to store multipath device size in LAYOUT_FILE - Add line beginning by multipath to be part of the comparison process when searching for device with the same size or finding unmapped candidate.
@schabrolles Is this part 1 of a pull request? Or am I missing the point here? |
@gdha You are right in a way. (#1309 #1315)
|
@schabrolles echo "multipath /dev/mapper/$dm_name $dm_size ${slaves%,}" >> $DISKLAYOUT_FILE but I miss adapted code where those 'multipath' lines are input As far as I see As far as I see also Now I wonder where ${slaves%,} is used at all? If ${slaves%,} is nowhere used we should remove it. |
I think I found where ${slaves%,} is used: In while read multipath device slaves junk ; do ... done < <(grep ^multipath $LAYOUT_FILE) where now "read multipath device slaves junk" Furthermore with positional parameters dm_size=$(cat /sys/block/$name/size) is not fail-safe and must be at least dm_size=$(cat /sys/block/$name/size) test "$dm_size" || Error "Failed to get /sys/block/$name/size" so that it errors out early during "rear mkbackup/mkrescue" |
Same in while read multipath device slaves junk ; do ... done < <(grep ^multipath "$LAYOUT_FILE") must now be while read multipath device dm_size slaves junk ; do |
FYI: |
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.
Because dm_size must not be empty
error ouf it it is empty.
Check layout/save/default/320_autoexclude.sh
and layout/prepare/default/520_exclude_components.sh
whether or not
"read multipath device slaves junk"
therein needs to be adapted as
"read multipath device dm_size slaves junk"
@jsmeix Good catch... I will do this. |
@jsmeix Do you want me to change LAYOUT_FILE to DISKLAYOUT_FILE in the following files ?
|
@jsmeix it seems that the latest changes in |
- Due to changes in commit (dd65bd0) dm_size is now the field 2 slave disks move to field 3
@jsmeix, I think I found it. (9359a1a)
I'm gonna test this tomorrow with Sles11sp4, Sles12, RHEL 6 and RHEL 7. |
@schabrolles |
@jsmeix if I understand well, we should use What do you think ? |
@schabrolles To fix the DISKLAYOUT_FILE versus LAYOUT_FILE I fear there is perhaps some obscure reason why I would prefer to keep separated issues separated (KSIS;-) |
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.
@schabrolles
I will merge it when your tests
with Sles11sp4, Sles12, RHEL 6
and RHEL 7 single path => multipath
AND multipath => single path are
succesful.
@jsmeix I've finished my test and the migration works for all of the tests. I only have one issue regarding xfs with rhel7 when moving from multipath to not multipath .... but it is not related to this pull request. I will investigate and open another pull request/issue if needed. |
During migration, ReaR recovery propose candidate disk if they have the same (or bigger) size than the original.
The problem is that size of mulitpath device is currently not stored in layout file:
This patch propose :
$LAYOUT_FILE