Dual Boot RAID Windows and Linux

Booting Up

Booting Up
Your dual-boot dual-RAID system is almost complete. Similar to the boot issue, the loading of the MD driver to assemble RAID arrays is also a bit of a chicken and egg.. How can you boot your root partition off the RAID array if the configuration for arrays is stored in the /etc/raidtab or /etc/mdadm.conf files? No problem! The MD driver is capable of assembling arrays on the fly. Add the following to your kernel statement in the boot loader:

md=0,04,0,/dev/sda2,/dev/sdb2
root=/dev/md0

The first value is the MD array number, the second is the RAID level, the third a logarithmic base 2 value offset by 12 (yeah easy lol) representing the chunk size, and the fourth is merely a compatability value. The last two, of course, are the array constituents. Now, RAID partitions sport a spiffy 'RAID autodetect' flag ('fd') on the partition so MD can detect and build arrays on the fly...but!!! It depends on how your array was originally built with a persitent superblock or not. And keep in mind that Linux fdisks can't read LMD partitions (because it needs to access disks directly), and so can't set this flag for you. All fdisk sees are the Windows LDM container partitions. Regardless, you don't need to rely on this when you can specify the array components at the command line and always ensure that the right partitions are constructed accordingly. Well, that's pretty much it. You can boot Windows through the boot menu (if your installer didn't do this for you, great for adding an NT boot loader to it) and of course linux. Windows will boot off a single drive, but Program Files and everything else (such as games) can be installed to the RAID partition (D: drive). Linux has its kernel stored/loaded on a single drive in /boot, but loads the root from /dev/md0.

Additional Information on chunk or stripe
Usually RAID 0 devices are referenced by the size of the information that's literally 'striped' across the drives in your array. Most onboard RAID controllers and Windows refer to this block of information as the stripe size. The default stripe size for a software RAID array under Windows is 128KB. Linux does things a little differently. In Linux, MD devices are configured with a chunk size. This isn't merely another name for the same thing. For the MD driver, data is striped across drives in chunk size, so for example a 64KB over two drives under Linux is the equivalent of a two-drive 128KB stripe array under Windows. Which is why you use the 64KB setting to mount your 128KB stripe NTFS RAID 0 array. If you don't mind playing with your data this can actually be seen by running and mounting your Windows software RAID 0 array with a chunk size near but not exact to the default - for example, using a 32KB or 128KB chunk size. Some parts of the directory structure will be perfectly visible (and accessible), while others will generate read errors (namely, those files that would be striped). It's a fun insight into RAID. Well, welcome to dual-boot, RAID 0 goodness. It's a little fiddly the first time, but once you're aware of LDM and confident to specify your arrays at the command line, it's pretty simple.
Lemme know what speed your getting from Sandra and hdparm.

Big thanks goes out to Slashdot and A. Mills for their assistance and knowledge.
«Prev 1 2 3 Next»

Most Recent Comments

22-02-2006, 05:13:44

PV5150
Phew done Quote

22-02-2006, 05:29:09

FarFarAway
Umm....

The guide king strikes again

Quote

22-02-2006, 06:19:28

PV5150
Thanks kemp Quote

22-02-2006, 06:45:58

JN
Nice, Nice, Nice Quote

22-02-2006, 09:12:11

FragTek
mate I wish I could toss ya some reps for that one! Quote
Reply
x

Register for the OC3D Newsletter

Subscribing to the OC3D newsletter will keep you up-to-date on the latest technology reviews, competitions and goings-on at Overclock3D. We won't share your email address with ANYONE, and we will only email you with updates on site news, reviews, and competitions and you can unsubscribe easily at any time.

Simply enter your name and email address into the box below and be sure to click on the links in the confirmation emails that will arrive in your e-mail shortly after to complete the registration.

If you run into any problems, just drop us a message on the forums.