Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Grub and RAID install, HELP
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
remix
l33t
l33t


Joined: 28 Apr 2004
Posts: 768
Location: hawaii

PostPosted: Thu Feb 04, 2010 10:17 pm    Post subject: Grub and RAID install, HELP Reply with quote

i have a gentoo install setup like this.

i have 4 1TB disks, i used the fdisk utility to partition each identically, no special configuration.

so now have
/dev/sda1 /dev/sda2 /dev/sda3 /dev/sda5 /dev/sdd6
/dev/sdb1 /dev/sdb2 /dev/sdb3 /dev/sdb5 /dev/sdd6
/dev/sdc1 /dev/sdc2 /dev/sdc3 /dev/sdc5 /dev/sdd6
/dev/sdd1 /dev/sdd2 /dev/sdd3 /dev/sdd5 /dev/sdd6

and used mdadm like this

mdadm --create --verbose /dev/md1 --level=1 --raid-devices=4 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1
mdadm --create --verbose /dev/md2 --level=5 --raid-devices=4 /dev/sda2 /dev/sdb2 /dev/sdc2 /dev/sdd2
mdadm --create --verbose /dev/md3 --level=5 --raid-devices=4 /dev/sda3 /dev/sdb3 /dev/sdc3 /dev/sdd3
mdadm --create --verbose /dev/md4 --level=5 --raid-devices=4 /dev/sda5 /dev/sdb5 /dev/sdc5 /dev/sdd5
mdadm --create --verbose /dev/md5 --level=5 --raid-devices=4 /dev/sda6 /dev/sdb6 /dev/sdc6 /dev/sdd6

works fine.

i mounted, installed like normal, and even installed grub on each of the 4 disks

my grub.conf
Code:
title Gentoo
root (hd0,0)
kernel /boot/gentoo-2.6.31-r5 root=/dev/md3


i keep getting file not found errors in grub.
i did enable RAID in my kernel.
i'm just not entirely sure it's finding /boot/gentoo-2.6.31-r5 in any of the hds. yes i copied the bzImage to each disk, and they are all named the same. i even hit "e" to edit lines in grub and try to boot off root (hd1,0) (hd2,0) and (hd3,0)

any ideas?
_________________
RemixTechnology.com
help the needy
Back to top
View user's profile Send private message
Mike Hunt
Watchman
Watchman


Joined: 19 Jul 2009
Posts: 5287

PostPosted: Thu Feb 04, 2010 10:21 pm    Post subject: Reply with quote

I think these are relevant:

Quote:
Important: The partition you boot from must not be striped. It may not be raid-5 or raid-0.

http://www.gentoo.org/doc/en/gentoo-x86+raid+lvm2-quickinstall.xml


Quote:
A RAID 1 array requires a minimum of two drives.

http://en.wikipedia.org/wiki/RAID
Back to top
View user's profile Send private message
remix
l33t
l33t


Joined: 28 Apr 2004
Posts: 768
Location: hawaii

PostPosted: Thu Feb 04, 2010 11:39 pm    Post subject: Reply with quote

ok that did not help me at all, since those are the directions that i followed in the first place.

i did get gentoo to boot into the kernel, my problem was grub wasn't able to find /boot/kernel because my /boot partition was missing the "boot" symlink, so i just added that symlink in again and it loaded the kernel.

now my new problem is a kernel panic, it said md3 was not a valid root partition, enter a real partition to root=
available partitions are:


what is the correct way to configure my kernel in a way that would recognize and assemble the /dev/md3 partition ?
_________________
RemixTechnology.com
help the needy
Back to top
View user's profile Send private message
remix
l33t
l33t


Joined: 28 Apr 2004
Posts: 768
Location: hawaii

PostPosted: Fri Feb 05, 2010 12:14 am    Post subject: Reply with quote

In my kernel config, i enabled "autodetect RAID at boot"
the kernel panic error says:
Code:
md: Autodetecting RAID arrays.
md: Scanned 0 and added 0 devices.
md: autorun ... DONE.
VFS: Cannot open root device "md3" or unknown-block(0,0)
Please append a correct "root=" boot option; here are the available partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)


any ideas?
_________________
RemixTechnology.com
help the needy
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7301
Location: Groton, Massachusetts USA

PostPosted: Fri Feb 05, 2010 12:39 am    Post subject: Reply with quote

Are your partitions marked "type fd" Linux raid autodetect, instead of "type 83" Linux ?
Code:
# fdisk -l
Back to top
View user's profile Send private message
Mike Hunt
Watchman
Watchman


Joined: 19 Jul 2009
Posts: 5287

PostPosted: Fri Feb 05, 2010 12:40 am    Post subject: Reply with quote

Ah yes, a raid51 - never did one.

Generally, unknown-block(0,0) means that the hardware isn't detectected.

Do you have DM_MIRROR=y ?
Back to top
View user's profile Send private message
remix
l33t
l33t


Joined: 28 Apr 2004
Posts: 768
Location: hawaii

PostPosted: Fri Feb 05, 2010 1:29 am    Post subject: Reply with quote

cyrillic wrote:
Are your partitions marked "type fd" Linux raid autodetect, instead of "type 83" Linux ?
Code:
# fdisk -l


yes, i did notice that when i installed grub into (hd0,0) it said type 0x83 while the RAID guide said type 0xfd

i'll use fdisk now to change all the partition types to 0xfd

thanks!
_________________
RemixTechnology.com
help the needy
Back to top
View user's profile Send private message
remix
l33t
l33t


Joined: 28 Apr 2004
Posts: 768
Location: hawaii

PostPosted: Fri Feb 05, 2010 1:30 am    Post subject: Reply with quote

Mike Hunt wrote:
Ah yes, a raid51 - never did one.

Generally, unknown-block(0,0) means that the hardware isn't detectected.

Do you have DM_MIRROR=y ?


no, i will add that now, thanks!
_________________
RemixTechnology.com
help the needy
Back to top
View user's profile Send private message
remix
l33t
l33t


Joined: 28 Apr 2004
Posts: 768
Location: hawaii

PostPosted: Fri Feb 05, 2010 3:19 am    Post subject: Reply with quote

before

Code:
livecd ~ # fdisk -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x608d7980

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1           5       40131   83  Linux
/dev/sda2               6          70      522112+  82  Linux swap / Solaris
/dev/sda3              71        3335    26226112+  83  Linux
/dev/sda4            3336      121601   949971645    5  Extended
/dev/sda5            3336       68607   524297308+  83  Linux
/dev/sda6           68608      121601   425674273+  83  Linux

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x85bbb194

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1           5       40131   83  Linux
/dev/sdb2               6          70      522112+  82  Linux swap / Solaris
/dev/sdb3              71        3335    26226112+  83  Linux
/dev/sdb4            3336      121601   949971645    5  Extended
/dev/sdb5            3336       68607   524297308+  83  Linux
/dev/sdb6           68608      121601   425674273+  83  Linux

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x453b60dd

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *           1           5       40131   83  Linux
/dev/sdc2               6          70      522112+  82  Linux swap / Solaris
/dev/sdc3              71        3335    26226112+  83  Linux
/dev/sdc4            3336      121601   949971645    5  Extended
/dev/sdc5            3336       68607   524297308+  83  Linux
/dev/sdc6           68608      121601   425674273+  83  Linux

Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x95ac437b

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1   *           1           5       40131   83  Linux
/dev/sdd2               6          70      522112+  82  Linux swap / Solaris
/dev/sdd3              71        3335    26226112+  83  Linux
/dev/sdd4            3336      121601   949971645    5  Extended
/dev/sdd5            3336       68607   524297308+  83  Linux
/dev/sdd6           68608      121601   425674273+  83  Linux


after
Code:
livecd ~ # fdisk -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x608d7980

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1           5       40131   fd  Linux raid autodetect
/dev/sda2               6          70      522112+  82  Linux swap / Solaris
/dev/sda3              71        3335    26226112+  fd  Linux raid autodetect
/dev/sda4            3336      121601   949971645    5  Extended
/dev/sda5            3336       68607   524297308+  fd  Linux raid autodetect
/dev/sda6           68608      121601   425674273+  fd  Linux raid autodetect

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x85bbb194

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1           5       40131   fd  Linux raid autodetect
/dev/sdb2               6          70      522112+  82  Linux swap / Solaris
/dev/sdb3              71        3335    26226112+  fd  Linux raid autodetect
/dev/sdb4            3336      121601   949971645    5  Extended
/dev/sdb5            3336       68607   524297308+  fd  Linux raid autodetect
/dev/sdb6           68608      121601   425674273+  fd  Linux raid autodetect

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x453b60dd

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *           1           5       40131   fd  Linux raid autodetect
/dev/sdc2               6          70      522112+  82  Linux swap / Solaris
/dev/sdc3              71        3335    26226112+  fd  Linux raid autodetect
/dev/sdc4            3336      121601   949971645    5  Extended
/dev/sdc5            3336       68607   524297308+  fd  Linux raid autodetect
/dev/sdc6           68608      121601   425674273+  fd  Linux raid autodetect

Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x95ac437b

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1   *           1           5       40131   fd  Linux raid autodetect
/dev/sdd2               6          70      522112+  82  Linux swap / Solaris
/dev/sdd3              71        3335    26226112+  fd  Linux raid autodetect
/dev/sdd4            3336      121601   949971645    5  Extended
/dev/sdd5            3336       68607   524297308+  fd  Linux raid autodetect
/dev/sdd6           68608      121601   425674273+  fd  Linux raid autodetect

_________________
RemixTechnology.com
help the needy
Back to top
View user's profile Send private message
remix
l33t
l33t


Joined: 28 Apr 2004
Posts: 768
Location: hawaii

PostPosted: Fri Feb 05, 2010 3:36 am    Post subject: Reply with quote

failed.
i got the exact same kernel panic message

after i changed the partition types, was i supposed to rebuild the raid array? or assemble then reformat the filesystem?

all i did was change the partition types, assembled the array, mounted and chrooted so that i can update the kernel to add DM_MIRROR=y
recompiled, copied to /boot

even did grub setup again on each disk.

and then rebooted


any other ideas, or, how can i find out what i'm doing wrong?
_________________
RemixTechnology.com
help the needy
Back to top
View user's profile Send private message
Mike Hunt
Watchman
Watchman


Joined: 19 Jul 2009
Posts: 5287

PostPosted: Fri Feb 05, 2010 4:42 am    Post subject: Reply with quote

Nevermind about DM_MIRROR=y, it's for LVM.

But, don't you really need 2 raid1 drives - a mirrored pair? Pretty sure you do.
In fact I think you need a minimum of 6 drives to raid1 + raid5.
Interesting article.
Back to top
View user's profile Send private message
remix
l33t
l33t


Joined: 28 Apr 2004
Posts: 768
Location: hawaii

PostPosted: Fri Feb 05, 2010 8:44 am    Post subject: Reply with quote

actually i don't have a 5+1 or 1+5

i just have 4 1TB disks
partition 1 = RAID 1 (boot partition)
partition 2 = RAID 5
partition 3 = RAID 5
partition 4 = extended
partition 5 = RAID 5
partition 6 = RAID 5

so it seems the kernel isn't autodetecting any of the RAIDs and it errors out because the root device (/dev/md3) doesn't exist.

i have NVRaid, and have that turned off. is there any way i can get RAID5 to work on linux?
_________________
RemixTechnology.com
help the needy
Back to top
View user's profile Send private message
Mike Hunt
Watchman
Watchman


Joined: 19 Jul 2009
Posts: 5287

PostPosted: Fri Feb 05, 2010 8:03 pm    Post subject: Reply with quote

I might consider something like this, just as an example:
Code:
        /dev/sda /dev/sdb Type
/dev/md1    /boot /boot        Raid-1 (mirroring)
swap            swap           Normal partitions
/dev/md3    /     /            Raid-1 (mirroring)
/dev/md4    LVM2  volumes      Raid-0 (striped)


Code:
        /dev/sdc /dev/sdd Type
/dev/md5    LVM2  volumes      Raid-0 (striped)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 27783
Location: 56N 3W

PostPosted: Fri Feb 05, 2010 8:19 pm    Post subject: Reply with quote

remix,

This works for me :-
Code:
sudo /sbin/fdisk -l
Password:

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
Disk identifier: 0x0553caf4

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1           5       40131   fd  Linux raid autodetect
/dev/sdb2               6          70      522112+  82  Linux swap / Solaris
/dev/sdb4              71      121601   976197757+   5  Extended
/dev/sdb5              71         724     5253223+  fd  Linux raid autodetect
/dev/sdb6             725      121601   970944471   fd  Linux raid autodetect

/dev/sd[abcd] are all partitioned the same.

/dev/sd[abcd]1 are donated to a raid1 set for /boot.
You make the filesystem on the /dev/md... not on the individual members of the raid.
/dev/sd[abcd]5 is raid 5 for root
/dev/sd[abcd]6 is LVM for everything else. In grub.conf I have
Code:
default 0
timeout 30
splashimage=(hd0,0)/boot/grub/splash.xpm.gz

#2.6.32-gentoo-r1
title=Kernel 2.6.32-gentoo-r1 (hd0)
root (hd0,0)
kernel (hd0,0)/2.6.32-gentoo-r1 root=/dev/md5 vga=0x317 video=vesafb:mtrr:3,ywrap

title=Kernel 2.6.32-gentoo-r1 (hd1)
root (hd1,0)
kernel (hd1,0)/2.6.32-gentoo-r1 root=/dev/md5
note that the two booting stanzas load the kernel from different members of the raid1 boot, *but* as /boot is raid1 it is only copied to /boot once which puts it on each part of the mirror. (grub ignores raid).

You need to have a kernel at /boot/2.6.32-gentoo-r1 for grub to find.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
remix
l33t
l33t


Joined: 28 Apr 2004
Posts: 768
Location: hawaii

PostPosted: Fri Feb 05, 2010 10:57 pm    Post subject: Reply with quote

hi NeddySeagoon,

that's what i have, except

root (hd0,0)
kernel /boot/2.6.31-gentoo-r5 root=/dev/md3


works for me, as in, in loads the kernel just fine, my problem is when the kernel loads, it doesn't autodetect my raid5.

could you please share your kernel config? is there a special kernel version that i must use?

thanks for your help
_________________
RemixTechnology.com
help the needy
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7301
Location: Groton, Massachusetts USA

PostPosted: Sat Feb 06, 2010 12:54 am    Post subject: Reply with quote

Do your arrays have version 0.9 superblocks ?

I don't think the kernel's autodetection works with version 1.x superblocks.
Code:
# mdadm --detail /dev/md0
/dev/md0:
        Version : 0.90
  Creation Time : Wed Dec  9 19:55:36 2009
     Raid Level : raid0
     Array Size : 585937024 (558.79 GiB 600.00 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 0
    Persistence : Superblock is persistent

    Update Time : Wed Dec  9 19:55:36 2009
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

     Chunk Size : 64K

           UUID : fd3e170c:04dfbe17:c44c77eb:7ee19756
         Events : 0.1

    Number   Major   Minor   RaidDevice State
       0       8        1        0      active sync   /dev/sda1
       1       8       17        1      active sync   /dev/sdb1
Back to top
View user's profile Send private message
remix
l33t
l33t


Joined: 28 Apr 2004
Posts: 768
Location: hawaii

PostPosted: Sat Feb 06, 2010 3:08 am    Post subject: Reply with quote

yes 0.9

Code:
livecd ~ # mdadm --detail /dev/md1
/dev/md1:
        Version : 0.90
  Creation Time : Fri Feb  5 07:26:30 2010
     Raid Level : raid1
     Array Size : 40064 (39.13 MiB 41.03 MB)
  Used Dev Size : 40064 (39.13 MiB 41.03 MB)
   Raid Devices : 4
  Total Devices : 4
Preferred Minor : 1
    Persistence : Superblock is persistent

    Update Time : Fri Feb  5 11:36:07 2010
          State : clean
 Active Devices : 4
Working Devices : 4
 Failed Devices : 0
  Spare Devices : 0

           UUID : fb2a6634:e21dfaac:f5ad6568:b3c941cd
         Events : 0.34

    Number   Major   Minor   RaidDevice State
       0       8        1        0      active sync   /dev/sda1
       1       8       17        1      active sync   /dev/sdb1
       2       8       33        2      active sync   /dev/sdc1
       3       8       49        3      active sync   /dev/sdd1


livecd ~ # mdadm --detail /dev/md3
/dev/md3:
        Version : 0.90
  Creation Time : Fri Feb  5 07:27:04 2010
     Raid Level : raid5
     Array Size : 78678144 (75.03 GiB 80.57 GB)
  Used Dev Size : 26226048 (25.01 GiB 26.86 GB)
   Raid Devices : 4
  Total Devices : 4
Preferred Minor : 3
    Persistence : Superblock is persistent

    Update Time : Fri Feb  5 11:36:07 2010
          State : clean
 Active Devices : 4
Working Devices : 4
 Failed Devices : 0
  Spare Devices : 0

         Layout : left-symmetric
     Chunk Size : 64K

           UUID : a7d0a026:0e7511f9:4bd8bf4b:5cec9d32
         Events : 0.218

    Number   Major   Minor   RaidDevice State
       0       8        3        0      active sync   /dev/sda3
       1       8       19        1      active sync   /dev/sdb3
       2       8       35        2      active sync   /dev/sdc3
       3       8       51        3      active sync   /dev/sdd3

_________________
RemixTechnology.com
help the needy
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 27783
Location: 56N 3W

PostPosted: Sat Feb 06, 2010 11:07 am    Post subject: Reply with quote

remix,

Here are some of my kernel configs They are all gentoo-sources, even though the names differ.

As your other thread talks about dmraid and turning on raid in the BIOS, which raid system are you using. Pick just one.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7301
Location: Groton, Massachusetts USA

PostPosted: Sun Feb 07, 2010 2:44 pm    Post subject: Reply with quote

I guess the one thing that remains is to make sure your kernel has the correct driver(s) needed to access the controller(s) that your individual harddrives are plugged into.

If the kernel doesn't see the drives, then the kernel will not be able to assemble the array(s).
Back to top
View user's profile Send private message
remix
l33t
l33t


Joined: 28 Apr 2004
Posts: 768
Location: hawaii

PostPosted: Tue Feb 09, 2010 11:17 pm    Post subject: Reply with quote

Thanks Neddy. i wanted to use your kernel configs, and before i could complete emerging your kernel version(s) i get kernel panics from the raid Pid:7102, comm: md3_raid5 Not tainted 2.6.30-gentoo-r5 #1 System Product Name

so i rebuilt the raid using mdraid --create and reformatted the raid device in ext3
and when i extrated the stage tarball into it, i got another kernel panic.

so i rebuilt it again, and i was able to go all the way into chrooting, and i wasn't able to even emerge or build a kernel before getting a kernel panic.

is this a serious problem ?

is there a way to fix this or did i just waste hundreds of bucks on brand new 1TB drives :(
_________________
RemixTechnology.com
help the needy
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 27783
Location: 56N 3W

PostPosted: Wed Feb 10, 2010 8:56 pm    Post subject: Reply with quote

remix,

I don't see it being a CD or a hard drive issue - I put some advice in your other thread.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
eccerr0r
Advocate
Advocate


Joined: 01 Jul 2004
Posts: 2354
Location: USA

PostPosted: Thu Feb 11, 2010 11:56 pm    Post subject: Reply with quote

I use a 4-disk RAID5, boot-off-same disks (4-way RAID1).

I'm currently using the old ATA drivers. This way works well, my software md RAID5 root is autodetected.

What I'm currently fearing when I do migrate to SATA is similar to the issue with root USB disks - whether the SATA disks will enumerate in time before it checks for LVM/md partitions -- in this case, the only way to ensure that it detects in the right order is through initrd... Looking at your dmesg, is it autosearching for raid disks before all the SATA disks are detected?
_________________
Core2Quad 9550S/4GB/4x500G RAID5/RadeonHD 5770
What the heck am I advocating?
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7301
Location: Groton, Massachusetts USA

PostPosted: Sat Feb 13, 2010 12:46 am    Post subject: Reply with quote

eccerr0r wrote:
What I'm currently fearing when I do migrate to SATA is similar to the issue with root USB disks - whether the SATA disks will enumerate in time before it checks for LVM/md partitions ...

I have never encountered this problem with my RAID installations, but I have had a problem when the SATA disks were not enumerated at all due to missing drivers.
Back to top
View user's profile Send private message
tp11235
n00b
n00b


Joined: 22 Aug 2006
Posts: 35
Location: England

PostPosted: Sat Feb 20, 2010 10:54 am    Post subject: GRUB stage 1_5 and striping root Reply with quote

Hope you don't mind me joining in, but this thread seems very relevant to my problem.

I have run Gentoo for a few years now, but this is my first venture into software RAID. I get as far as the reboot but GRUB hangs with "GRUB Stage 1_5" on the screen.

My setup is as follows:

Disk /dev/sda: 164.7 GB, 164696555520 bytes
255 heads, 63 sectors/track, 20023 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x552b1665

Device Boot Start End Blocks Id System
/dev/sda1 * 1 9 72261 83 Linux
/dev/sda2 10 141 1060290 82 Linux swap / Solaris
/dev/sda3 142 20023 159702165 fd Linux raid autodetect

Disk /dev/sdb: 164.7 GB, 164696555520 bytes
255 heads, 63 sectors/track, 20023 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xa78dab71

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 9 72261 83 Linux
/dev/sdb2 10 141 1060290 82 Linux swap / Solaris
/dev/sdb3 142 20023 159702165 fd Linux raid autodetect

I know that having root on a RAID0 is "not recommended". My first question is whether this is because it is dangerous (not an issue for me on this machine) or because it does not work at all.

The following shows me bringing my array back to life after a reboot during installation:

livecd ~ # mknod /dev/md1 b 9 1
livecd ~ # mknod /dev/md3 b 9 3
livecd ~ # mdadm -A /dev/md1 /dev/sda1 /dev/sdb1
mdadm: /dev/md1 has been started with 2 drives.
livecd ~ # mdadm -A /dev/md3 /dev/sda3 /dev/sdb3
mdadm: /dev/md3 has been started with 2 drives.
livecd ~ # vgscan --mknodes
Reading all physical volumes. This may take a while...
Found volume group "vg" using metadata type lvm2
livecd ~ # vgchange -a y
1 logical volume(s) in volume group "vg" now active
livecd ~ # mount /dev/vg/topsy /mnt/gentoo
livecd ~ # mount /dev/md1 /mnt/gentoo/boot
livecd ~ # lvs
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
topsy vg -wi-ao 304.00g
livecd ~ # vgs
VG #PV #LV #SN Attr VSize VFree
vg 1 1 0 wz--n- 304.61g 620.00m

/dev/md1 is RAID1 and /dev/md3 is RAID0


This is my FSTAB

/dev/md1 /boot ext2 noauto,noatime 1 2
/dev/vg/topsy / ext3 noatime 0 1
/dev/sda2 none swap sw,pri=1 0 0
/dev/sdb2 none swap sw,pri=1 0 0

/dev/cdrom /mnt/cdrom auto noauto,ro 0 0


This is my grub.conf

default 0
timeout 30
splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title Gentoo Linux 2.6.24-r6 (hd0)
root (hd0,0)
kernel /boot/kernel-2.6.31-gentoo-r6 root=/dev/vg/topsy

title Gentoo Linux 2.6.24-r6 (hd1)
root (hd1,0)
kernel /boot/kernel-2.6.31-gentoo-r6 root=/dev/vg/topsy

I have been following the Gentoo LVM2 Installation Guide at http://www.gentoo.org/doc/en/lvm2.xml as well as the quickstart guide http://www.gentoo.org/doc/en/gentoo-x86+raid+lvm2-quickinstall.xml.

I made up the bit in grub.conf with the root=/dev/vg/topsy because it seemed likely that it needed to refer to the logical volume rather than the /dev/md3 device node. I tried both.

I saw some stuff about deleting the 1_5 bits from grub - but I really need to understand more about how grub works with a raid. I get that /boot and so GRUB has to be in RAID1 because the BIOS can only read unstriped. Then GRUB needs the kernel in the same unstriped partition. However, can the kernel then read config files in root on a striped partition from the outset so that it can start the system?

I emerged LVM2, mdadm and set the appropriate options when I compiled the kernel.

Any help and advice gratefully received.

Regards

Tim.
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7301
Location: Groton, Massachusetts USA

PostPosted: Sun Feb 21, 2010 12:25 am    Post subject: Re: GRUB stage 1_5 and striping root Reply with quote

tp11235 wrote:
I know that having root on a RAID0 is "not recommended"...

Root on RAID0 works fine on several of my machines.

tp11235 wrote:
I made up the bit in grub.conf with the root=/dev/vg/topsy because it seemed likely that it needed to refer to the logical volume rather than the /dev/md3 device node. I tried both.

I have not played around with LVM, but from what I know, you will need an initrd/initramfs if you want root on a logical volume.

tp11235 wrote:
I saw some stuff about deleting the 1_5 bits from grub ...

This probably doesn't relate to your issue, unless your drives are plugged into a Highpoint (fake)RAID controller.

tp11235 wrote:
but I really need to understand more about how grub works with a raid.

grub-legacy doesn't understand RAID at all.
grub2 can understand MDRAID and LVM.

tp11235 wrote:
I get that /boot and so GRUB has to be in RAID1 because the BIOS can only read unstriped. Then GRUB needs the kernel in the same unstriped partition. However, can the kernel then read config files in root on a striped partition from the outset so that it can start the system?

The kernel can only read config files *after* the array(s) and/or logical volumes are up and running (this is why you need an initrd for LVM).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum