Linux RAID subsystem development
 help / color / mirror / Atom feed
* mdadm array not found on reboot
@ 2007-05-07 16:45 Jeffrey B. Layton
  2007-05-07 16:58 ` Justin Piszcz
  0 siblings, 1 reply; 7+ messages in thread
From: Jeffrey B. Layton @ 2007-05-07 16:45 UTC (permalink / raw)
  To: linux-raid

Hello,

I apologize if this is a FAQ question or a typical newbie question,
but by google efforts have yielded anything yet.

I built a RAID-1 using mdadm (Centos 4.2 with 2.6.16.19 kernel
and mdadm 1.6.0-2). It's just two SATA drives that I created using:

mdadm --create --verbose /dev/md1 --level=raid1 --raid-devices=2 
/dev/sda1 /dev/sdb1

The md built correctly and I built an ext3 on it. I created /etc/mdadm.conf
and modified /etc/fstab to mount the device. But when I reboot, the kernel
drops into RAID repair mode because it can't seem to find /dev/md1 and
yells about not finding any valid superblock (I can get the exact message
if needed). However I can mount /dev/sda1 with no problems.

The only way I can get md1 back is to issue the command:

mdadm -A /dev/md1 /dev/sda1 /dev/sdb1

and everything works. I want to have /dev/md1 mounted automatically
on boot. I'm missing something simple here - how do I do this?

TIA!

Jeff


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: mdadm array not found on reboot
  2007-05-07 16:45 mdadm array not found on reboot Jeffrey B. Layton
@ 2007-05-07 16:58 ` Justin Piszcz
  2007-05-07 17:06   ` Jeffrey B. Layton
  0 siblings, 1 reply; 7+ messages in thread
From: Justin Piszcz @ 2007-05-07 16:58 UTC (permalink / raw)
  To: Jeffrey B. Layton; +Cc: linux-raid



On Mon, 7 May 2007, Jeffrey B. Layton wrote:

> Hello,
>
> I apologize if this is a FAQ question or a typical newbie question,
> but by google efforts have yielded anything yet.
>
> I built a RAID-1 using mdadm (Centos 4.2 with 2.6.16.19 kernel
> and mdadm 1.6.0-2). It's just two SATA drives that I created using:
>
> mdadm --create --verbose /dev/md1 --level=raid1 --raid-devices=2 /dev/sda1 
> /dev/sdb1
>
> The md built correctly and I built an ext3 on it. I created /etc/mdadm.conf
> and modified /etc/fstab to mount the device. But when I reboot, the kernel
> drops into RAID repair mode because it can't seem to find /dev/md1 and
> yells about not finding any valid superblock (I can get the exact message
> if needed). However I can mount /dev/sda1 with no problems.
>
> The only way I can get md1 back is to issue the command:
>
> mdadm -A /dev/md1 /dev/sda1 /dev/sdb1
>
> and everything works. I want to have /dev/md1 mounted automatically
> on boot. I'm missing something simple here - how do I do this?
>
> TIA!
>
> Jeff
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

Sounds like a udev issue and/or you did not create the mdadm.conf 
properly.  Show us your mdadm.conf.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: mdadm array not found on reboot
  2007-05-07 17:06   ` Jeffrey B. Layton
@ 2007-05-07 17:02     ` Justin Piszcz
  2007-05-07 17:15       ` Jeffrey B. Layton
  0 siblings, 1 reply; 7+ messages in thread
From: Justin Piszcz @ 2007-05-07 17:02 UTC (permalink / raw)
  To: Jeffrey B. Layton; +Cc: linux-raid



On Mon, 7 May 2007, Jeffrey B. Layton wrote:

