Skip to contentSkip to conversation

Software Raid 5 work on ROOT ?

DISCUSSION [email protected] 5 participants 6 messages Sep 4, 2009 – Sep 9, 2009 MD RAID

lore
Share & tools
lore
#0 lore raw

Hello every body.

I have a question in regard of booting linux under a raid 5. It is possible ? All the guides that I found on the net say to have a /boot not stripped, (raid1 is ok). [EX: http://www.gentoo.org/doc/en/gentoo-x86+raid+lvm2-quickinstall.xml
]

They say to have / not stripped too. And these guide show to have an raid 1 boot and / and create a LVM volume for /usr /opt /var /whatever that can be raid 5. It is not easiest to have directly / in raid 5 format ?
If it's possible I would prefere to have raid 5 /
There any particular configuration for grub to boot it?

Thanks in advance.

#1 lore raw
Quoted 8 lines · On Fri, 4 Sep 2009, [email protected] wrote:

Hello every body.

I have a question in regard of booting linux under a raid 5. It is possible ? All the guides that I found on the net say to have a /boot not stripped, (raid1 is ok). [EX: http://www.gentoo.org/doc/en/gentoo-x86+raid+lvm2-quickinstall.xml
]

They say to have / not stripped too.

No. That document only says "The partition you boot from must not be striped". If you have a non-striped /boot, then that fulfils that qualification, as long as your /boot also contains an initrd that is able to bring your RAID5 / online.

Note that GRUB doesn't know how to boot from a RAID1 mirror; it just boots from one component of the mirror.

Best Regards,
Alex

#2 lore raw
In reply to [email protected]
Quoted 7 lines · On Fri Sep 04, 2009 at 12:19:23PM +0200, [email protected] wrote:

Hello every body.

I have a question in regard of booting linux under a raid 5. It is possible ? All the guides that I found on the net say to have a /boot not stripped, (raid1 is ok). [EX: http://www.gentoo.org/doc/en/gentoo-x86+raid+lvm2-quickinstall.xml
]

That's correct, yes. Grub looks at the individual partition, so needs to see a full filesystem on there.

Quoted 5 lines

They say to have / not stripped too. And these guide show to have an raid 1 boot and / and create a LVM volume for /usr /opt /var /whatever that can be raid 5. It is not easiest to have directly / in raid 5 format ?
If it's possible I would prefere to have raid 5 /

There's certainly no problem with / being RAID-5 (or any other RAID format). You'll need the necessary RAID modules either built into the kernel or in the initrd of course.

Quoted 2 lines

There any particular configuration for grub to boot it?

Not for RAID-1, no. You just point grub at the raw partition (rather than the array) and it'll treat it as a non-RAID disk and be quite happy.

HTH,
Robin

Signature · 4 lines
     ___        
    ( ' }     |       Robin Hill        <[email protected]> |
   / / )      | Little Jim says ....                            |
  // !!       |      "He fallen in de water !!"                 |
#3 lore raw
In reply to [email protected]

The way I worked around this is to boot off of a USB stick.
So grub is installed on the USB stick, reads the kernel and the initrd from it, the initrd brings up the disk, the raid, the dm-crypt and the lvm, mounts / from the lvm and boots it. Kind regards,

----- Message from [email protected] ---------

    Date: Fri, 04 Sep 2009 12:19:23 +0200
    From: [email protected]

Subject: Software Raid 5 work on ROOT ?
To: [email protected]

Quoted 13 lines

Hello every body.

I have a question in regard of booting linux under a raid 5. It is possible ? All the guides that I found on the net say to have a /boot not stripped, (raid1 is ok). [EX: http://www.gentoo.org/doc/en/gentoo-x86+raid+lvm2-quickinstall.xml
]

They say to have / not stripped too. And these guide show to have an raid 1 boot and / and create a LVM volume for /usr /opt /var /whatever that can be raid 5. It is not easiest to have directly / in raid 5 format ?
If it's possible I would prefere to have raid 5 /
There any particular configuration for grub to boot it?

Quoted 7 lines

Thanks in advance.

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

----- End message from [email protected] -----

========================================================================
# _ __ _ __ http://www.nagilum.org/ \n icq://69646724 #
# / |/ /__ ____ _(_) /_ ____ _ [email protected] \n +491776461165 #
# / / _ / _ / / / // / ' \ Amiga (68k/PPC): AOS/NetBSD/Linux #
# /_/|_/\_,_/\_, /_/_/\_,_/_/_/_/ Mac (PPC): MacOS-X / NetBSD /Linux #
# /___/ x86: FreeBSD/Linux/Solaris/Win2k ARM9: EPOC EV6 #
========================================================================

----------------------------------------------------------------
cakebox.homeunix.net - all the machine one needs..

#4 lore raw

I was able to install & boot Slamd64 (a 64-bit port of Slackware) with raid5 directly. I wrote a HOWTO on Slamd64's forums, but I can't access them now, but luckily I wrote a copy of my own:
http://mbhtech.blogspot.com/2008/01/raid-expansion-and-beauty-of-xfs.html

You'll need to put separate /boot from the rest, and I don't know whether this works with grub or not; I used LILO.

I faced one problem a few months back where the array broke (one disk jumped out) and I couldn't access my system at all, because the system wouldn't boot from a degraded array. I had to put the installation CD and fix it from there.

Maybe if I had compiled busybox into the kernel, I would've saved myself some trouble. Also, I read a few days back that you could pass a parameter to the kernel to make it boot a degraded array. I don't remember where or what the syntax was unfortunately.

I hope this helps!

P.S.: I'd skip LVM. I've been speed-testing it lately and its performance is quite crippling. The read speed of the array directly is 125 MB/s, while the Logical Volume reads at 43 MB/s only!

2009/9/8 Nagilum <[email protected]>:

Quoted 57 lines

The way I worked around this is to boot off of a USB stick.
So grub is installed on the USB stick, reads the kernel and the initrd from it, the initrd brings up the disk, the raid, the dm-crypt and the lvm, mounts / from the lvm and boots it.
Kind regards,

----- Message from [email protected] ---------
   Date: Fri, 04 Sep 2009 12:19:23 +0200
   From: [email protected]
 Subject: Software Raid 5 work on ROOT ?
     To: [email protected]

Quoted 18 lines

Hello every body.

I have a question in regard of booting linux under a raid 5. It is possible ?
All the guides that I found on the net say to have a /boot not stripped, (raid1
is ok). [EX:
http://www.gentoo.org/doc/en/gentoo-x86+raid+lvm2-quickinstall.xml
]

They say to have / not stripped too. And these guide show to have an raid 1 boot
and / and create a LVM volume for /usr /opt /var /whatever that can be raid 5.
It is not easiest to have directly / in raid 5 format ?
If it's possible I would prefere to have raid 5 /
There any particular configuration for grub to boot it?

Quoted 7 lines

Thanks in advance.

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

----- End message from [email protected] -----

========================================================================
#    _  __          _ __     http://www.nagilum.org/ \n icq://69646724 # #   / |/ /__ ____ _(_) /_ ____ _  [email protected] \n +491776461165 # #  /    / _ / _ / / / // /  ' \  Amiga (68k/PPC): AOS/NetBSD/Linux   # # /_/|_/\_,_/\_, /_/_/\_,_/_/_/_/   Mac (PPC): MacOS-X / NetBSD /Linux # #           /___/     x86: FreeBSD/Linux/Solaris/Win2k  ARM9: EPOC EV6 #
========================================================================

----------------------------------------------------------------
cakebox.homeunix.net - all the machine one needs..

Signature · 5 lines
       Majed B.
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#5 lore raw

I have a rescue system on the same USB stick (it's 1GB). So I can have a full linux system to debug my RAID if there should be problems.
For me LVM doesn't really make any difference the limiting factor is dmcrypt. Still the RAID5 with LVM+crypto+xfs does ~100MB/s sequential reading. (>300MB/s from md0 directly) That's more than I need. Kind regards,

----- Message from [email protected] ---------
Date: Tue, 8 Sep 2009 15:36:53 +0300
From: "Majed B." <[email protected]>
Subject: Re: Software Raid 5 work on ROOT ?
To: Nagilum <[email protected]>
Cc: [email protected], [email protected]

Quoted 18 lines

I was able to install & boot Slamd64 (a 64-bit port of Slackware) with raid5 directly. I wrote a HOWTO on Slamd64's forums, but I can't access them now, but luckily I wrote a copy of my own:
http://mbhtech.blogspot.com/2008/01/raid-expansion-and-beauty-of-xfs.html

You'll need to put separate /boot from the rest, and I don't know whether this works with grub or not; I used LILO.

I faced one problem a few months back where the array broke (one disk jumped out) and I couldn't access my system at all, because the system wouldn't boot from a degraded array. I had to put the installation CD and fix it from there.

Maybe if I had compiled busybox into the kernel, I would've saved myself some trouble. Also, I read a few days back that you could pass a parameter to the kernel to make it boot a degraded array. I don't remember where or what the syntax was unfortunately.

Quoted 41 lines

I hope this helps!

P.S.: I'd skip LVM. I've been speed-testing it lately and its performance is quite crippling. The read speed of the array directly is 125 MB/s, while the Logical Volume reads at 43 MB/s only!

2009/9/8 Nagilum <[email protected]>:

Quoted 33 lines

The way I worked around this is to boot off of a USB stick.
So grub is installed on the USB stick, reads the kernel and the initrd from it, the initrd brings up the disk, the raid, the dm-crypt and the lvm, mounts / from the lvm and boots it.
Kind regards,

----- Message from [email protected] ---------
   Date: Fri, 04 Sep 2009 12:19:23 +0200
   From: [email protected]
 Subject: Software Raid 5 work on ROOT ?
     To: [email protected]

Quoted 20 lines

Hello every body.

I have a question in regard of booting linux under a raid 5. It is possible ?
All the guides that I found on the net say to have a /boot not stripped, (raid1
is ok). [EX:
http://www.gentoo.org/doc/en/gentoo-x86+raid+lvm2-quickinstall.xml
]

They say to have / not stripped too. And these guide show to have an raid 1 boot
and / and create a LVM volume for /usr /opt /var /whatever that can be raid 5.
It is not easiest to have directly / in raid 5 format ?
If it's possible I would prefere to have raid 5 /
There any particular configuration for grub to boot it?

Thanks in advance.

----- End message from [email protected] -----

========================================================================
# _ __ _ __ http://www.nagilum.org/ \n icq://69646724 #
# / |/ /__ ____ _(_) /_ ____ _ [email protected] \n +491776461165 #
# / / _ / _ / / / // / ' \ Amiga (68k/PPC): AOS/NetBSD/Linux #
# /_/|_/\_,_/\_, /_/_/\_,_/_/_/_/ Mac (PPC): MacOS-X / NetBSD /Linux #
# /___/ x86: FreeBSD/Linux/Solaris/Win2k ARM9: EPOC EV6 #
========================================================================

----------------------------------------------------------------
cakebox.homeunix.net - all the machine one needs..
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html