[rear-users] Restoring mdadm system to a single-disk destination fails

Dag Wieers dag at wieers.com
Tue Jul 24 15:44:36 CEST 2012

On Tue, 24 Jul 2012, Les Mikesell wrote:

> On Tue, Jul 24, 2012 at 4:23 AM, Johannes Meixner <jsmeix at suse.de> wrote:
>>> In addition, /mnt/local/etc/fstab is an exact copy of the
>>> original, so booting the restored machine will fail
> [...]
>> Perhaps your etc/fstab comes from the backup restore?
>> For example /etc/fstab from backup.tar.gz may contain additional
>> entries (e.g. manually added entries) which may not be automatically
>> recreated by "rear recover". Therefore I think it is recommended
>> to have /etc/fstab in the backup and exclude it only if needed
>> when the backup is restored.
>> I think a good default for such a functionality could become
>> in particular tricky for the various external backup methods.
> You may also have to change the grub configuration and possibly build
> a new initrd.   It think it would be nice to have an option to have
> the restore script chroot into the mounted system after the restore is
> complete and prompt you through the likely steps - even if it doesn't
> know how to make the correct changes itself.   And to be able to
> reboot back to that point (the chroot environment) from the iso
> without a lot of extra steps if the first boot attempt fails.

Relax-and-Recover already modifies /etc/fstab, adapts your grub 
configuration and recreates the initrd. So if this is not happening for 
you, please provide detailed information (distribution, version, log, 
...) so we can improve this.

We know there are some cornercases (e.g. indirect references) but in order 
to get a clear view of what cases are not already covered, we need to get 
bug-reports and track them.

PS If you are interested in what steps are executed after recovery, feel 
free to dig into the 'finalize' stage (usr/share/rear/finalize). Using 
'rear -s recover' you can look what exact finalize scripts are being run 
on your system:

   [root at moria ~]# rear -s recover | grep finalize
   Source layout/prepare/default/55_finalize_script.sh
   Source finalize/default/01_prepare_checks.sh
   Source finalize/default/10_populate_dev.sh
   Source finalize/GNU/Linux/15_migrate_disk_devices_layout.sh
   Source finalize/GNU/Linux/15_migrate_uuid_tags.sh
   Source finalize/Fedora/i386/17_rebuild_initramfs.sh
   Source finalize/Linux-i386/21_install_grub.sh
   Source finalize/Linux-i386/22_install_grub2.sh
   Source finalize/GNU/Linux/30_create_mac_mapping.sh
   Source finalize/GNU/Linux/41_migrate_udev_rules.sh
   Source finalize/GNU/Linux/42_migrate_network_configuration_files.sh
   Source finalize/default/88_check_for_mount_by_id.sh
   Source finalize/default/89_finish_checks.sh
   Source finalize/default/90_remount_sync.sh

As you can see from that, we already migrate devices, rebuild the ramdisk 
and reinstall the bootloader (in case it is GRUB or GRUB2).

-- dag wieers, dag at wieers.com, http://dag.wieers.com/
-- dagit linux solutions, info at dagit.net, http://dagit.net/

[Any errors in spelling, tact or fact are transmission errors]

More information about the rear-users mailing list