#2892 Issue closed: Relax and Recover "the disk layout recreation script failed" after trying recovering

Labels: waiting for info, support / question, won't fix / can't fix / obsolete

prontok opened issue at 2022-11-30 12:52:

Relax-and-Recover 2.7 / 2022-07-13

NAME="SLES"
VERSION="15-SP3"
VERSION_ID="15.3"
PRETTY_NAME="SUSE Linux Enterprise Server 15 SP3"
ID="sles"
ID_LIKE="suse"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:suse:sles:15:sp3"

OUTPUT=ISO
OUTPUT_URL=null
BACKUP=NETFS
BACKUP_URL="iso:///etc/rear/"
ISO_DIR="/etc/rear"
REAR_INITRD_COMPRESSION=lzma
EXCLUDE_VG=( 'hanashared' 'hanalog' 'hanadata' )
BACKUP_PROG_EXCLUDE+=( '/hana/shared/' '/hana/log/' '/hana/data/*' )
AUTORESIZE_PARTITIONS=true
USE_STATIC_NETWORKING=y

The virtual mavhine is working on VmWare

x86_64

About disk:

Vendor: VMware
Product: Virtual disk
Revision: 2.0
Compliance: SPC-4
User Capacity: 53,687,091,200 bytes [53.6 GB]
Logical block size: 512 bytes
LU is thin provisioned, LBPRZ=1
Rotation Rate: Solid State Device
Device type: disk
Local Time is: Wed Nov 30 15:29:44 2022 MSK
SMART support is: Unavailable - device lacks SMART capability.

NAME                                  KNAME     PKNAME    TRAN TYPE FSTYPE      LABEL  SIZE MOUNTPOINT
/dev/fd0                              /dev/fd0                 disk                      4K 
/dev/sda                              /dev/sda                 disk                     50G 
|-/dev/sda1                           /dev/sda1 /dev/sda       part                      2M 
`-/dev/sda2                           /dev/sda2 /dev/sda       part LVM2_member         50G 
  |-/dev/mapper/system-root           /dev/dm-0 /dev/sda2      lvm  btrfs               40G /
  `-/dev/mapper/system-swap           /dev/dm-1 /dev/sda2      lvm  swap                10G [SWAP]
