[rear-users] Help migrating Scientific Linux 7.2

Johannes Meixner jsmeix at suse.de
Thu Aug 25 16:21:04 CEST 2016


On Aug 25 15:33 Johannes Meixner wrote (excerpt):
> Accordingly it looks promising that by deactivating all entries
> in disklayout.conf one can skip successfully that during
> "rear recover" any partitions are deleted, created, and
> that any filesystems are created.

But what does not work is that when I only deactivate
the 'disk' and 'part' entries but keep the 'fs'
and 'swap' entries, then "rear recover" fails with:
No code has been generated to restore device fs:/ (fs).
     Please add code to /var/lib/rear/layout/diskrestore.sh
     to manually install it or choose abort.
and indeed diskrestore.sh is the same as before:

LogPrint "Start system layout restoration."

mkdir -p /mnt/local
if create_component "vgchange" "rear" ; then
     lvm vgchange -a n >&8
     component_created "vgchange" "rear"

set -e
set -x

set +x
set +e

LogPrint "Disk layout created."
i.e. nothing therein about creating filesystems or swap.

Currently "rear recover" is not prepared to skip only
certain parts of partitioning and making filesystems.

Currently one can only skip it alltogether and do
partitioning plus creating filesystems plus mounting
alltogether at /mnt/local completely manually.

But when I do partitioning plus creating filesystems
plus mounting alltogether at /mnt/local manually, then
"rear recover" proceeeds for me with some "Continue?/Abort?"
questions (that I answer with Continue) until it restores
the backup.

After backup restore it fails when installing the
bootloader (GRUB 2 in my case) so that I also need
to do this stuff manually:
RESCUE d245:~ # ls -l /dev/disk/by-uuid/
... 9b13281a-5454-41d7-bec4-553f09edc574 -> ../../sda2
... c4068ef1-4abd-40f2-8fe3-a4b654b5966e -> ../../sda1

RESCUE d245:~ # chroot /mnt/local

d245:/ # mkinitrd
Creating initrd: /boot/initrd-4.4.16-56-default

d245:/ # grub2-install /dev/sda2
Installing for i386-pc platform.
Installation finished. No error reported.

d245:/ # vi /etc/fstab

d245:/ # cat /etc/fstab
UUID=c4068ef1-4abd-40f2-8fe3-a4b654b5966e swap swap defaults 0 0
UUID=9b13281a-5454-41d7-bec4-553f09edc574 / btrfs defaults 0 0

d245:/ # exit

RESCUE d245:~ # umount -a

RESCUE d245:~ # reboot -f
but then - finally - my recreated system boots
and it even seems to work o.k. for me!

Kind Regards
Johannes Meixner
SUSE LINUX GmbH - GF: Felix Imendoerffer, Jane Smithard,
Graham Norton - HRB 21284 (AG Nuernberg)

More information about the rear-users mailing list