#1819 PR merged: Issue #1722 - Cannot restore disk built on multipath + md

Labels: enhancement, fixed / solved / done, minor bug

rmetrich opened issue at 2018-05-28 09:35:

Trying to restore a backup of a system booting with multipath + software
raid, at the rescue prompt, after starting multipathd or executing "rear
recover", the multipath devices are not found.
This is due to mdadm building the array at boot, preventing multipath
from grabbing the disks later.

Solution: Disable automatic building of software raids (mdadm) by
ignoring the corresponding udev rule.

Tested on RHEL7 and RHEL6.
Requires additional testing on Ubuntu and SLES (sorry I don't have
these).

Signed-off-by: Renaud Métrich rmetrich@redhat.com

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 / New Feature / Enhancement / Other?

Enhancement

  • Impact: Low / Normal / High / Critical / Urgent

Normal

  • Reference to related issue (URL):

https://github.com/rear/rear/issues/1722

  • How was this pull request tested?

RHEL6 and RHEL7 restoration of multipath+md systems

  • Brief description of the changes in this pull request:

Disable automatic building of software raids (mdadm) by
ignoring the corresponding udev rule.

gdha commented at 2018-05-29 07:49:

@rmetrich Just wonder what the impact is for those who rely on software RAID rebuild? What are the risks?
@jsmeix And how will SLES systems behave?
@schabrolles What are your thoughts as SME?

rmetrich commented at 2018-05-29 08:13:

With this, the software raid is not rebuilt automatically upon boot. Since ReaR is supposed to recreate all the partitions, this should in fact be expected to have no rebuild.
I cannot test on SLES, @jsmeix is there some dev licence I could get somehow to be able to set up some SLES VM also?

gdha commented at 2018-05-29 08:43:

@rmetrich You can download any SLES ISO and use it for 60 days (with full powers)

gdha commented at 2018-06-01 09:52:

@rmetrich Were you able to download SLES and use it?

rmetrich commented at 2018-06-01 12:46:

@gdha Working on that. This needs fixes (different udev rule number at least).

rmetrich commented at 2018-06-01 15:23:

  • SLES11 doesn't need this
  • SLES12 needs this (mds are automatically created)

Unfortunately the rule is different than on RHEL/Fedora.

I propose to comment out the ARRAY lines in /etc/mdadm.conf, which makes no array to be built automatically.
However, if the admin wants to build them, then he will have the configuration in place by looking into /etc/mdadm.conf.

Tested on RHEL7 and SLES11 and SLES12.

jsmeix commented at 2018-06-05 09:06:

I think the actual generic solution would be an early "cleanupdisk" script
cf. https://github.com/rear/rear/issues/1722#issuecomment-394634627

gdha commented at 2018-06-08 16:00:

@rmetrich Please check the comment from @jsmeix - if that is cleared out we can accept the PR for 2.4

jsmeix commented at 2018-06-12 07:05:

With
https://github.com/rear/rear/commit/123ba14960a96cd0f0428b642775283a65920e47
this issue should be completely done.


[Export of Github issue for rear/rear.]