> Justin Piszcz wrote:
>> 
>> 
>> On Mon, 7 May 2007, Jeffrey B. Layton wrote:
>> 
>>> Hello,
>>> 
>>> I apologize if this is a FAQ question or a typical newbie question,
>>> but by google efforts have yielded anything yet.
>>> 
>>> I built a RAID-1 using mdadm (Centos 4.2 with 2.6.16.19 kernel
>>> and mdadm 1.6.0-2). It's just two SATA drives that I created using:
>>> 
>>> mdadm --create --verbose /dev/md1 --level=raid1 --raid-devices=2 /dev/sda1 
>>> /dev/sdb1
>>> 
>>> The md built correctly and I built an ext3 on it. I created 
>>> /etc/mdadm.conf
>>> and modified /etc/fstab to mount the device. But when I reboot, the kernel
>>> drops into RAID repair mode because it can't seem to find /dev/md1 and
>>> yells about not finding any valid superblock (I can get the exact message
>>> if needed). However I can mount /dev/sda1 with no problems.
>>> 
>>> The only way I can get md1 back is to issue the command:
>>> 
>>> mdadm -A /dev/md1 /dev/sda1 /dev/sdb1
>>> 
>>> and everything works. I want to have /dev/md1 mounted automatically
>>> on boot. I'm missing something simple here - how do I do this?
>>> 
>>> TIA!
>>> 
>>> Jeff
>>> 
>>> -
>>> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>> 
>> 
>> Sounds like a udev issue and/or you did not create the mdadm.conf properly. 
>> Show us your mdadm.conf.
>> 
> ARRAY /dev/md1 level=raid1 num-devices=2 
> UUID=e235ee6c:415f1494:23c28b59:afd20140
>  devices=/dev/sda1,/dev/sdb1
> ARRAY /dev/md0 level=raid1 num-devices=2 
> UUID=7121b438:7d36f9f6:8aa9c8b3:b5b0d211
>  devices=/dev/hdc1,/dev/hdd1
>
> Thanks!
>
> Jeff
>

What distro?

Checkout my mdadm.conf and look att he auto-create devices option.

# 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=82009f4a:35cca4ed:b9b6bb73:9360360
7
ARRAY /dev/md1 level=raid1 num-devices=2 
UUID=bb7106b3:1645d1e5:201cd0a5:395e2d2
a
ARRAY /dev/md2 level=raid1 num-devices=2 
UUID=12473837:fbc2b583:a5c8a649:8695efb
a
ARRAY /dev/md3 level=raid5 num-devices=10 
UUID=957d8b7d:c80043bc:083fb634:68e9eb
49

# This file was auto-generated on Sat, 28 Apr 2007 18:59:02 -0400
# by mkconf $Id: mkconf 261 2006-11-09 13:32:35Z madduck $


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: mdadm array not found on reboot
  2007-05-07 16:58 ` Justin Piszcz
@ 2007-05-07 17:06   ` Jeffrey B. Layton
  2007-05-07 17:02     ` Justin Piszcz
  0 siblings, 1 reply; 7+ messages in thread
From: Jeffrey B. Layton @ 2007-05-07 17:06 UTC (permalink / raw)
  To: Justin Piszcz; +Cc: linux-raid

Justin Piszcz wrote:
>
>
> On Mon, 7 May 2007, Jeffrey B. Layton wrote:
>
>> Hello,
>>
>> I apologize if this is a FAQ question or a typical newbie question,
>> but by google efforts have yielded anything yet.
>>
>> I built a RAID-1 using mdadm (Centos 4.2 with 2.6.16.19 kernel
>> and mdadm 1.6.0-2). It's just two SATA drives that I created using:
>>
>> mdadm --create --verbose /dev/md1 --level=raid1 --raid-devices=2 
>> /dev/sda1 /dev/sdb1
>>
>> The md built correctly and I built an ext3 on it. I created 
>> /etc/mdadm.conf
>> and modified /etc/fstab to mount the device. But when I reboot, the 
>> kernel
>> drops into RAID repair mode because it can't seem to find /dev/md1 and
>> yells about not finding any valid superblock (I can get the exact 
>> message
>> if needed). However I can mount /dev/sda1 with no problems.
>>
>> The only way I can get md1 back is to issue the command:
>>
>> mdadm -A /dev/md1 /dev/sda1 /dev/sdb1
>>
>> and everything works. I want to have /dev/md1 mounted automatically
>> on boot. I'm missing something simple here - how do I do this?
>>
>> TIA!
>>
>> Jeff
>>
>> -
>> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>
> Sounds like a udev issue and/or you did not create the mdadm.conf 
> properly.  Show us your mdadm.conf.
>
ARRAY /dev/md1 level=raid1 num-devices=2 
UUID=e235ee6c:415f1494:23c28b59:afd20140
   devices=/dev/sda1,/dev/sdb1
ARRAY /dev/md0 level=raid1 num-devices=2 
UUID=7121b438:7d36f9f6:8aa9c8b3:b5b0d211
   devices=/dev/hdc1,/dev/hdd1

Thanks!

Jeff


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: mdadm array not found on reboot
  2007-05-07 17:15       ` Jeffrey B. Layton
@ 2007-05-07 17:11         ` Justin Piszcz
  2007-05-07 19:53         ` Richard Scobie
  1 sibling, 0 replies; 7+ messages in thread
From: Justin Piszcz @ 2007-05-07 17:11 UTC (permalink / raw)
  To: Jeffrey B. Layton; +Cc: linux-raid



On Mon, 7 May 2007, Jeffrey B. Layton wrote:

> Justin Piszcz wrote:
>> 
>> 
>> On Mon, 7 May 2007, Jeffrey B. Layton wrote:
>> 
>>> Justin Piszcz wrote:
>>>> 
>>>> 
>>>> On Mon, 7 May 2007, Jeffrey B. Layton wrote:
>>>> 
>>>>> Hello,
>>>>> 
>>>>> I apologize if this is a FAQ question or a typical newbie question,
>>>>> but by google efforts have yielded anything yet.
>>>>> 
>>>>> I built a RAID-1 using mdadm (Centos 4.2 with 2.6.16.19 kernel
>>>>> and mdadm 1.6.0-2). It's just two SATA drives that I created using:
>>>>> 
>>>>> mdadm --create --verbose /dev/md1 --level=raid1 --raid-devices=2 
>>>>> /dev/sda1 /dev/sdb1
>>>>> 
>>>>> The md built correctly and I built an ext3 on it. I created 
>>>>> /etc/mdadm.conf
>>>>> and modified /etc/fstab to mount the device. But when I reboot, the 
>>>>> kernel
>>>>> drops into RAID repair mode because it can't seem to find /dev/md1 and
>>>>> yells about not finding any valid superblock (I can get the exact 
>>>>> message
>>>>> if needed). However I can mount /dev/sda1 with no problems.
>>>>> 
>>>>> The only way I can get md1 back is to issue the command:
>>>>> 
>>>>> mdadm -A /dev/md1 /dev/sda1 /dev/sdb1
>>>>> 
>>>>> and everything works. I want to have /dev/md1 mounted automatically
>>>>> on boot. I'm missing something simple here - how do I do this?
>>>> 
>>>> Sounds like a udev issue and/or you did not create the mdadm.conf 
>>>> properly. Show us your mdadm.conf.
>>> ARRAY /dev/md1 level=raid1 num-devices=2 
>>> UUID=e235ee6c:415f1494:23c28b59:afd20140
>>>  devices=/dev/sda1,/dev/sdb1
>>> ARRAY /dev/md0 level=raid1 num-devices=2 
>>> UUID=7121b438:7d36f9f6:8aa9c8b3:b5b0d211
>>>  devices=/dev/hdc1,/dev/hdd1
>> 
>> What distro?
> CentOS 4.2. I've been reading something about raidautorun. Would help in this 
> case?
>
> Thanks!
>
> Jeff
>
>

That is probably what you want-- also technically you don't 'need' to have 
the partitions set to 0xfd [Linux Raid Auto Detect], but that may help as 
well.

  fdisk -l /dev/sda

Disk /dev/sda: 74.3 GB, 74355769344 bytes
255 heads, 63 sectors/track, 9039 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        2090    16787893+  fd  Linux raid autodetect
/dev/sda2   *        2091        2107      136552+  fd  Linux raid autodetect
/dev/sda3            2108        9039    55681290   fd  Linux raid autodetect


Justin.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: mdadm array not found on reboot
  2007-05-07 17:02     ` Justin Piszcz
@ 2007-05-07 17:15       ` Jeffrey B. Layton
  2007-05-07 17:11         ` Justin Piszcz
  2007-05-07 19:53         ` Richard Scobie
  0 siblings, 2 replies; 7+ messages in thread
From: Jeffrey B. Layton @ 2007-05-07 17:15 UTC (permalink / raw)
  To: Justin Piszcz; +Cc: linux-raid

Justin Piszcz wrote:
>
>
> On Mon, 7 May 2007, Jeffrey B. Layton wrote:
>
>> Justin Piszcz wrote:
>>>
>>>
>>> On Mon, 7 May 2007, Jeffrey B. Layton wrote:
>>>
>>>> Hello,
>>>>
>>>> I apologize if this is a FAQ question or a typical newbie question,
>>>> but by google efforts have yielded anything yet.
>>>>
>>>> I built a RAID-1 using mdadm (Centos 4.2 with 2.6.16.19 kernel
>>>> and mdadm 1.6.0-2). It's just two SATA drives that I created using:
>>>>
>>>> mdadm --create --verbose /dev/md1 --level=raid1 --raid-devices=2 
>>>> /dev/sda1 /dev/sdb1
>>>>
>>>> The md built correctly and I built an ext3 on it. I created 
>>>> /etc/mdadm.conf
>>>> and modified /etc/fstab to mount the device. But when I reboot, the 
>>>> kernel
>>>> drops into RAID repair mode because it can't seem to find /dev/md1 and
>>>> yells about not finding any valid superblock (I can get the exact 
>>>> message
>>>> if needed). However I can mount /dev/sda1 with no problems.
>>>>
>>>> The only way I can get md1 back is to issue the command:
>>>>
>>>> mdadm -A /dev/md1 /dev/sda1 /dev/sdb1
>>>>
>>>> and everything works. I want to have /dev/md1 mounted automatically
>>>> on boot. I'm missing something simple here - how do I do this?
>>>
>>> Sounds like a udev issue and/or you did not create the mdadm.conf 
>>> properly. Show us your mdadm.conf.
>> ARRAY /dev/md1 level=raid1 num-devices=2 
>> UUID=e235ee6c:415f1494:23c28b59:afd20140
>>  devices=/dev/sda1,/dev/sdb1
>> ARRAY /dev/md0 level=raid1 num-devices=2 
>> UUID=7121b438:7d36f9f6:8aa9c8b3:b5b0d211
>>  devices=/dev/hdc1,/dev/hdd1
>
> What distro?
CentOS 4.2. I've been reading something about raidautorun. Would help in 
this case?

Thanks!

Jeff



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: mdadm array not found on reboot
  2007-05-07 17:15       ` Jeffrey B. Layton
  2007-05-07 17:11         ` Justin Piszcz
@ 2007-05-07 19:53         ` Richard Scobie
  1 sibling, 0 replies; 7+ messages in thread
From: Richard Scobie @ 2007-05-07 19:53 UTC (permalink / raw)
  To: Linux RAID Mailing List

Jeffrey B. Layton wrote:

> 
> CentOS 4.2. I've been reading something about raidautorun. Would help in 
> this case?

Try adding:

DEVICE partitions

to the top of your mdadm.conf and:

auto=part

to the end of your /dev/md1 definition.

eg. ARRAY /dev/md1 level=raid1 num-devices=2 
UUID=e235ee6c:415f1494:23c28b59:afd20140 devices=/dev/sda1,/dev/sdb1 
auto=part

Regards,

Richard

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-05-07 19:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-07 16:45 mdadm array not found on reboot Jeffrey B. Layton
2007-05-07 16:58 ` Justin Piszcz
2007-05-07 17:06   ` Jeffrey B. Layton
2007-05-07 17:02     ` Justin Piszcz
2007-05-07 17:15       ` Jeffrey B. Layton
2007-05-07 17:11         ` Justin Piszcz
2007-05-07 19:53         ` Richard Scobie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox