md mirror disappears after reboot

Bug #538526 reported by Tom Pringle on 2010-03-13
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mdadm (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: mdadm

I created 2 partitions

sudo mdadm --create /dev/md0 --level=mirror --raid-devices=2 /dev/sdb1 /dev/sdc1

I then test IO to the mirror by copying > 1 TB of data and verify integrity of the copied data.

after a reboot, the mirror is not active

Here's a thread which also complains about the same problem.

tomp@finch:~$ cat /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/md0 level=raid1 num-devices=2 UUID=c6ce429d:95182772:a49a517a:e5533ac5

# This file was auto-generated on Sat, 13 Mar 2010 09:01:30 -0500
# by mkconf $Id$

Tom Pringle (thomas-b-pringle) wrote :

here's the thread I refer to above
http://ubuntuforums.org/showthread.php?t=1207071
following the advice on that thread seems to work.

#cd /etc/mdadm
#mdadm --examine --scan --config=mdadm.conf >> mdadm.conf

Tom Pringle (thomas-b-pringle) wrote :

sorry for multiple posts but the browser seems to submit when I hit tab?

to continue,here's a copy of the conf file after running the command above: (note that the duplicate ARRAY line seems to be required)

tomp@finch:~$ cat /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/md0 level=raid1 num-devices=2 UUID=c6ce429d:95182772:a49a517a:e5533ac5

# This file was auto-generated on Sat, 13 Mar 2010 09:01:30 -0500
# by mkconf $Id$
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=c6ce429d:95182772:a49a517a:e5533ac5

ceg (ceg) wrote :

From what you wrote the first ARRAY line should not be there. (You did not create it after creating the array.)

So I suspect maybe you called "dpkg-reconfigure mdadm" or
"/usr/share/mdadm/mkconf force-generate /etc/mdadm/mdadm.conf" and recreated your mdadm.conf already before you appended the line with the command you stated and rebooting.

So what you were seeing was also this:
Bug #136252 [->UUIDudev] mdadm.conf w/o ARRAY lines but udev/mdadm not assembling arrays. (boot fails)

Tom Pringle (thomas-b-pringle) wrote :

Yes I found that removing the extra ARRAY line fixed the problem.

I still have a problem mount MD arrays from fstab during boot. I have to execute "sudo mount -a" after boot to access MD arrays. Could potential hack around this in my .bashrc but I'd like to move my home directory onto an MD mirror.

ceg (ceg) wrote :

Hi, thanks for responding.

It's a duplicate if it works with one correct ARRAY line, but does not work without any ARRAY line.

Bug #136252 [->UUIDudev] mdadm.conf w/o ARRAY lines but udev/mdadm not assembling arrays. (boot fails)
(i.e. it should work without ARRAY definitions in a hot-pluggable system, but does not)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers