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

Re: Raid, fsck, superblock could not be found

--- Alvin Oga <aoga@mail.Linux-Consulting.com> wrote:
> > 
> > /initrd.img-2.6.8-2-686-sata-raid contains "most" modules + sata_nv + raid0
> +
> > raid1 + raid5, nothing more.
> that's just the modules ..
> what about the commands executed from inside initrd 
> it supposed to be modprobe'ing all the modules in the initrd, which is
> the whole point of including the modules in the initrd
> it should also post porcess the modules with mdadm to assemble
> the raid stuff in this case
> 	- i suspect if you are using a generic initrd, that it will
> 	not build your software raid with mdadm for you
> 	so you have to add the explict mdadm -assemble ... 
> 	commands into the initrd and rebuild the initrd
> 	( uncompress it,  do the change ..  compress it again )

That's a very, very good guess. Thanks. It appears that my initrd.img includes
--assemble instructions ONLY for /dev/md2 and /dev/md3 arrays. No /dev/md1. So
that's likely the reason why /dev/md1 is not assembled and, hence, fsck fails
on it.

However, I am not clear why mkinitrd does NOT include instructions for /dev/md1
when I build the image. I probably could edit initrd*/script file manually and
add there instructions for /dev/md1 but shouldn't there be an option to tell
mkinitrd that /boot is mounted on raid1? I prepared and added
/etc/mkinitrd/script file but mkinitrd appears to ignore it when building.

That's how I build my initrd image:

# cat /etc/mkinitrd/mkinitrd.conf
# /etc/mkinitrd/mkinitrd.conf:
#  Configuration file for mkinitrd(8).  See mkinitrd.conf(5).
# This file is meant to be parsed as a shell script.

# What modules to install.

# The length (in seconds) of the startup delay during which linuxrc may be
# interrupted.

# If this is set to probe mkinitrd will try to figure out what's needed to
# mount the root file system.  This is equivalent to the old PROBE=on setting.

# This controls the permission of the resulting initrd image.

# Command to generate the initrd image.
MKIMAGE='mkcramfs %s %s > /dev/null'

# Set this to yes if you want to use busybox(1).

# Set this to no if you want to disable /usr/share/initrd-tools/scripts.

# This is the value for LD_LIBRARY_PATH when deciding what goes onto the
# image.

# cat /etc/mkinitrd/modules
# add modules necessary to mount /, module order IS important!

# cat /proc/mdstat 
Personalities : [raid0] [raid1] [raid5] 
md1 : active raid1 sda1[0] sdc1[2] sdb1[1]
      40064 blocks [3/3] [UUU]
md2 : active raid5 sda2[0] sdc2[2] sdb2[1]
      486351616 blocks level 5, 64k chunk, algorithm 2 [3/3] [UUU]
md3 : active raid5 sda3[0] sdc3[2] sdb3[1]
      1959680 blocks level 5, 64k chunk, algorithm 2 [3/3] [UUU]
unused devices: <none>

# mkinitrd -o /boot/initrd.img-2.6.8-2-686-sata-raid-killme 2.6.8-2-686
# mount -o loop /boot/initrd.img-2.6.8-2-686-sata-raid-killme /tmp/img/
# cat /tmp/img/script
mdadm -A /devfs/md/3 -R -u 3232683c:698319a4:67aa8320:ae8fa7c7 /dev/sda3
/dev/sdb3 /dev/sdc3
mdadm -A /devfs/md/2 -R -u 2ed78bfb:aed805bf:7cc7e04b:e56f1342 /dev/sda2
/dev/sdb2 /dev/sdc2

No /dev/md1.



Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!

Reply to: