* Autodetection howto
@ 2004-06-15 20:42 Tim Harvey
2004-06-16 6:34 ` danci
0 siblings, 1 reply; 4+ messages in thread
From: Tim Harvey @ 2004-06-15 20:42 UTC (permalink / raw)
To: linux-raid
Greetings,
I've got a 4-disk RAID5 array that I'm able to manually assemble and
mount, however I can't figure out how to get the autodetection to work.
In reading the Linux Software RAID howto it seems like it should 'just
work', but I'm running into a snag which doesn't seem to be described in
the HOWTO/FAQ.
The commands that I use to manually assemble and run my XFS filesystem
via LVM over RAID5 are:
# mdadm --assemble --run /dev/md0 /dev/hdb1 /dev/hdc1 /dev/hdd1
mdadm: /dev/md0 has been started with 3 drives (out of 4).
# mdadm --assemble --run /dev/md1 /dev/hdb3 /dev/hdc3 /dev/hdd3
mdadm: /dev/md1 has been started with 3 drives (out of 4).
Then for LVM:
# vgscan
# vgchange -a y
# mount -t xfs -o logdev=/dev/logdev/storage1 /dev/vgroup00/storage1
/mnt/data
Here are my log messages from bootup:
Jun 15 11:31:24 localhost kernel: md: autorun ...
Jun 15 11:31:24 localhost kernel: md: considering hdh1 ...
Jun 15 11:31:24 localhost kernel: md: adding hdh1 ...
Jun 15 11:31:24 localhost kernel: md: adding hdg1 ...
Jun 15 11:31:24 localhost kernel: md: adding hdf1 ...
Jun 15 11:31:24 localhost kernel: md: adding hde1 ...
Jun 15 11:31:24 localhost kernel: md: created md0
Jun 15 11:31:24 localhost kernel: md: bind<hde1,1>
Jun 15 11:31:24 localhost kernel: md: bind<hdf1,2>
Jun 15 11:31:24 localhost kernel: md: bind<hdg1,3>
Jun 15 11:31:24 localhost kernel: md: bind<hdh1,4>
Jun 15 11:31:25 localhost kernel: md: running: <hdh1><hdg1><hdf1><hde1>
Jun 15 11:31:25 localhost kernel: md: hdh1's event counter: 00000028
Jun 15 11:31:25 localhost kernel: md: hdg1's event counter: 00000028
Jun 15 11:31:25 localhost kernel: md: hdf1's event counter: 00000028
Jun 15 11:31:25 localhost kernel: md: hde1's event counter: 00000028
Jun 15 11:31:25 localhost kernel: kmod: failed to exec /sbin/modprobe -s
-k md-personality-4, errno = 2
Jun 15 11:31:25 localhost kernel: md: personality 4 is not loaded!
Jun 15 11:31:25 localhost kernel: md :do_md_run() returned -22
Jun 15 11:31:25 localhost kernel: md: md0 stopped.
Jun 15 11:31:25 localhost kernel: md: unbind<hdh1,3>
Jun 15 11:31:25 localhost kernel: md: export_rdev(hdh1)
Jun 15 11:31:25 localhost kernel: md: unbind<hdg1,2>
Jun 15 11:31:25 localhost kernel: md: export_rdev(hdg1)
Jun 15 11:31:25 localhost kernel: md: unbind<hdf1,1>
Jun 15 11:31:25 localhost kernel: md: export_rdev(hdf1)
Jun 15 11:31:25 localhost kernel: md: unbind<hde1,0>
Jun 15 11:31:25 localhost kernel: md: export_rdev(hde1)
Jun 15 11:31:25 localhost kernel: md: ... autorun DONE.
I'm not sure why I'm getting 'md: personality 4 is not loaded!', would
it be because RAID5 is loaded as a module instead of compiled into the
kernel? I googled this and have added the following to
/etc/modules.conf and rebooted, but it did not change things:
# RAID autoload modules
alias md-personality-3 raid1
alias md-personality-4 raid5
Questions:
- How do I get around the 'personality 4 is not loaded'? Did I need to
run something after I modified /etc/modules.conf for it to take effect?
- It would appear that the mounting of filesystems via /etc/fstab occurs
before md autoscans. How can I delay the mounting of the filesystem
that exists on the RAID5 array?
Thanks for any help!
Tim
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Autodetection howto
2004-06-15 20:42 Autodetection howto Tim Harvey
@ 2004-06-16 6:34 ` danci
2004-06-16 21:25 ` Tim Harvey
0 siblings, 1 reply; 4+ messages in thread
From: danci @ 2004-06-16 6:34 UTC (permalink / raw)
To: Tim Harvey; +Cc: linux-raid
On Tue, 15 Jun 2004, Tim Harvey wrote:
> Greetings,
>
> I've got a 4-disk RAID5 array that I'm able to manually assemble and
> mount, however I can't figure out how to get the autodetection to work.
> In reading the Linux Software RAID howto it seems like it should 'just
> work', but I'm running into a snag which doesn't seem to be described in
> the HOWTO/FAQ.
> - How do I get around the 'personality 4 is not loaded'? Did I need to
> run something after I modified /etc/modules.conf for it to take effect?
> - It would appear that the mounting of filesystems via /etc/fstab occurs
> before md autoscans. How can I delay the mounting of the filesystem
> that exists on the RAID5 array?
1. You need to set the partition that are in the array to the correct
partition type - fd.
2. If you have raid compiled as modules, you need a proper initrd which
will load appropriate modules (raid5) and then re-autodetect the arrays
(SuSE uses 'raidautorun' for that) - all that before your OS actually
starts booting.
As far as 'personality 4 is not loaded' - I think you don't need to worry
about it. It just tells you that it's not loaded...
D.
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: Autodetection howto
2004-06-16 6:34 ` danci
@ 2004-06-16 21:25 ` Tim Harvey
2004-06-29 8:04 ` danci
0 siblings, 1 reply; 4+ messages in thread
From: Tim Harvey @ 2004-06-16 21:25 UTC (permalink / raw)
To: danci; +Cc: linux-raid
> -----Original Message-----
> From: linux-raid-owner@vger.kernel.org [mailto:linux-raid-
> owner@vger.kernel.org] On Behalf Of danci@agenda.si
> Sent: Tuesday, June 15, 2004 11:35 PM
> To: Tim Harvey
> Cc: linux-raid@vger.kernel.org
> Subject: Re: Autodetection howto
>
> On Tue, 15 Jun 2004, Tim Harvey wrote:
>
> > Greetings,
> >
> > I've got a 4-disk RAID5 array that I'm able to manually assemble and
> > mount, however I can't figure out how to get the autodetection to
work.
> > In reading the Linux Software RAID howto it seems like it should
'just
> > work', but I'm running into a snag which doesn't seem to be
described in
> > the HOWTO/FAQ.
>
> > - How do I get around the 'personality 4 is not loaded'? Did I need
to
> > run something after I modified /etc/modules.conf for it to take
effect?
> > - It would appear that the mounting of filesystems via /etc/fstab
occurs
> > before md autoscans. How can I delay the mounting of the filesystem
> > that exists on the RAID5 array?
>
>
> 1. You need to set the partition that are in the array to the correct
> partition type - fd.
>
Got this covered, and md is creating the array(s)... just still failing
with the 'md-personality' error which would seem to be why I need your
second step:
> 2. If you have raid compiled as modules, you need a proper initrd
which
> will load appropriate modules (raid5) and then re-autodetect the
arrays
> (SuSE uses 'raidautorun' for that) - all that before your OS
actually
> starts booting.
I'm not exactly sure how to do this... could you give me an example? My
existing initrd is /boot/initrd-2.4.22-1.2140.nptl_30.rhfc1.at.img so
I'm attempting:
# mkinitrd --preload raid5.o
/boot/initrd-2.4.22-1.2140.nptl_30.rhfc1.at.img 2.4.22-1
I'm getting a usage error and I'm evidently not understanding mkinitrd's
man page.
Thanks for your help,
Tim
>
> As far as 'personality 4 is not loaded' - I think you don't need to
worry
> about it. It just tells you that it's not loaded...
>
> D.
>
> -
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: Autodetection howto
2004-06-16 21:25 ` Tim Harvey
@ 2004-06-29 8:04 ` danci
0 siblings, 0 replies; 4+ messages in thread
From: danci @ 2004-06-29 8:04 UTC (permalink / raw)
To: Tim Harvey; +Cc: linux-raid
> > 2. If you have raid compiled as modules, you need a proper initrd
> > which will load appropriate modules (raid5) and then re-autodetect
> > the arrays (SuSE uses 'raidautorun' for that) - all that before
> > your OS actually starts booting.
> I'm not exactly sure how to do this... could you give me an example?
> My existing initrd is /boot/initrd-2.4.22-1.2140.nptl_30.rhfc1.at.img so
> I'm attempting:
>
> # mkinitrd --preload raid5.o
> /boot/initrd-2.4.22-1.2140.nptl_30.rhfc1.at.img 2.4.22-1
>
> I'm getting a usage error and I'm evidently not understanding mkinitrd's
> man page.
mkinitrd is pretty much distribution specific, so I cannot help you much
with that.
However, according to man page on Redhat 7.2 AXP that I have access to,
the 'mkinitrd' script is supposed to add raid modules automatically if the
system's root partition is on raid (I suppose it checks the /etc/fstab and
/etc/raidtab files)...
Maybe you should check the content of your initrd by:
1. cp /boot/initrd-2.4.22-1.2140.nptl_30.rhfc1.at.img /tmp/myinitrd.gz
2. gunzip /tmp/myinitrd.gz
3. mkdir /tmp/loop
4. mount -o loop /tmp/myinitrd /tmp/loop
5. cd /tmp/loop
Here you will see a 'linuxrc' script, which lists all the commands that
are executed.
This is my 'linuxrc':
#!/bin/nash
echo "Loading jbd module"
insmod /lib/jbd.o
echo "Loading ext3 module"
insmod /lib/ext3.o
mount -t proc /proc /proc
echo Mounting /proc filesystem
echo Creating root device
mkrootdev /dev/root
echo 0x0100 > /proc/sys/kernel/real-root-dev
umount /proc
echo Mounting root filesystem
mount --ro -t ext3 /dev/root /sysroot
pivot_root /sysroot /sysroot/initrd
As you can see, I don't use root on raid on this particular machine.
D.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-06-29 8:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-15 20:42 Autodetection howto Tim Harvey
2004-06-16 6:34 ` danci
2004-06-16 21:25 ` Tim Harvey
2004-06-29 8:04 ` danci
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox