Jump to content

[How-to] Software RAID-0 in Mountain Lion on ICHx/JMicron/Marvell/ASMedia

RAID RAID-0 RAID0 BOOT OSX HOW-TO

  • Please log in to reply
25 replies to this topic

#1
eep357

eep357

    Triple Platinum

  • Supervisors
  • 2,527 posts
  • Gender:Male
  • Location:Dark Side of The Wall
  • Interests:things and stuff
This guide is for setting up Apple software RAID-0 on any SATA controller or combination of controllers that support booting into OSX. A few things to keep in mind, first being that I am not responsible for any loss of data, loss of hair, or hardware damages if they were to occur. RAID-0 is built for speed and that's about it, so if you care about data parity this is not for you. RAID-0 will stripe your data across 2 or more drives, which means if any one of them fails, you will loose your data. Time Machine or other backup is highly recommended.
While in the past RAID-0 helped to speed up the physical limitations caused by older rotational hard disks, on SSD drives with their faster read/write speeds, It is usually the SATA port of the controller that becomes the bottle neck, and splitting that bandwidth up can have dramatic results for some people. Picking which controller or controllers to use is a major factor in what your final results will be, and any controller that is buggy, ejects drives randomly or causes any headaches now, don't use it or you'll probably regret it. Although I don't recommend swapping your configured RAID array drives around to different ports, one benefit of software RAID is you can with little chance of a problem, unlike HW RAID where it's bound to that controller. So...

pre-setup:
First we need something to put onto our array once we make it, and using the Mountain Lion Installer to do a clean install to your RAID, will result in an installation failure when the installer complains about not being able to make a recovery partition on a RAID. I've been able to instead restore from a Time Machine backup onto the new array by booting into the Mountain Lion Installer, but others have received the same Recovery Partition error when trying this as well. You also wan't to only make your Mountain Lion RAID while booted into Mountain Lion, as Lion or older versions will not know how to properly make the kernel caches and the array will not be bootable. So you'll need an extra drive with Mountain Lion installed. Boot into that drive.

Let's-Go:
Build array in disk utility. When prompted, choose whatever block size you want to use, default value recommended.
Attached File  ST31500541AS Media-1.jpg   176.44KB   374 downloads
Here's how it should look, I enabled Disk Utility to show hidden partitions not normally visible.
Attached File  Mikuru-1.jpg   173.89KB   418 downloads
Now use CarbonCopyCloner or similar to clone your working Mountain Lion install over to the RAID array.
Chameleon will need to be installed to each drives hidden "boot OSX" partition along with /Extra on each and kernel cache will be built on each. OSX cannot boot without kernel cache, i.e. -f, or will get error "mach_kernel not found". In /Extra folder of each "boot OSX" partition, in org.chameleon.boot.plist, you must include additional kernel flag
rd=uuid boot-uuid="UUID of your RAID array here, use Disk Utility and select array then Get Info"
Get UUID here:
Attached File  Mikuru.jpg   127.28KB   416 downloadsAttached File  Information_ Mikuru.jpg   89.7KB   509 downloads
Most the boot process takes place from the cache, then once the soft raid kexts are loaded, system can then find the array to finish booting, without this you will get "still waiting on root device"

Here is my entire org.chameleon.Boot.plist so you can get an idea of how it should look:
Attached File  org.chameleon.Boot.plist.jpg   89.94KB   643 downloads

As mentioned, Chameleon, along with your Extra folder and updated org.chameleon.Boot.plist all need to be installed onto the boot helper partitions, which are hidden by default and called "Boot OS X", I have seen them without space too like "Boot OSX". They are not striped and are not part of the RAID array, making them readable by the BIOS and by Chameleon. To install Chameleon to the "Boot OS X" helper partitions, First find out the disk # for each one using Terminal and diskutil command and make note of the Disk #, the partition #'s will always follow the same layout where "Boot OS X" will be partition 3( s3 ):
diskutil list
Make note of the disk # for each drive that will make up your array ( rdiskX ) where X is the drive #
Rather than run the Chameleon installer, install the 3 needed Chameleon boot files manually. They are; boot, boot0 and boot1h. If you have Chameleon package installer, they can be extracted to the desktop with Pacifist, or if you grab the binary you can just copy them right over. Either way, put them on the desktop for now along with Extra folder and edited org.chameleon.Boot.plist inside of it along with usual contents like DSDT. The last bit will all be done in terminal. For demonstration purposes, I assume my first hard drive of the array is rdisk1 and the 2nd is rdisk2, substitute with your own BSD drive number obtained via diskutil above.

cd to desktop:
cd ~/Desktop
enter root
sudo -s
install boot0 to MBR, we don't need to worry about partition # here, just the disk #:
fdisk -f boot0 -u -y /dev/rdisk1
fdisk -f boot0 -u -y /dev/rdisk2
Then to install boot1h
dd if=boot1h of=/dev/rdisk1s3
dd if=boot1h of=/dev/rdisk2s3
then need to mount one of the helper partitions to copy our remaining files over, and once done, unmount it then repeat the process for the 2nd helper partition:
diskutil mount disk1s3
cp boot /Volumes/Boot\ OS\ X/
cp -R Extra /Volumes/Boot\ OS\ X/
diskutil unmount disk1s3
Be sure to unmount the Boot OS X partition before mounting the next one, because if 2 are mounted at the same time, the system will rename one of them to Boot OS X 1, possibly causing some problems for you. Repeat for other partition, will condense into short version cause this post is getting long:
diskutil mount disk2s3
cp boot /Volumes/Boot\ OS\ X/
cp -R Extra /Volumes/Boot\ OS\ X/
diskutil unmount disk2s3
Here's what mounted Boot OSX partition should look like:
Attached File  Boot OS X.png   885.71KB   534 downloads
Now you can have either drive listed as your boot device in BIOS, and pick either Boot OSX partition from Chameleon's boot menu, and your RAID will boot either way. That's it, if done right you should have working, bootable RAID-0.

Optimizing:
Picking which controllers to put your drives on will largely depend on your hardware. Keep in mind, since they are both read and written to at the same time, your bandwidth will be limited to that of your slowest connection, but since they are both reading and writing at the same time, the combined load on that bus can also be a factor. So as an example, I have Intel SATA 2, Marvell SATA 3 on-board and PCIe 2.0 x1 ASMedia SATA 3 card. With a single SSD hooked up, the ASMedia is the faster of the three, but when using both drives of the array on that same ASMedia card, there is almost no increase in performance, because a single SATA 3 connection running full tilt is enough to use all the bandwidth available via the x1 PCIe 2.0 connection. The Marvell, which normally falls in between the ASMedia and the Intel, suffers from similar over saturation with both drives, so putting both on the Intel SATA 2 control is actually faster due to it's overall bandwidth. What ended up being the best for me, was to split that bandwidth by putting 1 drive on the ASMedia controller and the second on the Marvell Controller, allowing both to run at the full speed of the slowest link, so both are running at what would be the Marvell's max speed with just one drive. The difference in read speeds is pretty dramatic, where both drives together on any of the controller's would max at around 500mb/s, this combination will max out at 800mb/s and has added benefit of leaving Intel controller available for other uses like a possible Windows Hardware RAID.
Attached File  Mac Pro.jpg   164.79KB   397 downloads

iCloud, iMessage or other Apple server login errors:
This should not be needed as it was fixed in Chameleon 2+ years ago, but I have seen a few instances in ML where it's been required and even a bit more common on a RAID-0 setup. Chances are if your having trouble logging into iCloud, the Appstore or any other apple run services, this is not the reason why and following the usual how-to for iCloud fix will be what is required, but if everything else has been set up perfectly and you are still having issues logging into iCloud, follow the pictures and see if it helps

Open IORegistryExplorer
Attached File  IODeviceTree1 — platform.jpg   131.46KB   420 downloads

Copy to Text Edit then get your ethernet MAC address
Attached File  Mac Pro en0.jpg   172.67KB   422 downloadsAttached File  Untitled 3.jpg   85.4KB   386 downloads
Changes will need to be applied to org.chameleon.Boot.plist in both your Boot OS X partitions

Now after rebooting, if done right you should now see this
Attached File  IODeviceTree — platform.jpg   128.32KB   269 downloads

disclaimer #2: Everything in this guide, I read somewhere, sometime, someplace at some point and did not invent any of it myself. Most the words used can also be found in any English dictionary, with only a few exceptions patent pending such as the word "the", which I will be registering as trademarked once the paperwork arrives, until which time I will permit it's use as open source under the GNU general public license.

#2
tot318

tot318

    InsanelyMac Protégé

  • Members
  • PipPip
  • 81 posts
Great tutorial. Love it. Since you are having an onboard SATA3 and my Asus P6T doesn't have one, I've bought a Asmedia ASM1061 PCIe card and you are right about no performance gain if 2 x SSD are put together into the card. So my question is, if I buy another ASM1061 card and split the SSD among them will I see any improvement in read speed. At the moment I'm getting 383MB/s read on my Intel 330 60GB RAID0 SSDs. I'm expecting to get around 600MB/s for these SSDs ( yeah I know Intel 330 is not the fastest ).

#3
eep357

eep357

    Triple Platinum

  • Supervisors
  • 2,527 posts
  • Gender:Male
  • Location:Dark Side of The Wall
  • Interests:things and stuff
that depends on your PCIe slots, to run the ASMedia card at full speed, required a PCIe 2.0 slot, while on most i7 boards, only the full size x16 slots for graphics cards are also 2.0 spec. Also since PCIe slots tend to share bandwidth, using any of the available PCIe slots can cause the speed on your GPU slot to drop. I'm able to run 2 graphics cards at full x16 speed on my board, and those are also the only 2.0 slots, since I only have one graphics card, the tiny sata card is in the second x16 slot. If I added another card, it would have to go in the 1.0 x1 slots and could not achieve full speed and iirc would also drop by 2nd x16 PCIe 2.0 down to x8 (which shouldn't matter because I'm only using x1 lane with the sata card anyway) or the primary slot which would cut into my GPU bandwidth. Take a look in the manual for your board at ASUS site and it will say which ones are 2.0 and what the speeds will be when filling different slots on the board. I'd check that now with the one you have as you should be able to get around 500mbs before reaching the limit of the 2.0 PCIe bus. Either way, you'd probably see the best speeds now with one on Intel sata 2 and the other on ASMedia, or maybe even both on Intel sata 2

#4
tot318

tot318

    InsanelyMac Protégé

  • Members
  • PipPip
  • 81 posts
thanks epp for the reply. atm my asm1061 is on the first blue xlot which is pcie 2.0 x16 and myg gtx260 is on the second blue slot pcie 2.0 x16 too. my usb 3.0 pcie is on the white pcie 2.0 x1. oy left is the pcie 2.0 x4 slot. i'm thinking putting another asm1061 on that.remaining slot.

Edit : I just try using the ASM1061 PCIe card and Intel SATA2 and the result is really amazing. I got 506/512MB/s for read and write with AJA. Here is the screenshot. So if I get another ASM1061 card will I get to 600MB/s ? If not better I just save the money.

RAID0 with both SSD on Asmedia ASM1061 Card
Posted Image

RAID0 with one on Asmedia ASM1061 and another on Intel ICH10R SATS2
Posted Image

#5
eep357

eep357

    Triple Platinum

  • Supervisors
  • 2,527 posts
  • Gender:Male
  • Location:Dark Side of The Wall
  • Interests:things and stuff
Wow! Great improvement! As long as there's not a bottle neck on the PCIe bus overall, I don't see any reason why you wouldn't see something similar to what your expecting. If all else were equal, the overhead from software raid vs hardware raid is actually quite minimal. Since the ASMedia cards are in the $25 range, it probably wouldn't hurt to try. Gotta figure too, if being limited by the bus/ports, upgrading to faster SSD's won't help. Plus one on the AJA too, Blackmagic doesn't work right in ML and neither does the disk speed check in NovaBench. There's a bit of an older app called DiskTester that works really well too. For AJA to work right for me in Mountain Lion, due to sandboxing, have to run it as root, easiest way is to use an app by the same name "run as root"

#6
tot318

tot318

    InsanelyMac Protégé

  • Members
  • PipPip
  • 81 posts
thanks for the info, really appreciate it. yeah i bought the ASM1061 for only $11 (free shipping) so it wouldn't hurt so much if I get another one.

BTW, here is my AJA score launched using LaunchAsRoot app.

Posted Image

#7
pinarek

pinarek

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 643 posts
  • Gender:Male
  • Location:Deutschland
hi tot318... i have see your very good performance with you RAID and change from PCIe x16 Slot 2 to Slot 1.
I have this tries, i have only 1 SSD Intel 330 Serie with 180GB Sata3 and see not performance change.

i have we you, on your Screen in Slot1, the same results.

Question:

How can change I increase the performance of Non-RAID volume to around 500 MB / s?

#8
tot318

tot318

    InsanelyMac Protégé

  • Members
  • PipPip
  • 81 posts

hi tot318... i have see your very good performance with you RAID and change from PCIe x16 Slot 2 to Slot 1.
I have this tries, i have only 1 SSD Intel 330 Serie with 180GB Sata3 and see not performance change.

i have we you, on your Screen in Slot1, the same results.

Question:

How can change I increase the performance of Non-RAID volume to around 500 MB / s?


Intel 330 series are not the fastest SSD in the market. Although the specs says that you can achieve 500MB/s but that is only marketing gimmick that you shouls aware of. Furthermore when using a SATA 3/6Gbps PCIe card, you can't get the max performance rated as 6Gbps or 750MB/s. If you really want a fast SSD in benchmark you should opt for Samsung 830, there might be a chance to hit 500MB/s or around 450-480MB/s in non RAID setup.

If you ask me whether I can feel the difference in real world environment between 300MB/s and 500MB/s ? The answer is not really. Difference 1-2 secs faster in launching an application really can't feel the difference. Only on benchmarks you can see it. Just be happy with your Intel 330 180GB as it really make a big difference when compare to mechanical drives. For me Intel 330 is worth the price of it's performance.

#9
TH3L4UGH1NGM4N

TH3L4UGH1NGM4N

    (~_~)

  • News Team
  • 1,154 posts
  • Gender:Male
  • Location:Wonderland
  • Interests:(~_^)
I can vouch for the speeds of the Sammy 830 as I have it in my current raid0 setup and it's quality does differ from that of my Sandisk SSD but is on par with my HyperX SSD. Honestly though, that 200mb/s difference he mentioned you won't see that much in real world usage unless you religiously move around large files because most of the time you do random IOs which don't happen at your SSDs true speeds but rather more slowly because it isn't sequential IOs.

If you're going to be raid0'ing 2 SSDs though, you'll certainly see a more than acceptable speed increase whether you're on SATA II or SATA III.

Another note, if you're trying to achieve 500mb/s speeds on an SSD it is highly advisable that you go for the 256gb+ sizes because they carry more onboard NAND cells than the 120gb and 60gb flavors. Those added NAND cells are needed to achieve the marketed advertised speeds on the box.

#10
micnor

micnor

    InsanelyMac Protégé

  • Members
  • PipPip
  • 94 posts

thanks for the info, really appreciate it. yeah i bought the ASM1061 for only $11 (free shipping) so it wouldn't hurt so much if I get another one.

BTW, here is my AJA score launched using LaunchAsRoot app.



can you specify the model? tnx.... :D

#11
ergot

ergot

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 197 posts
hi eep357

thank you for the post, i managed to do this and can boot RAID, a strange things happen after the boot...some time i see the mount/unmount

Boot OS X messages

appears ...is that normal?



AJA results 380 read/write cool..



#12
eep357

eep357

    Triple Platinum

  • Supervisors
  • 2,527 posts
  • Gender:Male
  • Location:Dark Side of The Wall
  • Interests:things and stuff
No I wouldn't call that normal. Make sure your caches are building properly and check console after seeing that for any more info. Also can try setting the other RAID drive as the primary boot drive for BIOS/Chameleon and see if it's any different. What controller's are each drive on?

#13
stagtrader

stagtrader

    InsanelyMac Protégé

  • Members
  • Pip
  • 1 posts
Thank you very much for posting the info on RAIDs. It really helped clarify several things for me. Thanks again.

#14
magnifico

magnifico

    InsanelyMac Deity

  • Donators
  • 2,416 posts
  • Gender:Male
Hi eep357
I created a script, without passing from the Terminal, would you like to see?

#15
Regi Yassin

Regi Yassin

    Who am I ?

  • Members
  • PipPipPipPipPip
  • 278 posts
  • Gender:Not Telling
@magnifico
can you share it?

#16
eep357

eep357

    Triple Platinum

  • Supervisors
  • 2,527 posts
  • Gender:Male
  • Location:Dark Side of The Wall
  • Interests:things and stuff
Of course, this is a sharing community after all !!

#17
magnifico

magnifico

    InsanelyMac Deity

  • Donators
  • 2,416 posts
  • Gender:Male
Just run the script, and this is written in Italian how to make the process

1)

Enter the number of the first Raid disk
2)
Enter the number of the second Raid disk
3)
Enter the File location: boot
4)
Enter the file location: boot0
5)
Enter the file location: boot1h
6)
Add folder address: Extra
7)


Now copy the boot files and the Extra folder in both volumes Boot OSX



If you have any problems do not hesitate to ask for information

Attached Files



#18
eep357

eep357

    Triple Platinum

  • Supervisors
  • 2,527 posts
  • Gender:Male
  • Location:Dark Side of The Wall
  • Interests:things and stuff
There, now it's in English :) (but untested)

Attached Files



#19
magnifico

magnifico

    InsanelyMac Deity

  • Donators
  • 2,416 posts
  • Gender:Male
Do you like my job ?

#20
eep357

eep357

    Triple Platinum

  • Supervisors
  • 2,527 posts
  • Gender:Male
  • Location:Dark Side of The Wall
  • Interests:things and stuff
:)





Also tagged with one or more of these keywords: RAID, RAID-0, RAID0, BOOT OSX, HOW-TO


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy