Bug 729479

Summary: The fedora LiveCD changes / updates already defined mdraid devices minor number to some other number.
Product: [Fedora] Fedora Reporter: Adam Hough <adam.hough>
Component: mdadmAssignee: Jes Sorensen <Jes.Sorensen>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: adam.hough, adam.stokes, agk, bcl, bruno, dhuff, dledford, dracut-maint, harald, Jasper.Hartline, Jes.Sorensen, jonathan, katzj
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-18 13:36:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Adam Hough 2011-08-09 20:47:59 UTC
Description of problem:

When using a fedora LiveCD to rescue another redhat/fedora/centos installation that uses mdraid devices, the livecd will update the Preferred Minor number on the md device.  

How reproducible:
If you have a machine with an older mdraid setup then boot with the LiveCD it will updated the preferred minor every single time.

Steps to Reproduce:
1. Have machine with older mdraid devices.
2. Boot LiveCD
  
Actual results:
1. Have machine with older mdraid devices.
2. Boot LiveCD
3. Fix initial problem
4. Reboot and find that system kernel panics on boot because preferred minor has changed on /boot device and or /.
5: Boot back into LiveCD
6: Update all md devices with correct preferred minor
   Mount the systems root device and copy the system mdadm.conf to /etc/
   "mdadm --stop /dev/mdYYY"
   "mdadm --assemble --update super-minor /dev/mdX"
7: Reboot

Expected results:
1. Have machine with older mdraid devices.
2. Boot LiveCD
3. Fix initial problem
4. Reboot works because md devices have the original preferred minor.


Additional info:

I believe that for some reason the LiveCD when assembling raid devices does a --update super-minor when it assemble the md raid devices.

Comment 1 Fedora End Of Life 2012-08-07 17:14:00 UTC
This message is a notice that Fedora 15 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 15. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this
occurring, but we forgot to do that. A thousand apologies.)

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

Bug Reporter: Thank you for reporting this issue and we are sorry that
we were unable to fix it before Fedora 15 reached 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 to click on
"Clone This Bug" (top right of this page) and open it against that
version of Fedora.

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.

The process we are following is described here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 2 Adam Hough 2012-08-08 14:59:28 UTC
This has not been fixed and causes many problems when using a LiveCD image to rescue any Linux (Redhat, Centos, Fedora, Ubuntu or Debian) setup that had mdraid devices.  This also affect RHEL6 based LiveCDs as well.  If you boot a system with a Fedora or RHEL6 liveCD the super-minor for the raid device gets updated to 126(+).

After booting a node with one of these livecds, You have to reset the super-minor back to the original number so that they boot properly again after the rescue.

- Adam

Comment 3 Fedora End Of Life 2013-04-03 19:33:03 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

Comment 4 Brian Lane 2013-05-28 15:39:32 UTC
Does this happen if you just boot the livecd and don't try to change anything? eg. boot livecd. see desktop. shutdown. try to boot system.

livecd-tools doesn't do anything specific with raid assembly, so this is likely to be dracut or mdadm.

Comment 5 Jes Sorensen 2013-05-30 09:33:00 UTC
If you want anyone to be able to debug this, you will need to provide details
on the RAID array in question, ie.

mdadm --detail /dev/md<X>
/etc/mdadm.conf
/etc/fstab

kernel mount options

Thanks,
Jes

Comment 6 Doug Ledford 2013-05-30 14:06:56 UTC
This is an anaconda issue (and a known one).  It can't be fixed in the already released CDs as they are spun and won't be respun.  If it still exists, it should be fixed.

Jes, I'm gonna leave you to deal with the anaconda team on this one, but the basic issue is this (or at least it was, I'd be surprised if it still exists, but if it does, it definitely needs fixed):

When anaconda was updated to deal with version 1.x superblocks they never really got rid of their reliance on the md device number as the primary identifier.  So instead of creating arrays as /dev/md/<name> and ignoring the number, they created arrays using a sole number in the name portion of the homehost:name field in order to force mdadm to issue a specific md device number to a specific md device.  This emulated the old version 0.90 superblock create method.  The problem I saw then was related to udev device initialization.  Specifically, if udev did not find your md raid devices in the same order that they were numbered in, then anaconda would reorder your device numbers.  The poster here seems to be indicating that they are doing that on 0.90 superblocks (which does surprise me somewhat, but I didn't test version 0.90 superblocks so I can't say it wouldn't do so).  In my case, I saw the same behavior (and reported it) when dealing with multiple version 1.x raid arrays that were created using names and not numbers.  So, for instance, I would create 8 raid1 arrays, each named something (like /dev/md/rhel5 and /dev/md/rhel6, each intended for a different install).  Then I would run anaconda to do an install on one of these pre-existing arrays and anaconda would show me /dev/md0 through /dev/md8.  And the number of each array would correspond to what order udev found the devices and started the array in, not the order of the partitions on the disks or anything else.  As a result, you had no idea which array was which.  And if you actually did the install, then when it came time for anaconda to write out to the disks, it would in fact create an mdadm.conf file that forced all the arrays to use the new names (an ARRAY entry in mdadm.conf overrides the superminor number in the superblock or the name field in later superblocks).  I can't say that it updated the superblock, my memory isn't that clear on the issue.

So, to replicate this issue, just create a bunch of raid1 arrays on a couple drives, make some of them have version 0.90 superblocks where the superminor indicates the device number to be used and start counting at, say, /dev/md10 on those, and create a few with version 1.x superblocks that use names and shouldn't use numbers at all, then boot up a current f19 install media in rescue mode and see if the devices still get renumbered.  And if so, see if the install media renumbers then simply by rewriting the mdadm.conf file with new ARRAY entries or if it also updates the superminor and name fields in the superblocks.  I would expect older Fedora releases to have this problem, but would be a bit surprised if f19 still had the problem as it seems the f19 anaconda code updated the md raid code quite a bit and it might even understand named md raid arrays now.

Comment 7 Fedora End Of Life 2015-01-09 21:52:00 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 8 Fedora End Of Life 2015-02-18 13:36:39 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.