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

Labels: won't fix / can't fix / obsolete

abbbi opened issue at 2017-07-06 13:30:

  • 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 commented at 2017-07-12 10:10:

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


[Export of Github issue for rear/rear.]