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

Power: Recovery on multipath volume fails due to get_sysfs_name checks volume path with ! included #1405

Closed
abbbi opened this issue Jul 6, 2017 · 1 comment

Comments

@abbbi
Copy link
Contributor

abbbi commented Jul 6, 2017

  • rear version (/usr/sbin/rear -V): 2.1
  • OS version (SLES):
  • Are you using legacy BIOS or UEFI boot? UEFI
  • Brief description of the issue:

hi there,

we are testing an environment with Power8. The system in this case boots from SAN directly (multipath setup). We disabled the autoexclude option for SAN volumes and enabled the BOOT_FROM_SAN option in default.conf, disklayout.conf looks ok.

During recovery the SAN volumes appear on the system:

RESCUE rescueme:/dev/mapper # ls -la
[..]
lrwxrwxrwx 1 root root 8 Jul 6 2017 mpathas -> ../dm-11

but rear fails in layout/prepare/default/250_compare_disks.sh as it searches for a
device called mapper!mpathas ..

  • source /usr/share/rear/layout/prepare/default/250_compare_disks.sh
    ++ LogPrint 'Comparing disks.'
    ++ Log 'Comparing disks.'
    ++ test 1 -gt 0
    +++ Stamp
    +++ date '+%Y-%m-%d %H:%M:%S.%N '
    ++ echo '1970-01-01 01:10:09.895725408 Comparing disks.'
    1970-01-01 01:10:09.895725408 Comparing disks.
    ++ Print 'Comparing disks.'
    ++ test 1
    ++ echo -e 'Comparing disks.'
    ++ MIGRATION_MODE=
    ++ read disk dev size junk
    +++ grep -E '^disk |^multipath ' /var/lib/rear/layout/disklayout.conf
    +++ get_sysfs_name /dev/mapper/mpathas
    +++ local name=mapper/mpathas
    +++ name=mapper/mpathas
    +++ [[ -e /sys/block/mapper!mpathas ]]
    +++ [[ -h /dev/mapper/mpathas ]]
    ++++ readlink -f /dev/mapper/mpathas
    +++ local target=/dev/dm-11
    +++ [[ -e /sys/block/dm-11 ]]
    ++++ dmsetup info -c --noheadings -o major,minor mpathas
    +++ local dev_number=
    +++ [[ -n '' ]]
    +++ echo 'mapper!mpathas'
    +++ return 1
    ++ dev='mapper!mpathas'
    ++ Log 'Looking for mapper!mpathas...'
    ++ test 1 -gt 0
    +++ Stamp
    +++ date '+%Y-%m-%d %H:%M:%S.%N '
    ++ echo '1970-01-01 01:10:09.900414477 Looking for mapper!mpathas...'
    1970-01-01 01:10:09.900414477 Looking for mapper!mpathas...
    ++ '[' -e '/sys/block/mapper!mpathas' ']'
    ++ LogPrint 'Device mapper!mpathas does not exist.'
    ++ Log 'Device mapper!mpathas does not exist.'
    ++ test 1 -gt 0

i think the ! comes from usr/share/rear/lib/layout-functions.sh:415:
replacing / to ! (for some reason i do not understand):

if [[ -e /sys/block/${name////!} ]] ; then

@abbbi
Copy link
Contributor Author

abbbi commented Jul 12, 2017

close. further investigation has brought up more problems that are leading to the devices not appearing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants