* Can't figure out how to use mdadm in initrd
@ 2002-06-28 14:45 Ken Causey
2002-06-28 14:58 ` Neil Brown
0 siblings, 1 reply; 4+ messages in thread
From: Ken Causey @ 2002-06-28 14:45 UTC (permalink / raw)
To: linux-raid; +Cc: Neil Brown
I don't get it. I cannot seem to get mdadm to handle a degraded array
no matter what I do. I'm setting up a system with all filesystems
including boot and root on software RAID. I initially tried to use
raidstart in my initrd but ran into a bug that prevents reinstating
missing array members in some circumstances, so I was directed to use
mdadm instead. Here's my current setup:
root is on /dev/md2 (RAID5)
The /etc/mdadm/mdadm.conf file in the initrd contains:
DEVICE /dev/sd*
ARRAY /dev/md2 devices="/dev/sda3,/dev/sdb3,/dev/sdc3"
The modules loaded are
modprobe -k aic7xxx
modprobe -k raid1
modprobe -k raid5
modprobe -k ext3
modprobe -k ext2
mdadm is run as
set "/dev/md2"
[ -b "$1" ] || set "/dev/md/2"
mdadm --assemble --run --scan "$1"
I've tried every combination I can think of and if there is any member
missing (say sdc3) then it complains that that member has a bad
superblock. Please tell me what I'm doing wrong here. If you need more
information, let me know.
Ken Causey
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Can't figure out how to use mdadm in initrd
2002-06-28 14:45 Can't figure out how to use mdadm in initrd Ken Causey
@ 2002-06-28 14:58 ` Neil Brown
2002-06-28 16:36 ` Ken Causey
0 siblings, 1 reply; 4+ messages in thread
From: Neil Brown @ 2002-06-28 14:58 UTC (permalink / raw)
To: Ken Causey; +Cc: linux-raid
On June 28, ken@ineffable.com wrote:
> I don't get it. I cannot seem to get mdadm to handle a degraded array
> no matter what I do. I'm setting up a system with all filesystems
> including boot and root on software RAID. I initially tried to use
> raidstart in my initrd but ran into a bug that prevents reinstating
> missing array members in some circumstances, so I was directed to use
> mdadm instead. Here's my current setup:
>
> root is on /dev/md2 (RAID5)
>
> The /etc/mdadm/mdadm.conf file in the initrd contains:
>
> DEVICE /dev/sd*
> ARRAY /dev/md2 devices="/dev/sda3,/dev/sdb3,/dev/sdc3"
the "devices=" is not the best way to say what devices to use.
It works OK for IDE which has stable names but not so good for
SCSI which doesn't.
What you are saying is "Please assemble an array from precisely
/dev/sda3, /dev/sdb3, and /dev/sdc3", and mdadm is saying,
"Sorry, those three devices do not make an array".
You should use either "uuid=" (preferred) or "super-minor="
(easier to manage in some ways).
>
> The modules loaded are
>
> modprobe -k aic7xxx
> modprobe -k raid1
> modprobe -k raid5
> modprobe -k ext3
> modprobe -k ext2
>
> mdadm is run as
>
> set "/dev/md2"
> [ -b "$1" ] || set "/dev/md/2"
> mdadm --assemble --run --scan "$1"
This bit of code is silly. If it chooses "/dev/md/2", then it
won't find a match in /etc/mdadm/mdadm.conf and wont do anything
useful.
Why not just:
mdadm --assemble --scan
It will then start everything listed in mdadm.conf.
NeilBrown
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Can't figure out how to use mdadm in initrd
2002-06-28 14:58 ` Neil Brown
@ 2002-06-28 16:36 ` Ken Causey
2002-06-28 17:18 ` Neil Brown
0 siblings, 1 reply; 4+ messages in thread
From: Ken Causey @ 2002-06-28 16:36 UTC (permalink / raw)
To: Neil Brown; +Cc: linux-raid
On Fri, 2002-06-28 at 09:58, Neil Brown wrote:
> On June 28, ken@ineffable.com wrote:
> > I don't get it. I cannot seem to get mdadm to handle a degraded array
> > no matter what I do. I'm setting up a system with all filesystems
> > including boot and root on software RAID. I initially tried to use
> > raidstart in my initrd but ran into a bug that prevents reinstating
> > missing array members in some circumstances, so I was directed to use
> > mdadm instead. Here's my current setup:
> >
> > root is on /dev/md2 (RAID5)
> >
> > The /etc/mdadm/mdadm.conf file in the initrd contains:
> >
> > DEVICE /dev/sd*
> > ARRAY /dev/md2 devices="/dev/sda3,/dev/sdb3,/dev/sdc3"
>
> the "devices=" is not the best way to say what devices to use.
> It works OK for IDE which has stable names but not so good for
> SCSI which doesn't.
>
> What you are saying is "Please assemble an array from precisely
> /dev/sda3, /dev/sdb3, and /dev/sdc3", and mdadm is saying,
> "Sorry, those three devices do not make an array".
>
> You should use either "uuid=" (preferred) or "super-minor="
> (easier to manage in some ways).
>
Ah, OK. Thank you. I will try that.
> >
> > The modules loaded are
> >
> > modprobe -k aic7xxx
> > modprobe -k raid1
> > modprobe -k raid5
> > modprobe -k ext3
> > modprobe -k ext2
> >
> > mdadm is run as
> >
> > set "/dev/md2"
> > [ -b "$1" ] || set "/dev/md/2"
> > mdadm --assemble --run --scan "$1"
>
> This bit of code is silly. If it chooses "/dev/md/2", then it
> won't find a match in /etc/mdadm/mdadm.conf and wont do anything
> useful.
> Why not just:
> mdadm --assemble --scan
I understand that it may seem silly, but it makes plenty of sense when
you consider that it is generated by mkinitrd which is ended to be of
general use. Unfortunately you are seeing this out of context as this
script is told whether or not devfs is in use or not.
I don't need --run? The man page seems to imply that --run is needed if
you want to start a degraded array.
>
> It will then start everything listed in mdadm.conf.
>
> NeilBrown
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Can't figure out how to use mdadm in initrd
2002-06-28 16:36 ` Ken Causey
@ 2002-06-28 17:18 ` Neil Brown
0 siblings, 0 replies; 4+ messages in thread
From: Neil Brown @ 2002-06-28 17:18 UTC (permalink / raw)
To: Ken Causey; +Cc: linux-raid
On June 28, ken@ineffable.com wrote:
> > >
> > > set "/dev/md2"
> > > [ -b "$1" ] || set "/dev/md/2"
> > > mdadm --assemble --run --scan "$1"
> >
> > This bit of code is silly. If it chooses "/dev/md/2", then it
> > won't find a match in /etc/mdadm/mdadm.conf and wont do anything
> > useful.
> > Why not just:
> > mdadm --assemble --scan
>
> I understand that it may seem silly, but it makes plenty of sense when
> you consider that it is generated by mkinitrd which is ended to be of
> general use. Unfortunately you are seeing this out of context as this
> script is told whether or not devfs is in use or not.
I gather the mdadm.conf is also autogenerated to make... fair enough then.
>
> I don't need --run? The man page seems to imply that --run is needed if
> you want to start a degraded array.
--run is only needed when starting things "manually". In this context
--scan implied --run.
NeilBrown
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-06-28 17:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-28 14:45 Can't figure out how to use mdadm in initrd Ken Causey
2002-06-28 14:58 ` Neil Brown
2002-06-28 16:36 ` Ken Causey
2002-06-28 17:18 ` Neil Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).