Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

mdadm.conf and mkconf inconsistencies

194 views
Skip to first unread message

Erik Bataller

unread,
Jun 14, 2007, 7:40:12 AM6/14/07
to
Good morning-

I'm having boot problems with my ubuntu box and I believe it is
because of both the "race" condition associated with booting an md
( ubuntu bug https://bugs.launchpad.net/ubuntu/+source/mdadm/+bug/
75681 ) and (perhaps or) that my mdadm.conf and mkconf are
inconsistent, i.e. different and mkconf reports two md0 partitions.

* It seems that every other time I boot my system won't boot and
a) takes a long time to boot

b) ends up at the initramfs prompt

When I built this system it ended up with an md0 and md1. However,
md1 wasn't mounting and had a partition, sda1, that I wanted as part
of the raid1 boot partition for md0. So, I did a stop and added it
to md0. It ended up as a spare and the other spare, sdd1 was no
longer appearing in my "mdadm --query --detail /dev/md0" output.

I couldn't figure out how to add both and make md0 a live partition
(which was "clean" and included sdb1 and sdc1) but decided I didn't
really care. So, I edited my mdadm.conf to match what appeared to be
running but I was still having boot errors, i.e. ending up in the
initramfs prompt.

After finding the the 75681 bug I reaalized that my mdadm.conf and
mkconf output were inconsistent (see below). I'd found martin's
email address and he generously provided some feedback but I've been
unable to really figure out what to do. Thus, I have two questions
I'm hoping folks on the list can help me resolve:

1) How do I resolve the inconsistencies between mdadm.conf and
mkconf output?

2) Can raid1 have 4 partitions, 3 active and 1 spare? If so, how do
I make the this so?

Any assistance would be greatly appreciated and mucho thanks to
martin for providing some feedback.

(I'm not subscribed to the debian-user mailing list, I'm just
emailing the list)

When I figure this out I'll add how to resolve the mdadm.conf and
mkconf inconsistencies to the README and provide the diff output to
martin for inclusion as he sees fit.

Erik

Here is my mdadm.conf and the mkconf output:

erik@buku:~$ more /etc/mdadm/mdadm.conf
# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#

# by default, scan all partitions (/proc/partitions) for MD
superblocks.
# alternatively, specify devices to scan, using wildcards if desired.
DEVICE partitions

# auto-create devices with Debian standard permissions
CREATE owner=root group=disk mode=0660 auto=yes

# automatically tag new arrays as belonging to the local system
HOMEHOST <system>

# instruct the monitoring daemon where to send mail alerts
MAILADDR root

# definitions of existing MD arrays
# ARRAY /dev/md1 level=raid1 num-devices=3 UUID=714fa97e:
13be99d9:e4ab4e80:b8e7654f
# ARRAY /dev/md0 level=raid1 num-devices=2 UUID=236bf50a:01e85e0e:
5a84cd4d:deb756b4
# spares=1
# ARRAY /dev/md2 level=raid5 num-devices=3 UUID=43d3abae:
6ba8e936:ac403c3c:3b3e6f8f
# spares=1
# ARRAY /dev/md3 level=raid5 num-devices=4
UUID=2ca75f12:e9b65309:46212cac:5e14c92e
ARRAY /dev/md0 level=raid1 num-devices=2 spares=2 UUID=236bf50a:
01e85e0e:5a84cd4d:deb756b4
ARRAY /dev/md2 level=raid5 num-devices=3 spares=1 UUID=43d3abae:
6ba8e936:ac403c3c:3b3e6f8f
ARRAY /dev/md3 level=raid5 num-devices=4
UUID=2ca75f12:e9b65309:46212cac:5e14c92e

mkconf output

erik@buku:~/mdadm$ sudo /usr/share/mdadm/mkconf
Password:
# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#

# by default, scan all partitions (/proc/partitions) for MD
superblocks.
# alternatively, specify devices to scan, using wildcards if desired.
DEVICE partitions

# auto-create devices with Debian standard permissions
CREATE owner=root group=disk mode=0660 auto=yes

# automatically tag new arrays as belonging to the local system
HOMEHOST <system>

# instruct the monitoring daemon where to send mail alerts
MAILADDR root

# definitions of existing MD arrays
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=236bf50a:01e85e0e:
33a70373:7f0eea01
spares=1
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=236bf50a:
01e85e0e:f658594e:b4167d96
spares=1
ARRAY /dev/md2 level=raid5 num-devices=3 UUID=43d3abae:
6ba8e936:ac403c3c:3b3e6f8f
spares=1
ARRAY /dev/md3 level=raid5 num-devices=4
UUID=2ca75f12:e9b65309:46212cac:5e14c92e


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

martin f krafft

unread,
Jun 15, 2007, 1:50:09 PM6/15/07
to
also sprach Erik Bataller <er...@uhg.com> [2007.06.14.1156 +0100]:

> I'm having boot problems with my ubuntu box and I believe it is
> because of both the "race" condition associated with booting an md
> ( ubuntu bug https://bugs.launchpad.net/ubuntu/+source/mdadm/+bug/
> 75681 ) and (perhaps or) that my mdadm.conf and mkconf are
> inconsistent, i.e. different and mkconf reports two md0 partitions.

Please go and read the FAQ and README.recipes:

http://svn.debian.org/wsvn/pkg-mdadm/mdadm/trunk/debian/README.recipes?op=file&rev=0&sc=0

the last item, #12, explains what you have to do with the array that
should be md1.

> * It seems that every other time I boot my system won't boot and
> a) takes a long time to boot
>
> b) ends up at the initramfs prompt

It cannot find the root filesystem.

> 1) How do I resolve the inconsistencies between mdadm.conf and
> mkconf output?

See above.

> 2) Can raid1 have 4 partitions, 3 active and 1 spare? If so, how do
> I make the this so?

This is a question that's answered directly in the manpage:

mdadm -Cl1 -n3 -x1 …

--
Please do not send copies of list mail to me; I read the list!

.''`. martin f. krafft <mad...@debian.org>
: :' : proud Debian developer, author, administrator, and user
`. `'` http://people.debian.org/~madduck - http://debiansystem.info
`- Debian - when you have better things to do than fixing systems

in the beginning was the word,
and the word was content-type: text/plain

signature.asc
0 new messages