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

Update 15_migrate_uuid_tags.sh #956

Merged
merged 4 commits into from Aug 10, 2016
Merged

Update 15_migrate_uuid_tags.sh #956

merged 4 commits into from Aug 10, 2016

Conversation

ghost
Copy link

@ghost ghost commented Aug 9, 2016

Hello,
after migration fs_uuid for root partition wasn't changed in ELILO config file /etc/elilo.conf

e.g.

_image = /boot/vmlinuz-3.0.101-68-default

Don't change this comment - YaST2 identifier: Original name: linux

label = Linux
append = "LOCAL_BOOT=yes root=/dev/mapper/360002ac0000000000000000700015e10_part4 disk=/dev/mapper/360002ac0000000000000000700015e10 resume=/dev/mapper/360002ac0000000000000000700015e10_part5 n

osoftlockup intel_idle.max_cstate=0 processor.max_cstate=0 mce=ignore_ce idle=poll elevator=noop biosdevname=1 quiet"
initrd = /boot/initrd-3.0.101-68-default
root = /dev/disk/by-uuid/c7c47b25-30d8-42bc-8ca8-13f939b5c7b8
description = "SAP Application"_

fs_uuid for root partition wasn't changed after migration in file /etc/elilo.conf

e.g.

image = /boot/vmlinuz-3.0.101-68-default
###Don't change this comment - YaST2 identifier: Original name: linux###
    label = Linux
    append = "LOCAL_BOOT=yes root=/dev/mapper/360002ac0000000000000000700015e10_part4 disk=/dev/mapper/360002ac0000000000000000700015e10 resume=/dev/mapper/360002ac0000000000000000700015e10_part5 n
osoftlockup intel_idle.max_cstate=0 processor.max_cstate=0 mce=ignore_ce idle=poll elevator=noop biosdevname=1 quiet"
    initrd = /boot/initrd-3.0.101-68-default
    root = /dev/disk/by-uuid/c7c47b25-30d8-42bc-8ca8-13f939b5c7b8
    description = "SAP Application"
@jsmeix jsmeix added the enhancement Adaptions and new features label Aug 9, 2016
@jsmeix jsmeix added this to the Rear future milestone Aug 9, 2016
@jsmeix jsmeix self-assigned this Aug 9, 2016
@jsmeix
Copy link
Member

jsmeix commented Aug 9, 2016

@ltomasik
I have basically no idea what you are talking about here
( in particular I do not use elilo on my test systems):

From #956 (comment)
I can only pick a few snippets

migration
ELILO
YaST2
SAP

from which I guess you use a SUSE or openSUSE system
with elilo and SAP and you used Relax-and-Recover
to somehow migrate that system from one kind of hardware
or virtual machine onto another somewhat different kind of
hardware or virtual machine or something like that.

In the end I only like to understand if your proposed change
could cause any unexpected regressions for other users.
If there are no regressions I could "just merge" it.

To understand if your proposed change could cause any
unexpected regressions for other users, I like to understand
your environment and what exactly you intend to do with
Relax-and-Recover.

ltomasik added 2 commits August 9, 2016 12:37
change original lun wwid to the new one after migration.
create global var LUN_WWID_MAP and fill it with migration data from /etc/rear/lun_wwid_mapping.conf

e.g. lun_wwid_mapping.conf
original_lun_wwid    new_lun_wwid    device_file
360002ac0000000000000000700015e10    360002ac0000000000000000200015e10    /dev/mapper/360002ac0000000000000000200015e10
@ghost
Copy link
Author

ghost commented Aug 9, 2016

@jsmeix
we have following scenario:
SAP Hana, SLES 11 SP4, SAN boot, UEFI, ELILO, migration, Relax-and-Recover 1.18 / Git

e.g.
original LUN: 360002ac0000000000000000700015e10
root_partition: /dev/mapper/360002ac0000000000000000700015e10_part4
fs_uuid: c7c47b25-30d8-42bc-8ca8-13f939b5c7b8

new LUN: 360002ac0000000000000000200015e10
root_partition: /dev/mapper/360002ac0000000000000000200015e10_part4
fs_uuid: 170afd84-3e91-466c-bdd4-2cbe90c19ddc

We did backup with ReaR and tried to restore it on same hardware with different LUN (DR tests). It failed because of:

  • there was an unchanged original fs_uuid in /etc/elilo.conf, we fixed it with d9f76e6f
  • there was an unchanged original lun wwid in /etc/elilo.conf and /etc/fstab, we fixed it with
    e1a704b6

Restore finished successfully after we applied above mentioned changes. Without it restore was still failing with following error.

Perl-Bootloader: 2016-08-04 20:48:31 <3> pbl-5825.2 Core::RunCommand.1614: Error: '/sbin/elilo -v' failed with exit code 1, output:
<<<<<<<<<<<<<<<<
## parsing '/etc/elilo.conf'...
elilo: Warning: couldn't determine fs_uuid -- skip SecureBoot/grub2 config!
## writing 'elilo.conf' to '/boot/efi/efi/SuSE/elilo.conf'
## copy files to '/boot/efi/efi/SuSE'
> cp --preserve=timestamps /usr/lib64/efi/elilo.efi /boot/efi/efi/SuSE
> cp --preserve=timestamps /boot/vmlinuz-3.0.101-68-default /boot/efi/efi/SuSE
> cp --preserve=timestamps /boot/initrd-3.0.101-68-default /boot/efi/efi/SuSE
## remove obsolete files based on '/boot/efi/efi/SuSE/elilo.list'
> rm /boot/efi/efi/SuSE/grub.cfg
> rm /boot/efi/efi/SuSE/shim.efi
> rm /boot/efi/efi/SuSE/grub.efi
> rm /boot/efi/efi/SuSE/MokManager.efi
elilo: 1 warning encountered.
>>>>>>>>>>>>>>>>
There was an error generating the initrd (1)
2016-08-04 20:48:31 WARNING !!!
initramfs creation (mkinitrd) failed, please check '/var/log/rear/rear-cls8923.log' to see the error
messages in detail and decide yourself, wether the system will boot or not.

2016-08-04 20:48:31 Including finalize/Linux-i386/21_install_grub.sh
2016-08-04 20:48:31 Including finalize/Linux-i386/22_install_elilo.sh
2016-08-04 20:48:31 Installing ELILO boot loader
2016-08-04 20:48:31 ERROR: Could not find elilo.efi
=== Stack trace ===
Trace 0: /bin/rear:409 main
Trace 1: /usr/share/rear/lib/recover-workflow.sh:34 WORKFLOW_recover
Trace 2: /usr/share/rear/lib/framework-functions.sh:85 SourceStage
Trace 3: /usr/share/rear/lib/framework-functions.sh:45 Source
Trace 4: /usr/share/rear/finalize/Linux-i386/22_install_elilo.sh:31 source
Trace 5: /usr/share/rear/lib/_input-output-functions.sh:150 StopIfError
Message: Could not find elilo.efi
===================
2016-08-04 20:48:31 Running exit tasks.

@jsmeix
Copy link
Member

jsmeix commented Aug 9, 2016

@ltomasik
in finalize/GNU/Linux/15_migrate_lun_wwid.sh you use ">&8".
Using that file descriptor is deprecated,
see #887
I would like if you change that to something usual like
">/dev/null" or ">&2" to get stdout in the log as needed
cf. #885

I am not at all an expert in this area
but as far as I see your changes only add functionality
and do not change existing functionality
so that for me it looks safe to merge it.

Nevertheless I like @gdha to also have a look:

@gdha
could you have a look if it is o.k. when I merge it?

@ghost
Copy link
Author

ghost commented Aug 9, 2016

@jsmeix
I overlooked #887 and reused old code from "15_migrate_uuid_tags.sh". My bad. Sure I'll change it.

@gdha gdha merged commit 06a4a64 into rear:master Aug 10, 2016
@jsmeix jsmeix modified the milestones: Rear v1.19, Rear future Aug 10, 2016
@jsmeix
Copy link
Member

jsmeix commented Aug 10, 2016

@gdha
many thanks for having a look and merging it!

@ltomasik
many thanks for your contribution to Relax-and-Recover!

@schlomo
Copy link
Member

schlomo commented May 10, 2017

Just found this accidentially. Shouldn't the lun_wwid_mapping.conf file be in /etc/rear/mappings like the other mapping files?

@ghost
Copy link
Author

ghost commented May 12, 2017

Yes, I overlooked that we have separate directory for mapping files.

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

Successfully merging this pull request may close these issues.

None yet

3 participants