linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Problems mounting root file system with software RAID-1
@ 2003-01-28  1:30 Lucas Barbuto
  2003-01-28  8:12 ` Norman Schmidt
  0 siblings, 1 reply; 4+ messages in thread
From: Lucas Barbuto @ 2003-01-28  1:30 UTC (permalink / raw)
  To: Linux RAID Mailing List

Hi All,

I'm having trouble mouting my root file system as part of a software
RAID-1.  First my setup.

OS:     Debian Woody with kernel 2.4.20-XFS (all required fs and RAID
        support compiled in, not as modules)

HDDS:   Two 40GB drives connected to a Promise PDC 20276 (recognised by
        the system as two seperate drives hde and hdg), 1 80GB drive
        connected as secondary slave (hdd).

Originally I installed the OS onto hdd, when I boot off it, the system
looks like this:

--
jupter:~# cat /etc/mtab
/dev/hdd2       /                       ext2    rw,errors=remount-ro 0 0
proc            /proc                   proc    rw                   0 0
devpts          /dev/pts                devpts  rw,gid=5,mode=620    0 0
/dev/md2        /mnt/new-root           ext3    rw                   0 0
/dev/md1        /mnt/new-root/boot      ext3    rw                   0 0
/dev/md5        /mnt/new-root/home      xfs     rw                   0 0
/dev/md6        /mnt/new-root/tmp       xfs     rw                   0 0
/dev/md7        /mnt/new-root/usr       xfs     rw                   0 0
/dev/md8        /mnt/new-root/var       xfs     rw                   0 0
--

The software RAID is working, the md devices will sync and mount and I
have created the file systems on them and copied the whole OS over to
the RAID partitions.

I added the following lines to /mnt/new-root/etc/lilo.conf:

--
boot=/dev/md1
raid-extra-boot="/dev/hde, /hdev/hdg"
root=/dev/md2
--

And run the following command:

--
jupiter:~# chroot /mnt/new-root/ /sbin/lilo
Warning: using BIOS device code 0x80 for RAID boot blocks
Added Linux *
Added LinuxOLD
The boot record of /dev/md1 has been updated.
The boot record of /dev/hde has been updated.
The boot record of /dev/hdg has been updated.
--

Which all looks good... but when I reboot, I get this:

--
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
EXT3-fs: unable to read superblock
EXT2-fs: unable to read superblock
iofs_read_super: bread failed, dev=09:01, iso_blknum=16, block=32
XFS: bad magic number
XFS: SB validate failed
Kernel panic: VFS: Unable to mount root fs on 09:01
--

When trying to mount the root file system.

I don't get it.  I can mount the RAID partitions under /mnt no problems,
I can boot off the RAID device /dev/md1, I just can't mount /dev/md2 as
my root file system.  Can anyone shed some light on this for me?  What
do I need to do?  I have experimented with the LiLo setup and found that
the system will boot up as expected with /dev/hde2 (or /dev/hdg2) as the
root file system... why doesn't it like /dev/md2?  Thanks in advance.

Regards,

Lucas

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

* Re: Problems mounting root file system with software RAID-1
  2003-01-28  1:30 Problems mounting root file system with software RAID-1 Lucas Barbuto
@ 2003-01-28  8:12 ` Norman Schmidt
  2003-01-28 23:13   ` Lucas Barbuto
  0 siblings, 1 reply; 4+ messages in thread
From: Norman Schmidt @ 2003-01-28  8:12 UTC (permalink / raw)
  To: Lucas Barbuto; +Cc: linux-raid

Hi Lucas!

Lucas Barbuto schrieb:

> NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
> EXT3-fs: unable to read superblock
> EXT2-fs: unable to read superblock
> iofs_read_super: bread failed, dev=09:01, iso_blknum=16, block=32
> XFS: bad magic number
> XFS: SB validate failed
> Kernel panic: VFS: Unable to mount root fs on 09:01
> --
> 
> When trying to mount the root file system.
> 
> I don't get it.  I can mount the RAID partitions under /mnt no problems,
> I can boot off the RAID device /dev/md1, I just can't mount /dev/md2 as
> my root file system.  Can anyone shed some light on this for me?  What
> do I need to do?  I have experimented with the LiLo setup and found that
> the system will boot up as expected with /dev/hde2 (or /dev/hdg2) as the
> root file system... why doesn't it like /dev/md2?  Thanks in advance.

I think your problem is the following:

The kernel booting from a /boot md device doesn´t really boot off 
/dev/md1 but off one of the bootblocks of /dev/hde and /dev/hdg (which 
is perfectly good). The kernel doesn´t need /dev/md1 (=/boot) to boot, 
but only one of the bootblocks to find the kernel image, which is 
possible on both hde and hdg. The kernel panic occurs as soon as the 
kernel wants to mount the / filesystem the first time. The reason for 
this is that at that point, the raid devices (i.e. at least /dev/md2, 
the others can be assembled later) are not assembled yet.

You have two options: The older one is to make the underlying partitions 
of /dev/md1 (you didn´t give their name) autodetectable (change 
partition type to fd).
The newer option is to tell the kernel at boot time how to assemble the 
needed devices, which you do by inserting the following into the "image" 
section of your booting kernel in /etc/lilo.conf:
append = "md=2,/dev/hde3,/dev/hdg3"
Change the partitions to those that build up /dev/md2.
The kernel then can assemble its raid, since you compiled at least raid1 
into it. You migth be able to use raid in a module at boot time if you 
load the module through an initial ramdisk (initrd), something Debian 
usually does not, but SuSE seems to (if yet very badly documented).

By the way: The most importatnt thing missing in your mail is 
/etc/raidtab or /etc/mdadm/mdadm.conf.

HTH, Norman Schmidt.
-- 
--

Norman Schmidt          Institut für Physikal. u. Theoret. Chemie
cand. chem.             Friedrich-Alexander-Universitaet
schmidt@naa.net         Erlangen-Nuernberg

-
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: Problems mounting root file system with software RAID-1
  2003-01-28  7:15 AW: " Dambacher, Ulf
@ 2003-01-28 23:01 ` Lucas Barbuto
  0 siblings, 0 replies; 4+ messages in thread
From: Lucas Barbuto @ 2003-01-28 23:01 UTC (permalink / raw)
  To: Linux RAID Mailing List

Hi Ulf,

Thanks for your reply.

On Tue, Jan 28, 2003 at 08:15:31AM +0100, Dambacher, Ulf wrote:
> first, is the promise driver compiled in?
> - not in /proc/modules?
> - gives message at boot time about partititions and drives?

Yes, that's correct.

> second, do you use raid autostart on md1? 
> - partitition id is set to hex(fd)?
> - autostart support compiled in?
> - kernel searches for autostart devices at boot time?
> - kernel finds any autostart devices?

Hmm, I'm not sure what this 'autostart' is.  All the partition types are
set to 0xfd.

> if all this is ok, please send the complete bootup messages (dmesg) for more
> information

How do you save the boot messages for a system that has crashed?

Regards,

Lucas

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

* Re: Problems mounting root file system with software RAID-1
  2003-01-28  8:12 ` Norman Schmidt
@ 2003-01-28 23:13   ` Lucas Barbuto
  0 siblings, 0 replies; 4+ messages in thread
From: Lucas Barbuto @ 2003-01-28 23:13 UTC (permalink / raw)
  To: Linux RAID Mailing List

Hi Norman,

On Tue, Jan 28, 2003 at 09:12:11AM +0100, Norman Schmidt wrote:
> The kernel booting from a /boot md device doesn?t really boot off 
> /dev/md1 but off one of the bootblocks of /dev/hde and /dev/hdg (which 
> is perfectly good). The kernel doesn?t need /dev/md1 (=/boot) to boot, 
> but only one of the bootblocks to find the kernel image, which is 
> possible on both hde and hdg. The kernel panic occurs as soon as the 
> kernel wants to mount the / filesystem the first time. The reason for 
> this is that at that point, the raid devices (i.e. at least /dev/md2, 
> the others can be assembled later) are not assembled yet.

Ah!  This makes sense!

> You have two options: The older one is to make the underlying partitions 
> of /dev/md1 (you didn?t give their name) autodetectable (change 
> partition type to fd).

Yep, I did this.  The underlying partitions for md1 were hde1 and hdg1,
their types were 0xfd.  Same goes for md2 (the root partition).
Actually all the partitions on the system disks were set to 0xfd.

> The newer option is to tell the kernel at boot time how to assemble the 
> needed devices, which you do by inserting the following into the "image" 
> section of your booting kernel in /etc/lilo.conf:
> append = "md=2,/dev/hde3,/dev/hdg3"
> Change the partitions to those that build up /dev/md2.
> The kernel then can assemble its raid, since you compiled at least raid1 
> into it.

I'll give this a try.

> By the way: The most importatnt thing missing in your mail is 
> /etc/raidtab or /etc/mdadm/mdadm.conf.

I'll be sure to include this next time.

Thanks for your help.

Regards,

Lucas

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

end of thread, other threads:[~2003-01-28 23:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-28  1:30 Problems mounting root file system with software RAID-1 Lucas Barbuto
2003-01-28  8:12 ` Norman Schmidt
2003-01-28 23:13   ` Lucas Barbuto
  -- strict thread matches above, loose matches on Subject: below --
2003-01-28  7:15 AW: " Dambacher, Ulf
2003-01-28 23:01 ` Lucas Barbuto

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).