Bug 185674 - /etc/mdadm.conf doesn't match /proc/mdstat
Summary: /etc/mdadm.conf doesn't match /proc/mdstat
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: anaconda
Version: 4.0
Hardware: All
OS: Linux
Target Milestone: ---
: ---
Assignee: Joel Andres Granados
QA Contact: Milan Zázrivec
Depends On:
TreeView+ depends on / blocked
Reported: 2006-03-16 20:11 UTC by Sean Dilda
Modified: 2014-01-21 22:53 UTC (History)
1 user (show)

Clone Of:
Last Closed: 2008-07-24 19:05:29 UTC

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 15:01:42 UTC

Description Sean Dilda 2006-03-16 20:11:48 UTC
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 16:21:28 UTC
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 16:24:44 UTC
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 16:56:16 UTC
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 18:08:55 UTC
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-12 03:06:52 UTC
requested by Jams Antill

Comment 9 Joel Andres Granados 2008-03-12 15:31:24 UTC
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 11:00:54 UTC
Verified in anaconda- / RHEL4-U7-re20080514.0

Comment 13 errata-xmlrpc 2008-07-24 19:05:29 UTC
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.