#2093 Issue closed: partitial restore: grub2 won't boot

Labels: waiting for info, support / question, no-issue-activity

geksi opened issue at 2019-03-21 13:39:

  • ReaR version ("/usr/sbin/rear -V"):
    2.4.3

  • OS version ("cat /etc/rear/os.conf" or "lsb_release -a" or "cat /etc/os-release"):
    RHEL 7.5

  • ReaR configuration files ("cat /etc/rear/site.conf" and/or "cat /etc/rear/local.conf"):
    OUTPUT=ISO
    BACKUP=TSM
    TSM_RESULT_SAVE=y
    TSM_RM_ISOFILE=y

  • Hardware (PC or PowerNV BareMetal or ARM) or virtual machine (KVM guest or PoverVM LPAR):
    KVM virt. machine

  • System architecture (x86 compatible or PPC64/PPC64LE or what exact ARM device):
    x86

  • Storage (lokal disk or SSD) and/or SAN (FC or iSCSI or FCoE) and/or multipath (DM or NVMe):
    KVM disks

  • Description of the issue (ideally so that others can reproduce it):
    original machine runs with 5 virtuall hd's provided from kvm (1 system hd and 4 data hd's). 1:1 restore for all fs and disks works fine.

But if i try to restore only system disk without data disks the restored system will not boot:

########################
cannot get disks parameters
boot:
########################

original machine config:

[root@x8888 grub2]# pvs
  PV         VG         Fmt  Attr PSize  PFree
  /dev/sda3  system8888 lvm2 a--  41.49g <26.37g
  /dev/sdb   x8888vg1 lvm2 a--  59.99g  29.99g
  /dev/sdc   x8888vg2 lvm2 a--  49.99g      0
  /dev/sdd   x8888vg3 lvm2 a--  49.99g      0
  /dev/sde   x8888vg4 lvm2 a--  59.99g      0

[root@x8888 grub2]# vgs
  VG         #PV #LV #SN Attr   VSize  VFree
  x8888vg1   1   2   0 wz--n- 59.99g  29.99g
  x8888vg2   1   1   0 wz--n- 49.99g      0
  x8888vg3   1   1   0 wz--n- 49.99g      0
  x8888vg4   1   1   0 wz--n- 59.99g      0
  system8888   1   8   0 wz--n- 41.49g <26.37g

[root@x8888 grub2]# lvs
  LV         VG         Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  x8888lv1 x8888vg1 -wi-ao----  10.00g
  x8888lv2 x8888vg1 -wi-ao----  20.00g
  x8888lv3 x8888vg2 -wi-ao----  49.99g
  x8888lv4 x8888vg3 -wi-ao----  49.99g
  x8888lv5 x8888vg4 -wi-ao----  59.99g
  home_lv    system8888 -wi-ao---- 512.00m
  zzzz_lv       system8888 -wi-ao---- 128.00m
  opt_lv        system8888 -wi-ao----   1.00g
  root_lv       system8888 -wi-ao----   4.00g
  uuuu_lv      system8888 -wi-ao----   2.00g
  tmp_lv        system8888 -wi-ao----   2.00g
  eee_lv         system8888 -wi-ao----   1.50g
  var_lv          system8888 -wi-ao----   4.00g

Disk /dev/sda: 53.7 GB, 53682896896 bytes, 104849408 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x0009e133

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     1050623      524288   83  Linux
/dev/sda2         1050624    17827839     8388608   83  Linux
/dev/sda3        17827840   104849407    43510784   8e  Linux LVM

jsmeix commented at 2019-03-21 16:15:

@geksi
and what exactly did you do to "to restore only system disk without data disks"?
And why do you try to do that?
What is your reason behind why "1:1 restore for all fs and disks works fine"
is not what you need in your particular use case?

ReaR is first and foremost meant to recreate a system
as much as possible exactly as it was before.

Does perhaps
https://github.com/rear/rear/blob/master/doc/user-guide/11-multiple-backups.adoc
help you for your particular use case?

geksi commented at 2019-03-22 06:59:

and what exactly did you do to "to restore only system disk without data disks"?
I detach all disks except the system disk on KVM host and then start recover.

Current disk mapping table (source -> target):
/dev/sda /dev/sda
.
.
.
Recreating directories (with permissions) from /var/lib/rear/recovery/directories_permissions_owner_group
Confirm restored config files or edit them

  1. Confirm it is OK to recreate initrd and reinstall bootloader and continue 'rear recover'
  2. Edit restored etc/fstab (/mnt/local/etc/fstab)
  3. View restored etc/fstab (/mnt/local/etc/fstab)
  4. Use Relax-and-Recover shell and return back to here
  5. Abort 'rear recover'
    (default '1' timeout 300 seconds)
    1
    User confirmed restored files
    Patching '/mnt/local/etc/default/grub' instead of 'etc/sysconfig/grub'
    Not patching dead link 'etc/mtab' -> '/mnt/local/proc/9637/mounts'
    Running mkinitrd...
    Updated initrd with new drivers for kernel 3.10.0-957.1.3.el7.x86_64.
    Running mkinitrd...
    Updated initrd with new drivers for kernel 3.10.0-957.5.1.el7.x86_64.
    Skip installing GRUB Legacy boot loader because GRUB 2 is installed (grub-probe or grub2-probe exist).
    Installing GRUB2 boot loader
    Finished recovering your system. You can explore it under '/mnt/local'.
    Exiting rear recover (PID 5455) and its descendant processes
    Running exit tasks

And why do you try to do that?
What is your reason behind why "1:1 restore for all fs and disks works fine"
is not what you need in your particular use case?
A kind of business requirement

As you can see in my case the restore runs without errors. Why the system doesn't boot?

geksi commented at 2019-03-26 08:02:

debug file from partially restore
rear-x8888.log

github-actions commented at 2020-06-28 01:33:

Stale issue message


[Export of Github issue for rear/rear.]