How to restore a ReaR backup after a multipath disk was replaced

Solution Verified - Updated -

Issue

  • Recovering a system using ReaR when having a multipath disk with non-default device name (e.g. System instead of mpathX) after disk was replaced fails with the following error

    • rear recover output:

      # rear recover
      Relax-and-Recover 2.00 / Git
      Using log file: /var/log/rear/rear-mystem.log
      Running workflow recover within the ReaR rescue/recovery system
      Comparing disks.
      Disk configuration is identical, proceeding with restore.
      Start system layout restoration.
      Creating partitions for disk /dev/mapper/System (gpt)
      An error occurred during layout recreation.
      
      1) View Relax-and-Recover log
      2) View original disk space usage
      3) Go to Relax-and-Recover shell
      4) Edit restore script (diskrestore.sh)
      5) Continue restore script
      6) Abort Relax-and-Recover
      
    • rear log file:

      # cat /var/log/rear/rear-mysystem.log
      2018-01-19 13:51:51 Start system layout restoration.
      WARNING: Failed to connect to lvmetad. Falling back to device scanning.
      +++ create_component /dev/mapper/System multipath
      +++ local device=/dev/mapper/System
      +++ local type=multipath
      +++ local touchfile=multipath--dev-mapper-System
      +++ '[' -e /tmp/rear.YC1N4WQZ1IL0W8d/tmp/touch/multipath--dev-mapper-System ']'
      +++ return 0
      +++ LogPrint 'Creating partitions for disk /dev/mapper/System (gpt)'
      +++ Log 'Creating partitions for disk /dev/mapper/System (gpt)'
      +++ test 1 -gt 0
      ++++ Stamp
      ++++ date '+%Y-%m-%d %H:%M:%S '
      +++ echo '2018-01-19 13:51:51 Creating partitions for disk /dev/mapper/System (gpt)'
      2018-01-19 13:51:51 Creating partitions for disk /dev/mapper/System (gpt)
      +++ Print 'Creating partitions for disk /dev/mapper/System (gpt)'
      +++ test 1
      +++ echo -e 'Creating partitions for disk /dev/mapper/System (gpt)'
      +++ my_udevsettle
      +++ has_binary udevadm
      +++ for bin in '$@'
      +++ type udevadm
      +++ return 0
      +++ udevadm settle
      +++ parted -s /dev/mapper/System mklabel gpt
      Error: Could not stat device /dev/mapper/System - No such file or directory.
      2018-01-19 13:51:51 An error occurred during layout recreation.
      
  • Migrating a system using ReaR to a different multipath disk with original disk not mapped to mpatha (e.g. disk was mapped to mpathc) fails with the following error

    • rear recover output:

      # rear recover
      Relax-and-Recover 2.00 / Git
      Using log file: /var/log/rear/rear-mystem.log
      Running workflow recover within the ReaR rescue/recovery system
      Comparing disks.
      Disk configuration is identical, proceeding with restore.
      Start system layout restoration.
      Creating partitions for disk /dev/mapper/mpathc (gpt)
      An error occurred during layout recreation.
      
      1) View Relax-and-Recover log
      2) View original disk space usage
      3) Go to Relax-and-Recover shell
      4) Edit restore script (diskrestore.sh)
      5) Continue restore script
      6) Abort Relax-and-Recover
      
    • rear log file:

      # cat /var/log/rear/rear-mysystem.log
      2018-01-19 13:51:51 Start system layout restoration.
      WARNING: Failed to connect to lvmetad. Falling back to device scanning.
      +++ create_component /dev/mapper/mpathc multipath
      +++ local device=/dev/mapper/mpathc
      +++ local type=multipath
      +++ local touchfile=multipath--dev-mapper-mpathc
      +++ '[' -e /tmp/rear.YC1N4WQZ1IL0W8d/tmp/touch/multipath--dev-mapper-mpathc ']'
      +++ return 0
      +++ LogPrint 'Creating partitions for disk /dev/mapper/mpathc (gpt)'
      +++ Log 'Creating partitions for disk /dev/mapper/mpathc (gpt)'
      +++ test 1 -gt 0
      ++++ Stamp
      ++++ date '+%Y-%m-%d %H:%M:%S '
      +++ echo '2018-01-19 13:51:51 Creating partitions for disk /dev/mapper/mpathc (gpt)'
      2018-01-19 13:51:51 Creating partitions for disk /dev/mapper/mpathc (gpt)
      +++ Print 'Creating partitions for disk /dev/mapper/mpathc (gpt)'
      +++ test 1
      +++ echo -e 'Creating partitions for disk /dev/mapper/mpathc (gpt)'
      +++ my_udevsettle
      +++ has_binary udevadm
      +++ for bin in '$@'
      +++ type udevadm
      +++ return 0
      +++ udevadm settle
      +++ parted -s /dev/mapper/mpathc mklabel gpt
      Error: Could not stat device /dev/mapper/mpathc - No such file or directory.
      2018-01-19 13:51:51 An error occurred during layout recreation.
      

Environment

  • Red Hat Enterprise Linux 7
  • rear 2.00
  • multipath

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.