[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Questions about software RAID level 1 (how long should it take to sync, etc?)



On 4/4/06, Stephen Gran <sgran@debian.org> wrote:
> This one time, at band camp, Mike Garey said:
> > On 4/4/06, Stephen Gran <sgran@debian.org> wrote:
> > > This one time, at band camp, Mike Garey said:
> > > > ALERT! /dev/md0 does not exist.  Dropping to a shell!
> > >
> > > My first advice is just to wait at that prompt for a few minutes, and
> > > then look in /dev.  It can take a little while for the device node to be
> > > created, and the scripts aren't that smart about it.  There has been
> > > some discussion about sleeping until md0 is created or some time limit
> > > expires, whichever comes first, but I haven't seen that implemented yet.
> >
> > After the prompt,  it drops me right into a busybox shell, and
> > /dev/md0 is never created (I've left the box on for the past hour or
> > so and nothing).  What is it exactly that tells md to create a
> > /dev/md0?  Or is this something that should automatically happen, as
> > long as the md module is loaded?  And what is required to be able to
> > mount a hard drive on /dev/md0? Does the device type of the drive need
> > to be FD, or can it still be 83 (linux)?  Thanks,
>
> That's decidedly odd.  What should happen is that the module for the md
> array is loaded by the kernel when it tries to find the root filesystem.
> After some module magic, a sysfs event happens, and then udev creates
> the device node.  I have never heard of it taking more than a couple of
> minutes for this series of events to happen.  Something is seriously
> wierd on your end - do you have the module for the md array in the
> initrd?

I have raid1 and md-mod (among other things) in my initrd image.

> Is the approriate udev magic in the initrd?

what is this "udev magic" that you speak of?  In dmesg, I can see
something about udevd loading.. And the rest of /dev is populated,
just not /dev/md0 :(

> If not, can you
> modporbe the necessary modules from busybox, and get an md0 device?

modprobe md-mod and modprobe raid1 don't seem to do anything, nor do
they produce a /dev/md0.

> Can
> you MAKEDEV it?

busybox doesn't have the MAKEDEV script, and I'm not sure if it has
all of the commands that MAKEDEV requires..

The strange thing is, when booting from the SystemRescueCD
(http://www.sysresccd.org/Main_Page), I get the following:


i2c /dev entries driver
i2c-core: driver [dev_driver] registered
md: linear personality registered as nr 1
md: raid0 personality registered as nr 2
md: raid1 personality registered as nr 3
md: raid10 personality registered as nr 9
md: raid5 personality registered as nr 4
raid5: automatically using best checksumming function: pIII_sse
   pIII_sse  :  4744.000 MB/sec
raid5: using function: pIII_sse (4744.000 MB/sec)
raid6: int32x1    781 MB/s
raid6: int32x2    875 MB/s
raid6: int32x4    679 MB/s
raid6: int32x8    566 MB/s
raid6: mmxx1     1800 MB/s
raid6: mmxx2     1808 MB/s
raid6: sse1x1    1050 MB/s
raid6: sse1x2    1105 MB/s
raid6: sse2x1    2082 MB/s
raid6: sse2x2    1921 MB/s
raid6: using algorithm sse2x1 (2082 MB/s)
md: raid6 personality registered as nr 8
md: multipath personality registered as nr 7
md: md driver 0.90.3 MAX_MD_DEVS=256, MD_SB_DISKS=27
md: bitmap version 4.39
md: Autodetecting RAID arrays.
md: autorun ...
md: considering hdc1 ...
md:  adding hdc1 ...
md: created md0
md: bind<hdc1>
md: running: <hdc1>
raid1: raid set md0 active with 1 out of 2 mirrors
md: ... autorun DONE.

although the system rescue cd is based on Gentoo I believe.. But it
seems to successfully create /dev/md0 from /dev/hdc1.. But I can't
figure out why I'm unable to duplicate this same thing using initrd +
md + raid1 on debian testing.

I've also tried compiling a custom kernel with md and raid1 built into
it, but I get this when trying to boot from it on /dev/hdc1 (which is
originally the problem I was having, and caused me to start messing
around with an initrd image in the first place):

VFS: Cannot open root device "md0" or unknown-block(0,0)
Please append a correct "root=" boot option
kernel panic - not syncing: VFS unable to mount root fs on unknown-block(0,0)

the above is when using "kernel         
/boot/vmlinuz-2.6.15-1-486-RAID root=/dev/md0 ro" in my
/boot/grub/menu.lst file.

If anyone else has any suggestions please keep them coming!

Also, is it dangerous or damaging to switch the device type from FD
(linux raid) to 83 (linux) for /dev/hdc1 and mounting it using "mount
-t ext3 /dev/hdc1 /mnt/point" (or editing /etc/fstab and switching
from /dev/md0 to /dev/hdc1)?  In other words, will mounting it as a
regular ext3 partition prevent /dev/hdc1 from being mounted as
/dev/md0 in the future?  Thanks,

Mike



Reply to: