Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: Why does "rear recover" regenerate the original's system initrd in any case? #3162

Open
jsmeix opened this issue Feb 22, 2024 · 5 comments
Assignees
Labels
cleanup discuss / RFC enhancement Adaptions and new features

Comments

@jsmeix
Copy link
Member

jsmeix commented Feb 22, 2024

Triggered by
#3152
and
#3155
I am wondering
why "rear recover" regenerates
the original's system initrd in any case?

In particular why I am wondering see in my
#3152 (comment)

Cannot create initrd (found no mkinitrd in the recreated system).
...
Nevertheless the recreated system boots well for me
as expected because I recreated on 100% compatible
replacement "hardware" (on a same VM) so the same initrd
from the original system should still work.

and see in my
#3155 (comment)

Additionally improved the user messages
(in particular the warning messages)
to make it more clear that the point is
to decide if the recreated system will boot
with the initrd 'as is' from the backup restore.

The default use case of "rear recover" is to recreate
on "Fully compatible replacement hardware"
(where "hardware" could be also virtual hardware), cf.
https://en.opensuse.org/SDB:Disaster_Recovery#Fully_compatible_replacement_hardware_is_needed

On "fully compatible replacement hardware"
the initrd 'as is' from the original system
together with the kernel 'as is' from the original system
(that both together are restored 'as is' from the backup)
must still work
(otherwise it is no "fully compatible replacement hardware").

So for the default use case of "rear recover"
there is no need to regenerate the initrd.

But regenerating the initrd needs relatively long time
so "rear recover" is slower than actually needed
AND
regenerating the original's system initrd
during "rear recover" may generate the new initrd
with (possibly subtle but severe) differences
compared to the original's system initrd
so regenerating the initrd in any case
may do more harm than good in practice
for the default use case of "rear recover".

@jsmeix jsmeix added enhancement Adaptions and new features cleanup discuss / RFC labels Feb 22, 2024
@jsmeix jsmeix self-assigned this Feb 22, 2024
jsmeix added a commit that referenced this issue Feb 22, 2024
Overhauled finalize/SUSE_LINUX/i386/550_rebuild_initramfs.sh
Now it uses dracut by default and mkinitrd as fallback
see #3152
Additionally improved the user messages (in particular the warnings)
to make it more clear that the point is to decide if the recreated system
will boot with the initrd 'as is' from the backup restore,
cf. #3162
Furthermore removed the whole INITRD_MODULES code
because INITRD_MODULES is not used and
/etc/sysconfig/kernel does no longer exist since SLES12
so the INITRD_MODULES code is dead code.
@pcahyna
Copy link
Member

pcahyna commented Feb 22, 2024

I would check with SW RAID, I suspect some details of the recreated array may differ from the original (like UUIDs) and regenerating the initrd may be needed for picking up this.

@pcahyna
Copy link
Member

pcahyna commented Feb 22, 2024

This may be the case also for other IDs in the system config files that may change, if the files are embedded in the ramdisk. We have a script running at the end that updates the IDs in known config files.

@jsmeix
Copy link
Member Author

jsmeix commented Feb 23, 2024

@pcahyna
thank you for the reasons why regenerating the initrd
could be needed in any case to be more on the safe side
against (possibly subtle but severe) differences
between the original system and the recreated system.

lzaoral pushed a commit to lzaoral/rear that referenced this issue Feb 27, 2024
Overhauled finalize/SUSE_LINUX/i386/550_rebuild_initramfs.sh
Now it uses dracut by default and mkinitrd as fallback
see rear#3152
Additionally improved the user messages (in particular the warnings)
to make it more clear that the point is to decide if the recreated system
will boot with the initrd 'as is' from the backup restore,
cf. rear#3162
Furthermore removed the whole INITRD_MODULES code
because INITRD_MODULES is not used and
/etc/sysconfig/kernel does no longer exist since SLES12
so the INITRD_MODULES code is dead code.
lzaoral pushed a commit to lzaoral/rear that referenced this issue Mar 5, 2024
Overhauled finalize/SUSE_LINUX/i386/550_rebuild_initramfs.sh
Now it uses dracut by default and mkinitrd as fallback
see rear#3152
Additionally improved the user messages (in particular the warnings)
to make it more clear that the point is to decide if the recreated system
will boot with the initrd 'as is' from the backup restore,
cf. rear#3162
Furthermore removed the whole INITRD_MODULES code
because INITRD_MODULES is not used and
/etc/sysconfig/kernel does no longer exist since SLES12
so the INITRD_MODULES code is dead code.
@abbbi
Copy link
Contributor

abbbi commented Mar 14, 2024

just as side note, i also experiencing this mostly on systems with multipath setups.
Im using qemu to simulate a multipath san environment and noted in my automated tests that initrd is allways recreated, even if system recovery is done into is started with equal qemu options.

Copy link

Stale issue message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup discuss / RFC enhancement Adaptions and new features
Projects
None yet
Development

No branches or pull requests

3 participants