/dev/sdb                              /dev/sdb                 disk LVM2_member        512G 
`-/dev/mapper/hanadata-lvhanadata     /dev/dm-3 /dev/sdb       lvm  xfs                512G /hana/data
/dev/sdc                              /dev/sdc                 disk LVM2_member        256G 
`-/dev/mapper/hanalog-lvhanalog       /dev/dm-2 /dev/sdc       lvm  xfs                256G /hana/log
/dev/sdd                              /dev/sdd                 disk LVM2_member        128G 
`-/dev/mapper/hanashared-lvhanashared /dev/dm-4 /dev/sdd       lvm  xfs                128G /hana/shared
/dev/sr0                              /dev/sr0            ata  rom                    1024M

Description:
I run command: rear recover and have next:

изображение

изображение

изображение

Help me please to recover system from image.

jsmeix commented at 2022-11-30 13:07:

@prontok
from the screenshot images I cannot guess
what the reason is why it failed.

See
https://en.opensuse.org/SDB:Disaster_Recovery
there in particular the section
"Debugging issues with Relax-and-Recover"
and therein the part

To analyze and debug a "rear recover" failure
the following information is mandatory

Most important are ReaR debug log files
(i.e. "rear -D ..." log files).
Without a ReaR debug log file we have no chance
to find out what the root cause could be.

For SUSE Linux Enterprise you may contact SUSE directly
provided you have an appropriate SUSE support contract.
In particular see the section
"SUSE support for Relax-and-Recover" in
https://en.opensuse.org/SDB:Disaster_Recovery

jsmeix commented at 2022-11-30 13:11:

@prontok
only by the way:
I am wondering why you use AUTORESIZE_PARTITIONS=true
regardless that this is not recommended according to
what is documented in usr/share/rear/conf/default.conf
e.g. for ReaR 2.7 online starting at
https://github.com/rear/rear/blob/rear-2.7/usr/share/rear/conf/default.conf#L489

prontok commented at 2022-11-30 13:28:

I use this option to restore the system to a smaller disk
but I also tried to restore without this option and the problem repeats.

jsmeix commented at 2022-11-30 13:45:

Smaller disk and higher level storage things like LVM
calls for problems, see in default.conf (excerpts):

This does not resize volumes on top of the affected partitions

Let's see what the rear -D recover log file shows.

prontok commented at 2022-11-30 13:58:

изображение

This is part debug log file.
Unfortunately I can't send the full log because I can't download the log itself from the server

jsmeix commented at 2022-11-30 14:11:

@prontok
you need to find where diskrestore.sh actually failed
i.e. the (error) message(s) directly before diskrestore.sh failed.
The diskrestore.sh failed at

Mounting filesystem /

so after that message there should be some programm call
that failed and this causes diskrestore.sh to fail
(because diskrestore.sh runs with set -x).

prontok commented at 2022-11-30 14:16:

"rear -v mkbackup" runs successfully and without errors

v00saprpddb:~ # rear -v mkbackup
Relax-and-Recover 2.7 / 2022-07-13
Running rear mkbackup (PID 10699 date 2022-11-30 17:05:18)
Using log file: /var/log/rear/rear-v00saprpddb.log
Running workflow mkbackup on the normal/original system
Using backup archive '/var/tmp/rear.BKNfGrZ2eYa0KlX/tmp/isofs/etc/rear//backup.tar.gz'
Using autodetected kernel '/boot/vmlinuz-5.3.18-150300.59.63-default' as kernel in the recovery system
Creating disk layout
Overwriting existing disk layout file /var/lib/rear/layout/disklayout.conf
SLES12-SP1 (and later) btrfs subvolumes setup needed for /dev/mapper/system-root (default subvolume path contains '@/.snapshots/')
Added  /dev/mapper/system-root to BTRFS_SUBVOLUME_SLES_SETUP in /var/tmp/rear.BKNfGrZ2eYa0KlX/rootfs/etc/rear/rescue.conf
Excluding Volume Group hanashared in EXCLUDE_VG
Excluding Volume Group hanalog in EXCLUDE_VG
Excluding Volume Group hanadata in EXCLUDE_VG
Disabling component 'disk /dev/sdb' in /var/lib/rear/layout/disklayout.conf
Disabling component 'disk /dev/sdc' in /var/lib/rear/layout/disklayout.conf
Disabling component 'disk /dev/sdd' in /var/lib/rear/layout/disklayout.conf
Disabling component 'lvmgrp /dev/hanashared' in /var/lib/rear/layout/disklayout.conf
Disabling component 'lvmgrp /dev/hanalog' in /var/lib/rear/layout/disklayout.conf
Disabling component 'lvmgrp /dev/hanadata' in /var/lib/rear/layout/disklayout.conf
Disabling component 'fs ... /hana/data' in /var/lib/rear/layout/disklayout.conf
Disabling component 'fs ... /hana/log' in /var/lib/rear/layout/disklayout.conf
Disabling component 'fs ... /hana/shared' in /var/lib/rear/layout/disklayout.conf
Disabling component 'lvmdev /dev/hanashared' in /var/lib/rear/layout/disklayout.conf
Disabling component 'lvmdev /dev/hanalog' in /var/lib/rear/layout/disklayout.conf
Disabling component 'lvmdev /dev/hanadata' in /var/lib/rear/layout/disklayout.conf
Using sysconfig bootloader 'grub2' for 'rear recover'
Verifying that the entries in /var/lib/rear/layout/disklayout.conf are correct
Created disk layout (check the results in /var/lib/rear/layout/disklayout.conf)
Creating recovery system root filesystem skeleton layout
To log into the recovery system via ssh set up /root/.ssh/authorized_keys or specify SSH_ROOT_PASSWORD
Copying logfile /var/log/rear/rear-v00saprpddb.log into initramfs as '/tmp/rear-v00saprpddb-partial-2022-11-30T17:05:22+03:00.log'
Copying files and directories
Copying binaries and libraries
Copying all kernel modules in /lib/modules/5.3.18-150300.59.63-default (MODULES contains 'all_modules')
Copying all files in /lib*/firmware/
Testing that the recovery system in /var/tmp/rear.BKNfGrZ2eYa0KlX/rootfs contains a usable system
Creating recovery/rescue system initramfs/initrd initrd.xz with xz lzma compression
Created initrd.xz with xz lzma compression (237387083 bytes) in 247 seconds
Making backup (using backup method NETFS)
Creating tar archive '/var/tmp/rear.BKNfGrZ2eYa0KlX/tmp/isofs/etc/rear//backup.tar.gz'
Archived 1781 MiB [avg 7932 KiB/sec] OK
Archived 1781 MiB in 231 seconds [avg 7897 KiB/sec]
Making ISO image
Wrote ISO image: /etc/rear/rear-v00saprpddb.iso (2.0G)
Exiting rear mkbackup (PID 10699) and its descendant processes ...
Running exit tasks
v00saprpddb:~ #

jsmeix commented at 2022-11-30 14:16:

@prontok
regarding "download the log itself from the server"
see the section "Debugging issues with Relax-and-Recover" in
https://en.opensuse.org/SDB:Disaster_Recovery
that reads (excerpts)

When "rear -d -D recover" fails,
you need to save the log file
out of the ReaR recovery system
(where "rear -d -D recover" was run
and where it had failed) before you
shut down the ReaR recovery system
...
See the "First steps with Relax-and-Recover"
section above how to access the ReaR recovery
system from remote via ssh so that you can
use 'scp' to get files out of the ReaR recovery
system.

The "First steps with Relax-and-Recover" section
reads (excerpt)

SSH_ROOT_PASSWORD="rear"

Never use your original root password here.

prontok commented at 2022-11-30 14:43:

https://user-images.githubusercontent.com/90829636/204825572-da7d90e4-0b5b-457c-8707-7aeb23b46b8b.mp4

I was able to record a small video of the log.

jsmeix commented at 2022-12-02 12:30:

As far as I see the video shows the diskrestore.sh script
but what I need is the "rear -D recover" debug log file
that shows the command calls from the diskrestore.sh script
and the exact (error) message(s) of the command that fails.

theumeshkumar commented at 2022-12-27 11:36:

Hi @jsmeix ,

Will this work ? for output of rear -D restore

image


[Export of Github issue for rear/rear.]