Bug 185674 - /etc/mdadm.conf doesn't match /proc/mdstat
/etc/mdadm.conf doesn't match /proc/mdstat
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: anaconda (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Joel Andres Granados
Milan Zázrivec
Depends On:
  Show dependency treegraph
Reported: 2006-03-16 15:11 EST by Sean Dilda
Modified: 2014-01-21 17:53 EST (History)
1 user (show)

See Also:
Fixed In Version: RHBA-2008-0653
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-07-24 15:05:29 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2008:0653 normal SHIPPED_LIVE anaconda bug fix and enhancement update 2008-07-23 11:01:42 EDT

  None (edit)
Description Sean Dilda 2006-03-16 15:11:48 EST
On a RHEL4u2 box installed via kickstart (with all disk configs done in
kickstart) the /etc/mdadm.conf file doesn't match the arrays listed in /proc/mdstat.

As an example, here is the partition info from /root/anaconda-ks.cfg:
#clearpart --all
#part raid.100000 --size=2000 --ondisk=sda --asprimary
#part raid.100001 --size=2000 --ondisk=sdb --asprimary
#part raid.100003 --size=1000 --ondisk=sdb
#part raid.100002 --size=1000 --ondisk=sda
#part raid.100005 --size=100 --grow --ondisk=sdb
#part raid.100004 --size=100 --grow --ondisk=sda
#raid pv.100006 --fstype "physical volume (LVM)" --level=RAID1 raid.100004
#raid swap --fstype swap --level=RAID1 raid.100002 raid.100003
#raid /boot --fstype ext3 --level=RAID1 raid.100000 raid.100001
#volgroup VolGroup00 --pesize=32768 pv.100006
#logvol / --fstype ext3 --name=rootvol00 --vgname=VolGroup00 --size=31680


[root@webhost-01 ~]# cat /proc/mdstat
Personalities : [raid1]
md3 : active raid1 sdb1[1] sda1[0]
      2048192 blocks [2/2] [UU]

md1 : active raid1 sdb2[1] sda2[0]
      1020032 blocks [2/2] [UU]

md2 : active raid1 sdb3[1] sda3[0]
      32491392 blocks [2/2] [UU]

unused devices: <none>
[root@webhost-01 ~]# cat /etc/mdadm.conf

# mdadm.conf written out by anaconda
DEVICE partitions
ARRAY /dev/md0 super-minor=0
ARRAY /dev/md3 super-minor=3
ARRAY /dev/md1 super-minor=1

You can see that /proc/mdstat lists md1, md2, and md3.  Whereas mdadm.conf lists
md0, md1, and md3.

In checking various machines with RHEL4 installed, I see this problem on most of
Comment 1 Jeremy Katz 2006-03-21 11:21:28 EST
Can you provide the partitioning snippet of the actual ks.cfg being used instead
of just the anaconda-ks.cfg (which doesn't end up being identical)
Comment 2 Seth Vidal 2006-03-21 11:24:44 EST
clearpart --all
part raid.21 --size=2000 --ondisk=sda --asprimary
part raid.22 --size=2000 --ondisk=sdb --asprimary
part raid.30 --size=100 --grow --ondisk=sdf
part raid.29 --size=100 --grow --ondisk=sde
part raid.28 --size=100 --grow --ondisk=sdd
part raid.27 --size=100 --grow --ondisk=sdc
part raid.24 --size=100 --grow --ondisk=sdb
part raid.23 --size=100 --grow --ondisk=sda
raid /boot --fstype ext3 --level=RAID1 raid.21 raid.22
raid pv.26 --fstype "physical volume (LVM)" --level=RAID1 raid.23 raid.24
raid pv.31 --fstype "physical volume (LVM)" --level=RAID5 raid.27 raid.28
raid.29 raid.30
volgroup VolGroup00 --pesize=32768 pv.26
volgroup VolGroup01 --pesize=32768 pv.31
logvol swap --fstype swap --name=swap00 --vgname=VolGroup00 --size=2048
logvol / --fstype ext3 --name=root00 --vgname=VolGroup00 --size=30624
logvol /srv --fstype ext3 --name=srv00 --vgname=VolGroup01 --size=209952

Comment 3 Jeremy Katz 2006-03-21 11:56:16 EST
Hrmm, the code to write out mdadm.conf is actually reading the minor info from
the superblock, so I'm not sure how they could disagree :-/
Comment 4 Seth Vidal 2006-03-21 13:08:55 EST
this only happens when we reinstall the box multiple times.

could it be that mdadm is preserving the superblock/old info from the partitions
and assembling them that way?
Comment 6 Red Hat Bugzilla 2007-06-11 23:06:52 EDT
requested by Jams Antill
Comment 9 Joel Andres Granados 2008-03-12 11:31:24 EDT
Backported a change I did for rhel5.  Didn't test.  Should be available in
anaconda and after.
Comment 11 Milan Zázrivec 2008-05-16 07:00:54 EDT
Verified in anaconda- / RHEL4-U7-re20080514.0
Comment 13 errata-xmlrpc 2008-07-24 15:05:29 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.