Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
grub + raid. I'm all mixed up :(
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
tecknojunky
Veteran
Veteran


Joined: 19 Oct 2002
Posts: 1937
Location: Montréal

PostPosted: Fri Sep 23, 2005 3:55 pm    Post subject: grub + raid. I'm all mixed up :( Reply with quote

I have two 3Ware Raid controllers with 8 ports each. So far, I only have 6 drives to put in, so only one controller is used for the moment.

What's mixing me up is that everywhere you look for information, you find "software raid" this, "bios raid" that, ... Are the 3Ware I have count into any of those sets?

My question is pretty simple. So far, it would seem that the kernel see the raid array has /dev/sdb. The 3ware controller automatically will show the drive on first port as a stand alone drive and that's where I installed gentoo, which is seen by the kernel as /dev/sda.

I've been struggling to achieve to put the whole system into the raid array, and when done, flag the stand alone drive as a hot swap in case any other drive fail.

So far, I have mirrored /dev/sda to /dev/sdb and I can boot the root filesystem on /dev/sdb3. Now, I'd like to tell grub to boot from /dev/sdb1 (hd0,0) as /boot, but it stubburnly always boot from /dev/sda1 (hd0,0).

I did do grub-install /dev/sdb1, no error, but still keeps booting from (hd0,0).

Can grub boot from /dev/sdb1 (hd1,0)?
_________________
(7 of 9) Installing star-trek/species-8.4.7.2::talax.
Back to top
View user's profile Send private message
zbindere
Guru
Guru


Joined: 27 May 2004
Posts: 356
Location: Switzerland

PostPosted: Fri Sep 23, 2005 4:21 pm    Post subject: Reply with quote

is the boot partition on a raid, if yes raid 0 or another raid.
you can only boot from a raid 0 device, the grub cannot read from all other raids.
Back to top
View user's profile Send private message
tecknojunky
Veteran
Veteran


Joined: 19 Oct 2002
Posts: 1937
Location: Montréal

PostPosted: Fri Sep 23, 2005 5:36 pm    Post subject: Reply with quote

I'm using raid5 I think. The one for which you can have exactly one drive fail and recover its data from all the other drives.

So, raid-5 exist fro some while. How is it that Grub can't use it? Let me guess... drivers?

So, I'm screwed then.
_________________
(7 of 9) Installing star-trek/species-8.4.7.2::talax.
Back to top
View user's profile Send private message
tecknojunky
Veteran
Veteran


Joined: 19 Oct 2002
Posts: 1937
Location: Montréal

PostPosted: Fri Sep 23, 2005 7:49 pm    Post subject: Reply with quote

Ok, it works. All I did was to remove the drive that was out of the array and the raid5 array became /dev/sda, or (hd0,0). I then could configure grub in the mbr to use that array instead and, sure enough, it worked.

So it is not true that Grub can boot from only raid-0. :roll:
_________________
(7 of 9) Installing star-trek/species-8.4.7.2::talax.


Last edited by tecknojunky on Tue Sep 27, 2005 10:20 am; edited 1 time in total
Back to top
View user's profile Send private message
zbindere
Guru
Guru


Joined: 27 May 2004
Posts: 356
Location: Switzerland

PostPosted: Mon Sep 26, 2005 6:51 pm    Post subject: Reply with quote

grub cannot read form raid5 because raid5 stripes the data all over discs. you can use raid 0 which mirrors the data between two drives and grub can read from one like there is no raid. striping is the problem here.
Back to top
View user's profile Send private message
widan
Veteran
Veteran


Joined: 07 Jun 2005
Posts: 1512
Location: Paris, France

PostPosted: Mon Sep 26, 2005 9:44 pm    Post subject: Reply with quote

tecknojunky wrote:
So it is not true Grub can boot from only raid-0. :roll:

Grub can boot from hardware RAID (any level the card can do: 0, 1, 5, ...) like the 3ware controllers. This is also usually true of BIOS RAID (the fake RAID controllers on some motherboards). Those work because there is software loaded (as part of the card's BIOS - or the system BIOS for fake RAID) that is able to handle the array at boot time, and give a "virtual" drive to the bootloader.

Grub is limited only on software RAID. In that case it can only boot from RAID1 (and not RAID0 !) since the required software to run software arrays is not loaded at the time grub runs. It would probably be possible to handle booting from the other software RAID modes, but usually you don't need it (you just make a /boot partition using RAID1, or you put /boot on another drive, or on a CF card, ...), so it's not really worth it.
zbindere wrote:
you can use raid 0 which mirrors the data between two drives

Mirroring is RAID1, not RAID0 (RAID0 also stripes data - and has no redundancy, so it's not really RAID...)
Back to top
View user's profile Send private message
tecknojunky
Veteran
Veteran


Joined: 19 Oct 2002
Posts: 1937
Location: Montréal

PostPosted: Tue Sep 27, 2005 10:18 am    Post subject: Reply with quote

I guess the point I was trying to make is that all the howtos about raid don't make much efforts in dicyphering the differences between software raid and hardware raid.

When you deal with raid for the first time, like I was, it can take a lot of time to understand how the hardware, the bios, the bootloader and the os intermixes with it.

For one, at first, the 3ware controller I use automagicaly set asides the first drive as a stand alone drive. So, when I installed Gentoo, the way I always knew how to do it, it ended up in that drive and not on the raid drive.

Then, realising my mistake, you gather howtos about raid, and that's where, for the first time, I ended up more mixed up than when I started after reading them.

Anyhow, I learned how to use genkernel and creating a initrd, even though I don't really need it. I'm more knowledgeable that before with raid. I will definatly buy a hardware raid controller when I get my own... seems so much more easier to set up, and is supposedly more performant.

Bottom line, with hardware raid, grub can boot from any partition inside the array. :D
_________________
(7 of 9) Installing star-trek/species-8.4.7.2::talax.
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
Page 1 of 1

 
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