Re: [gentoo-user] How does grub assemble a RAID1 for / ??

2010-04-04 Thread Xavier Parizet
Try appending md=3,/dev/sdb3,/dev/sdc3 to the kernel command line
parameters.

On 04/04/2010 01:45 AM, Albert Hopkins wrote:
 On Sat, 2010-04-03 at 16:07 -0700, Mark Knecht wrote:
 The install is complete but it won't boot. grub finds the kernel
 and starts booting but then I get the typical VFS file sync error as
 the kernel starts looking for the install on /dev/md3. What I'm not
 understanding is how does the boot process get the information
 required to assemble the RAID device. 
 
 GRUB does not assemble raid.  That's why it only works with RAID1.
 
 By your own account, GRUB has succeeded, therefore GRUB is not the
 problem.
 
 The problem is the kernel
 
 The kernel assembles RAID by looking for partitions of with the Linux
 RAID partition type, finding out what kind of RAID they are, and
 assembling them (according to their RAID volume UUID).
 
 You apparently only have one RAID volume.  It's probably being assigned
 to /dev/md0, yet you are passing root=/dev/md3.. not sure why you are
 doing that.

-- 
  Xavier Parizet
YaGB :   http://gentooist.com
GPG  :C7DC B10E FC21 63BE
B453 D239 F6E6 DF65 1569 91BF



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-user] How does grub assemble a RAID1 for / ??

2010-04-04 Thread Mark Knecht
On Sun, Apr 4, 2010 at 2:57 AM, Xavier Parizet x...@gentooist.com wrote:
 Try appending md=3,/dev/sdb3,/dev/sdc3 to the kernel command line
 parameters.


Thanks. Tried that one last night but no luck, although it does change
the message to Unknown-block(9,3) from Unknown-block(9,0).

Cheers,
Mark



Re: [gentoo-user] How does grub assemble a RAID1 for / ??

2010-04-03 Thread Neil Bothwick
On Sat, 3 Apr 2010 16:07:06 -0700, Mark Knecht wrote:

The install is complete but it won't boot. grub finds the kernel
 and starts booting but then I get the typical VFS file sync error as
 the kernel starts looking for the install on /dev/md3. What I'm not
 understanding is how does the boot process get the information
 required to assemble the RAID device. By hand in the non-RAID install
 I do this:
 
 keeper ~ # mdadm -A /dev/md3 /dev/sdb3 /dev/sdc3
 mdadm: /dev/md3 has been started with 2 drives.
 keeper ~ # cat /proc/mdstat
 Personalities : [raid1]
 md3 : active raid1 sdb3[0] sdc3[1]
   52436092 blocks super 1.1 [2/2] [UU]
 
 unused devices: none
 keeper ~ #
 
 but when I try to boot the RAID install it says it cannot find /dev/md3.

You need to set the partition type for the RAIDed partitions to Linux
raid autodetect. You'll probably then find that the kernel sets the RAID
as /dev/md0, not md3.


-- 
Neil Bothwick

You want us to do WHAT? - Ancient Chinese wall engineer.


signature.asc
Description: PGP signature


Re: [gentoo-user] How does grub assemble a RAID1 for / ??

2010-04-03 Thread Albert Hopkins
On Sat, 2010-04-03 at 16:07 -0700, Mark Knecht wrote:
 The install is complete but it won't boot. grub finds the kernel
 and starts booting but then I get the typical VFS file sync error as
 the kernel starts looking for the install on /dev/md3. What I'm not
 understanding is how does the boot process get the information
 required to assemble the RAID device. 

GRUB does not assemble raid.  That's why it only works with RAID1.

By your own account, GRUB has succeeded, therefore GRUB is not the
problem.

The problem is the kernel

The kernel assembles RAID by looking for partitions of with the Linux
RAID partition type, finding out what kind of RAID they are, and
assembling them (according to their RAID volume UUID).

You apparently only have one RAID volume.  It's probably being assigned
to /dev/md0, yet you are passing root=/dev/md3.. not sure why you are
doing that.






Re: [gentoo-user] How does grub assemble a RAID1 for / ??

2010-04-03 Thread Mark Knecht
On Sat, Apr 3, 2010 at 4:37 PM, Neil Bothwick n...@digimed.co.uk wrote:
 On Sat, 3 Apr 2010 16:07:06 -0700, Mark Knecht wrote:

    The install is complete but it won't boot. grub finds the kernel
 and starts booting but then I get the typical VFS file sync error as
 the kernel starts looking for the install on /dev/md3. What I'm not
 understanding is how does the boot process get the information
 required to assemble the RAID device. By hand in the non-RAID install
 I do this:

 keeper ~ # mdadm -A /dev/md3 /dev/sdb3 /dev/sdc3
 mdadm: /dev/md3 has been started with 2 drives.
 keeper ~ # cat /proc/mdstat
 Personalities : [raid1]
 md3 : active raid1 sdb3[0] sdc3[1]
       52436092 blocks super 1.1 [2/2] [UU]

 unused devices: none
 keeper ~ #

 but when I try to boot the RAID install it says it cannot find /dev/md3.

 You need to set the partition type for the RAIDed partitions to Linux
 raid autodetect. You'll probably then find that the kernel sets the RAID
 as /dev/md0, not md3.


 --
 Neil Bothwick

Tried changing root=/dev/md0. No change.

The actual failure message is the fairly standard

VFS - Unable to mount root fs on unknown-block(9,0)

I can control this using (for instance)

title /dev/sda1 Gentoo Linux 2.6.33-gentoo-RAID
root (hd0,0)
kernel (hd0,0)/boot/bzImage-2.6.33-gentoo-RAID root=/dev/md3
md=3,1,/dev/sdb3,/dev/sdc3

which changes the message to 'unknown-block(9,3)'

Since the mknod command for md devices is always 9 1 or 9 3 those match up.

Is this saying that the special file thing for 9,0 and 9,3 are missing
at boot time?


As I posted in the first post the partitions are marked as autodetect,
but if it matters I did that late in the process after the RAID was
built.

keeper ~ # fdisk -l /dev/sdb /dev/sdc

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xa06ef201

   Device Boot  Start End  Blocks   Id  System
/dev/sdb1   1  14  112423+  83  Linux
/dev/sdb2  16 538 4200997+  82  Linux swap / Solaris
/dev/sdb3 544707152436160   fd  Linux raid autodetect

Disk /dev/sdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x2ab15637

   Device Boot  Start End  Blocks   Id  System
/dev/sdc1   1  14  112423+  83  Linux
/dev/sdc2  16 538 4200997+  82  Linux swap / Solaris
/dev/sdc3 544707152436160   fd  Linux raid autodetect
keeper ~ #



Answering Albert - I did it with /dev/md3 because that's how the
install guide did it:

mknod /dev/md3 b 9 3
mdadm --create /dev/md3 --level=1 --raid-devices=2 /dev/sda3 /dev/sdb3

From fstab:
/dev/md3  /   ext3  noatime 0 1

From grub.conf:
title Gentoo
root (hd0,0)
kernel /boot/kernel root=/dev/md3

Granted, my kernel line is a little different:

root (hd0,0)
kernel (hd0,0)/boot/bzImage-2.6.33-gentoo-RAID root=/dev/md3

but I didn't make it up. I just followed the guide.

I set the same RAID kernel options as shown in the guide but maybe
there is some other requirement not shown in the guide but actually
required? The CONFIG_RAID_ATTRS is not discussed for instance::

keeper / # cat /usr/src/linux/.config | grep RAID
CONFIG_RAID_ATTRS=m
# CONFIG_BLK_DEV_3W__RAID is not set
# CONFIG_SCSI_AACRAID is not set
# CONFIG_MEGARAID_NEWGEN is not set
# CONFIG_MEGARAID_LEGACY is not set
# CONFIG_MEGARAID_SAS is not set
# CONFIG_SCSI_PMCRAID is not set
CONFIG_MD_RAID0=y
CONFIG_MD_RAID1=y
# CONFIG_MD_RAID10 is not set
# CONFIG_MD_RAID456 is not set
keeper / #

Thanks!

- Mark