Radified Community Forums
http://radified.com/cgi-bin/yabb2/YaBB.pl
Rad Community Technical Discussion Boards (Computer Hardware + PC Software) >> PC Hardware + Software (except Cloning programs) >> Dual-boot systems with RAID?
http://radified.com/cgi-bin/yabb2/YaBB.pl?num=1284391533

Message started by Electricat on Sep 13th, 2010 at 10:25am

Title: Dual-boot systems with RAID?
Post by Electricat on Sep 13th, 2010 at 10:25am
Hello--

I have a question that so far, I can't answer to my satisfaction. Is it possible to create a RAID array and then create multiple partitions that would allow
installation of two or more operating systems and a multi-boot loader?

My hunch is that it's not possible because the multi-boot loader would confuse the RAID striping process, but I don't have any hard evidence either way.

Thanks in advance for your comments.

Title: Re: Dual-boot systems with RAID?
Post by Rad on Sep 13th, 2010 at 10:48am
i think magoo is a raid guy. i'll send him an email.

Title: Re: Dual-boot systems with RAID?
Post by MrMagoo on Sep 13th, 2010 at 5:31pm
Yes, it can be done.  The method of doing it depends on what kind of raid you are using.

If you are using hardware raid, which is usually only the case in high performance systems, you don't have to do anything special.  The hardware device takes care of all the raid functions, and presents a single logical disk to the computer.

If you are using some sort of software raid, like the raid provided by the Linux kernel, then you can't access the raid devices until the OS is already loaded.  So, you have to have at least one disk partition that the bootloader can read.  There are a few options - you can have one disk, or even just a single partition, that isn't part of the raid array.  You can install the bootloader and boot files (the /boot directory in linux) onto that disk/partition.  Once the bootloader loads and executes the kernel, the kernel can mount the raid devices.

If you happen to be using raid1 instead of raid 0/5/10/... then there is another option.  Since the drives are just mirrored copies of each other, you can install the bootloader on either drive.  Both drives should be perfectly readable by the bootloader, which can execute the kernel.  Once the kernel is loaded, it can remount the drive in the raid array.

I successfully ran in the former configuration with raid0 for a few years.  It took a few tries to get the partitioning right, but it worked like a charm once I got it going.

One last thing to keep in mind - If you have a desktop motherboard that claims to have raid support, it is almost always "fake raid" or hardware assisted raid, not true hardware raid.  It requires some drivers in the OS to make it fully work.  You'll need to use one of the software raid methods above, since it doesn't work like true hardware raid.

Title: Re: Dual-boot systems with RAID?
Post by Electricat on Sep 13th, 2010 at 9:06pm
Hello, MrMagoo--

Thank you for your explanation, which clarifies matters
considerably. The motherboard for this new system I'm
assembling has four SATA-2 ports, two SATA-3 ports
and two IDE ports (or it will have, as soon as I receive
the replacement mobo from NewEgg-- the original's
SATA-3 and -4 ports malfunctioned after the board
had been running for a couple of hours).

I had planned to run four 500 GB SATA drives in RAID 10
(via the BIOS). But from your description, it sounds as if I
could dedicate a separate, smaller-capacity IDE drive as
the dual-boot drive, or for that matter, I could use a USB
drive as the boot drive.

Forgive me if I make any obvious misstatements, as I'm
not very knowledgeable in this aspect of the art<g>.

Thanks again!

Title: Re: Dual-boot systems with RAID?
Post by MrMagoo on Sep 14th, 2010 at 1:35am
Sure, you could use a usb drive or an ide drive.  That would probably be simpliest in your situation.  Good luck and let us know how it goes.

Title: Follow-up Re: Dual-boot systems with RAID?
Post by Electricat on Sep 26th, 2010 at 12:53pm
This gets weirder and weirder. Using the AsRock Extreme 770 mobo's built-in AMD BIOS option, I configured a 1+0 RAID array at LD1, placing all four drives on line. [step 1]

