Friday, November 2, 2012

BYO Fusion Boot Drive

After reading about how the new Fusion Drive in the latest Macs work, I was surprised to find that it's not a hardware level algorithm (similar to my Seagate Momentus XT) that writes to both the SSD and hardrive but rather a tiered implementation that stores frequently read AND write data on the faster media alone. I have an SSD and a WD Caviar Black hardrive in my Mac Pro at work and having to constantly delete downloaded files and/or move things to the slower drive (that doesn't always work since, for instance, your Maven home needs to be on one drive and I know for a fact that I probably access only 5% of the artifacts frequently), I decided to give it a try and followed the instructions on http://jollyjinx.tumblr.com/ to roll my own Fusion BYO drive on my 2011 Mac Pro. I wanted my bootdrive (as opposed to a secondary drive) to be one single unified drive that automatically move things around based on my usage. I have a gut feeling that with 128GB of SSD, almost everything that I need quick access to would be "hot".

Obviously, this whole setup requires 10.8.2.

First thing, I backed up my computer using Time Machine twice, it's already backing up to a Drobo FS device on the network but just in case, I backed it up again to an external drive. It's nice that Time Machine can actually handle having more than one backup drive which is nice for those who are paranoid about data loss I suppose. I found out however, that a complete system backup exists only on the Drobo device and not the external drive but since I am restoring after a reinstall anyways, it doesn't really matter.

First off, I need to create have OSX Recovery on a disk or an external drive since my Mac does not have internet recovery (or it won't trigger as long as my local disk has the recovery partition). I just repartitioned my external drive to have a 1GB partition for that purpose and downloaded OSX recovery assistant http://support.apple.com/kb/DL1433 to copy the local recovery partition to the external drive.

Then, holding the "Option" key while restarting, boot to that recovery partition. Then, I ran the commands that jollyjinx wrote in a terminal (Utilities -> Terminal).

First run diskutil list to figure out which physical disks will form the logical volume.

Then, diskutil cs create NAME_OF_LOGICAL_VOLUME_GROUP FIRST_DISK SECOND_DISK
For instance, I typed diskutil cs create fusion disk1 disk2

Afterwards, run diskutil cs list to get the logical volume group UUID to create the logical volume:
diskutil cs list
diskutil cs createVolume LOGICAL_VOLUME_GROUP_UUID jhfs+ fusion 100%

This creates a new volume (unencrypted) called fusion with journaled HFS+ occupying the entire drive.

Now, after that, close the terminal (you need to actually do Quit from the menu bar) and then reinstall (do not restore from Time Machine since it wouldn't know how to create the recovery partition) Mountain Lion. It checks for your App Store login at this point you make sure you use one that has the purchase associated (if not, just pay Apple another $19.99).

It'll download the installer again (mine took about 35mins) and install Mountain Lion to your local machine. It will restart after downloading and then install OS X on the disk "fusion" (what I named the volume). Takes about 20 minutes on my mac.

Afterwards, boot into mac, use Migration Assistant or otherwise, restore your files. I chose to just re-install everything and copy the relevant documents back from the Time Machine sparsebundle. FileVault works and I can partition the drive via diskutil again.

Mission Accomplished. :)