Bug 954041

Summary: Unable to switch back from multipathed boot
Product: [Fedora] Fedora Reporter: Ben Marzinski <bmarzins>
Component: dracutAssignee: dracut-maint
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: dracut-maint, harald, jonathan
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-18 13:52:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ben Marzinski 2013-04-20 04:29:47 UTC
Description of problem:
Switching from non-multipathed /boot to multipathed boot is simple,  You simply need to enable multipathing on the /boot device, and rerun dracut, adding the multipath module.

However, if you remake the initramfs while you have multipathed /boot, switching back fails in the initramfs.

This is because when dracut makes an initramfs with non-multipathed boot it has the following scripts:

# cat usr/lib/dracut/hooks/emergency/80-\\x2fdev\\x2fdisk\\x2fby-uuid\\x2f5c9be980-d811-41e2-aac5-c4a5cbd8ff09.sh 
[ -e "/dev/disk/by-uuid/5c9be980-d811-41e2-aac5-c4a5cbd8ff09" ] || warn ""/dev/disk/by-uuid/5c9be980-d811-41e2-aac5-c4a5cbd8ff09" does not exist"

# cat usr/lib/dracut/hooks/initqueue/finished/devexists-\\x2fdev\\x2fdisk\\x2fby-uuid\\x2f5c9be980-d811-41e2-aac5-c4a5cbd8ff09.sh 
[ -e "/dev/disk/by-uuid/5c9be980-d811-41e2-aac5-c4a5cbd8ff09" ]

which checks for the /boot device by uuid, and works with either multipath or non-multipathed devices.

When dracut makes an initramfs with multipathed /boot it has the following scripts:

# cat usr/lib/dracut/hooks/emergency/80-\\x2fdev\\x2fmapper\\x2fmpathgp1.sh 
[ -e "/dev/mapper/mpathgp1" ] || warn ""/dev/mapper/mpathgp1" does not exist"

# cat usr/lib/dracut/hooks/initqueue/finished/devexists-\\x2fdev\\x2fmapper\\x2fmpathgp1.sh 
[ -e "/dev/mapper/mpathgp1" ]

which explicitly checks for a multipath device.

Version-Release number of selected component (if applicable):

dracut-027-36.git20130418.fc20.x86_64

How reproducible:
Always

Steps to Reproduce:
These steps will reproduce the problem without actually needing multiple paths to your /boot device

1. install multipath

# yum install device-mapper-multipath

2. setup multipath with a default config

# mpathconf --enable

3. Get the UID for the device with your boot partition

# udevadm info --export-db | less

you want ID_SERIAL from the scsi device that includes your boot partition
(so /dev/sda if your boot partition is on /dev/sda1)

4. Force multipath to set up a multipath device on your boot device, even
though it only has a single device.

# echo /<ID_SERIAL>/ >> /etc/multipath/wwids

for example

# echo /WDC_WD800JD-75MSA3_WD-WMAM9FU71040/ >> /etc/multipath/wwids

5. backup a copy of your current initramfs, so you can boot into it later

6. Remake you initramfs with multipathing

# dracut -H --add "multipath" -f <initramfs> <version>

7. Reboot

Your machine should come up with multipathed /boot (and root if they are on the
same device)

8. (optional, remake the intramfs again, reboot, and verify that you can boot
just fine with this initramfs.  It will now be specifically looking for
your multipath device)

9. Disable multipathing on /boot

delete the

/<ID_SERIAL>/

line for your boot device from /etc/multipath/wwids

10. remake you initramfs again

This initramfs will not start up multipath on your /boot device.  However it will explicitly look for that multipath device on bootup

11. reboot

Actual results:
Boot fails in the initramfs

dracut-initqueue[182]: Warning: Could not boot.
dracut-initqueue[182]: Warning: /dev/mapper/mpathgp1 does not exist
         Starting Dracut Emergency Shell...
Warning: /dev/mapper/mpathgp1 does not exist


Expected results:
Your machine boots up without multipathed /boot

Additional info:
If I manually unpack the broken initramfs, replace the multipath specific files with the /dev/disk/by-uuid versions of the files in usr/lib/dracut/hooks/emergency and usr/lib/dracut/hooks/initqueue/finished, and then reassemble the initramfs and reboot, everything works fine.

Comment 1 Harald Hoyer 2013-04-22 06:22:52 UTC
(In reply to comment #0)
> Description of problem:
> Switching from non-multipathed /boot to multipathed boot is simple,  You
> simply need to enable multipathing on the /boot device, and rerun dracut,
> adding the multipath module.
> 
> However, if you remake the initramfs while you have multipathed /boot,
> switching back fails in the initramfs.

Strategy here is to boot with the newly introduced "rescue" entry and then make the changes.

But you are right, we probably should also take /etc/multipath/wwids into account and filter accordingly.

Comment 2 Fedora End Of Life 2015-01-09 22:06:01 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 3 Fedora End Of Life 2015-02-18 13:52:16 UTC
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.