I installed Win XP Pro, and when prompted by XP's setup routine I installed a RAID-specific driver obtained from the driver disk supplied with the motherboard. [step 2]

Win XP installed without further ado, and I then went online, downloaded Firefox, and rebooted the system.
Approximately 1 1/2 hours elapsed between initial power-on and what follows.

During the reboot, the BIOS reported a "critical" RAID problem. I reopened the AMD BIOS and discovered that the RAID array was now listed as being present at LD2 and offline. Drives 1, 3, and 4 were listed as "single drives" and "failed or disconnected", and drive 2 was listed as "offline".

I used a recent live-boot version of Ubuntu and checked the drives' S.M.A.R.T. status-- all four are healthy and accessible by Ubuntu.

Next, I repeated step 1 and rebooted, again opening the AMD BIOS to double-check that the array's status hadn't changed (it was).

I started from scratch and reinstalled Win XP (this is getting old, BTW) again without problems [step 2].

Next, I installed several motherboard device drivers and rebooted.

This time, the BIOS again reported a "critical" RAID problem. I reopened the AMD BIOS and discovered that the 1+0 RAID array was now listed as being present at LD3 and offline.

Drives 1, 2, and 4 were listed as "single drives" and "failed or disconnected, and drive 3 was listed as "offline".

This experience closely parallels what I encountered with my first AsRock motherboard, which I returned.

Based on what I've read in other forums, I believe that there's something seriously wrong with AMD's RAID BIOS and that it's unusable for RAID support. Given that one of the reasons I purchased this AsRock motherboard was its promise of RAID support, I feel justified in returning it for
credit and looking for another brand. If I can locate a hardware RAID card that doesn't use up one of the few PCI slots on this class of motherboards, I'll buy and try it.

I can't believe (well, yes I can) the amount of time I've spent chasing this problem-- at least, in this instance it's not Microsoft's fault<g>.

(Incidentally, I stumbled across a method for dual-booting Linux and Win 7 under RAID as described in Appendix 1-- not sure if this makes sense and I'm not about to try it until
I get a working motherboard!).

Best regards--
Electricat

**********
Appendix 1 follows:

Veerappan Veerappan is offline
Senior Member
 
Join Date: Nov 2008
Location: Boston, MA, USA
Posts: 149
Default

I can see that people feel a bit strongly about their positions on fakeraid here...

I figured I'd follow up and let everyone know my findings

First, my partition setup:
/dev/sd[ab]1 - Windows 7 - NTFS - ~40GB
/dev/sd[ab]2 - Ubuntu - Ext3 (or 4, don't remember) - ~40GB
/dev/sd[ab]3 - Data Drive - NTFS - ~560GB

If it was as simple as using Windows-based RAID on partition 1, and software raid on partition 2, I'd have been mildly tempted to do that. The data drive, which is shared between Windows and Linux, is another matter. That disk needs to be writable by both OSes without either corrupting the mirror. I have no clue if it's possible to convince both Windows and Linux to use their own respective software-RAID schemes on the same partition without them interfering with each other.

I did a bit of reading last night and determined that Ubuntu 10.04 supports dmraid on its desktop install disk, but my upgraded Ubuntu (originally 9.04) install didn't have dmraid installed. When I first tried to activate dmraid from the Ubuntu install CD, I got an error about "Error: dos: partition address past end of RAID device". It turns out that my partitions were created before the RAID1 array was created, and so /dev/sd*3 extended into the RAID controller metadata. I ended up doing steps 1-6 below to fix that.

Simplified list of steps taken (there were many dead-ends in the discovery process):
1) Destroy the RAID1 array in the BIOS. The data is left intact by the controller.
2) Boot from Ubuntu 10.04 install CD.
3) Use GPartEd to resize /dev/sda3 so that there's free space at the end of the drive. I had been encountering a dmraid error saying "Error: dos: partition address past end of RAID device". I avoided this by downsizing the partition.
4) Use dd to mirror /dev/sda to /dev/sdb
5) Reboot and re-enter the controller BIOS.
6) Recreate the RAID1 mirror with both drives as members.

7) Boot using Ubuntu 10.04 install CD.
8) Run 'sudo dmraid -ay' to get device mapper to add device mapper entries for RAID members to /dev/mapper.
9) Mount '/dev/mapper/pdc_*2' as /mnt/root. pdc_*2 should be substituted for whatever your linux root partition is in /dev/mapper/.
10) Bind /dev to /mnt/root/dev, and do similar with /sys and /proc. Also copy /etc/resolv.conf to /mnt/root/etc.
11) chroot to /mnt/root
12) apt-get install dmraid
13) If all goes well, the dmraid install will update your Grub2 grub.cfg to boot from the RAID device. If not, tweak /etc/grub.d/* and run update-grub manually.
14) Make sure that /etc/fstab mounts partitions by UUID, or that the device names are correct (/dev/mapper/* instead of /dev/sd*).
15) Reboot to OS of choice.
16) If you want to be sure about RAID mirror consistency, perform a Synchronization check from the Windows AMD RAIDXpert tool.


As to those who are arguing about performance drawbacks and such, I've had no problems with performance on this system so far. I am aware that read errors on the first drive can still bring the system down, but at least leave the second drive intact. In the future, I may consider a hardware RAID card, but for now, I'm only really interested in the redundancy aspect. I want to minimize my recovery time in the event of a hard drive crash, but I also perform semi-regular backups to an external disk.

Title: Re: Dual-boot systems with RAID?
Post by MrMagoo on Sep 28th, 2010 at 2:23am

Electricat wrote on Sep 26th, 2010 at 12:53pm:
I can't believe (well, yes I can) the amount of time I've spent chasing this problem

I did spend a lot of time getting my raid system right the first time.  It was a pain, but I wanted it to work the way I wanted.  After I got it working the first time, I understood enough to get it set up pretty quick whenever I wanted to redo it.




Electricat wrote on Sep 26th, 2010 at 12:53pm:
in this instance it's not Microsoft's fault

Partially.  If WindowsXP supported software raid natively, you wouldn't have to mess around with fake raid.  I've found software raid to be much easier to work with and didn't notice any performance penalty.

I did find this article that discusses hacking WindowsXP a little bit to get raid5 working:

http://www.tomshardware.com/reviews/windowsxp-make-raid-5-happen,925.html

I haven't ever tried anything like this in Windows and hacks like this seem to cause issues later with Windows update and such for me, but if you're adventurous, it might be worth a try.



Electricat wrote on Sep 26th, 2010 at 12:53pm:
If I can locate a hardware RAID card that doesn't use up one of the few PCI slots on this class of motherboards, I'll buy and try it.

Unless you also have PCIe, I'm not sure where you'd put a hardware raid card other than PCI.  I think you'll find hardware raid prohibitively expensive. 

If your budget can stomach hardware raid, then you should also consider ditching AsRock motherboards and get a decent Asus or Gigabyte.  They are both excellent brands for the price.  I don't have much experience with Intel chipsets, but I've had plenty of nVidia chipsets and have found NVRaid (nVidia's fake raid) to be stable.  I don't have much experience with AsRock, but if you can spend the cash to get hardware raid, then a high quality motherboard is well within  your budget and far more important to enjoying your computing experience.

In fact, if you have to choose between:

1. Nice motherboard, single fast hard drive, large secondary drive for backup

2. Cheaper motherboard, several cheaper hard drives, some raid solution

... then I'd get option 1.  The performance boost you'll get with slow disks in raid0 barely matches the performance of one fast drive. 

As far as raid1 goes, it is really intended for mission-critical systems.  The idea is that you can loose one HD and the system stays up (although with a performance penalty.)  A quick swap of the affected HD, and you are at full health (after the drive rebuilds, of course, which multiples your performance hit until it finishes.)  On a personal PC, taking it down for a few hours to replace a (non-raided) failed drive and restore from your latest backup isn't as much of an issue as it would be in a mission or business critical system. 

Keep in mind raid1 isn't a replacement for a good backup strategy.  Raid1 protects against a HD that suddenly fails, but it doesn't protect against data corruption from other bad components or complete system failure.  If your computer takes a power spike or your memory goes bad and bad data gets written to the raid array, or your house floods or burns, or the kids spill koolaid on it, then raid1 won't save you.  I don't know what your goals are with this system, but you may be better off building a system with high performance and stable parts rather than spending a bunch of time and money trying to force cheap components to try to be fast and stable. 

I raided a few HD's together in raid0 because I had them available, I wanted to learn how raid works, and I didn't have the money to upgrade my components so I was trying to improve what I had.  These days, I'm fortunate enough to have a system good enough that raid doesn't make sense in my desktop (although I still use it on my file sever, which runs Linux - CentOS for those interested.)

That's not to say that I'm trying to discourage you if you still think raid best serves the goals of this system you are building.  Let us know how it goes and I'm happy to help if you decide to press on.

Title: Re: Dual-boot systems with RAID?
Post by Electricat on Sep 28th, 2010 at 10:19pm
Hello--

Thank you for your advice. The better-grade of motherboard makes more sense than the path I was following. The tech-support person at AsRock wrote, "If you still getting the same issue with different board, then obviously is not the mainboard issue. Have you ever try reconfigure the RAID with different brand of HDs. If you already done that, and still running the same problem. Please return the mainbioard [sic], and go with different brand of mainboard. Sorry about the issue you are having."

Also, a friend found the following for me:

http://en.wikipedia.org/wiki/Time-Limited_Error_Recovery

Briefly, as I understand it, RAID is supposed to wait 8 seconds before declaring that there's a problem with a slow-to-respond drive. A CCTL-equipped drive sends an error message to the hardware RAID controller after 7 seconds, and the RAID controller goes to the redundant drive to retrieve the errant file. This process prevents RAID from kicking the "bad" drive offline.

So I wonder: if an operating system (Win XP) takes a long time to boot and load, and the software RAID software designers don't take the boot process into account, would that trigger the effect that I've seen? It's possible.

There's no information that I could find about the motherboard's RAID BIOS implementation and the Samsung drives that I'm using make no mention of incorporating CCTL.

This is turning into a bad detective novel-- the list of suspects keeps growing, and the guy with the smoking gun (the motherboard) was "just passing by and picked it
up out of curiosity"<g>.

Thanks again for your thoughtful comments, and I'll keep you posted on where I go from here.


Title: Re: Dual-boot systems with RAID?
Post by MrMagoo on Sep 29th, 2010 at 4:35am

Electricat wrote on Sep 28th, 2010 at 10:19pm:
Please return the mainbioard [sic], and go with different brand of mainboard. Sorry about the issue you are having."

Wow.  When a manufacturer's tech support suggests you return their product and go with another brand, that's really says something, doesn't it...?


Electricat wrote on Sep 28th, 2010 at 10:19pm:
if an operating system (Win XP) takes a long time to boot and load, and the software RAID software designers don't take the boot process into account, would that trigger the effect that I've seen?

Hmmm.  See, this is where fake raid gets complicated.  There's no way I know of to tell if the handover from BIOS to the Windows raid drivers has happened yet when you get the error.  I don't understand the inner workings of fake raid well enough to answer  your question. (Where is Nigel when you need him?  I'm sure he'd have a great explanation of how this is all working at the lower levels, but it's beyond me.)


Electricat wrote on Sep 28th, 2010 at 10:19pm:
the Samsung drives that I'm using make no mention of incorporating CCTL.

Whether they incorporate it or not, I don't think the drives are the issue.  I've had a few Samsung drives, and they performed just fine for me.


Electricat wrote on Sep 28th, 2010 at 10:19pm:
I'll keep you posted on where I go from here.

Please do and good luck!

Radified Community Forums » Powered by YaBB 2.4!
YaBB © 2000-2009. All Rights Reserved.