BYOD Fusion

Apple, at their September press bonanza, told the world about their new, hybrid approach to storage: Fusion. It’s a marriage of an SSD (Solid State Disk) and a classic HDD (as in magnetic, spinning media). If you want to get into the details of all of this, take a look at the various posts, specifically by Ars Technica and Patrick Stein (@jollyjinx):

The first two articles are from Ars, the latter two from Patrick. Patrick’s post, in particular, show how it is possible to use the tools provided in OS X Mountain Lion to build your own Fusion volume. This got me wondering: I have an SSD and an HDD in my MacBook Pro today. Could I make this work for my system drive?

The answer, in short, is yes. It definitely works. And, at least for me (and so far), it is definitely worth it.

The Setup

This was actually remarkably easy, consisting of just a few terminal commands in the OS X Mountain Lion installer. Things just worked as expected, which, at least for me, is unusual.

My setup:

Prior to formatting, I had the 640GB drive (the spinning disk) mounted as a separate volume. I kept my Dropbox folder (50GB worth of data), Downloads, Music, Movies, and Library folders on it with symlinks back to their system locations. It wasn’t actually very convenient- I ended up doing quite a bit of work to keep the SSD from overflowing, including moving a bunch of applications to/from each HD, forcing iTunes to store MobileSync data (iPhone/iPad backups and such) to the separate drive, and more. In short, it was a pain. That pain alone is what inspired me to blow it all away on just a hope that Fusion would work for me.

In case you were wondering, I had removed the DVD drive from my MacBook Pro (don’t tell Apple!) to make room for the 640GB HDD. I had done this a while back, when I realized that 120GB simply isn’t enough room. If you want to roll your own Fusion drive, you’re going to need to have both disks. Another good alternative, if you’re too shy, is to just buy a bigger SSD – they’ve gotten significantly cheaper over the past year.

One more note before we get too far: while this MacBook Pro is definitely my production machine – and I normally wouldn’t conduct an experiment like this on any production machine (nor should you!) – I am a fanatic about backups. I worked for 5 years at Mozy and there is no end to the number of horror stories I’ve heard or experienced first-hand. I have spent months-worth of work recovering my own and others’ data. I’m a bit of an expert in data recovery. Part of being an expert in data recovery is becoming an expert in backups. Before I blew away my machine, I ensured that all three of my backups tiers were up-to-date:

  1. Local Time Machine. It can be unreliable, but it gives excellent incremental resolution for data it actually manages to backup. It’s also built-in.
  2. Sparse Bundle and full disk image backup to a file server in my home storage infrastructure. This may sound like overkill, but I image each and every one of my storage devices every week and store it on my 22TB behemoth of a storage server. This includes a Sparse Bundle of the Time Machine backups (I use a Sparse Bundle because it is readily accessible as a recovery partition over the network to any Mac).
  3. Mozy. It can be pricey, especially if you have a ton of data. I don’t store my disk images on Mozy but I do keep critical documents and system settings backed up to Mozy’s cloud.
    Now you know how serious I am about not losing data. If you’re going to try to roll your own Fusion drive, you should be equally or better prepared. You have been warned.

The Gory Details

Patrick outlines exactly how to create your own Fusion volume using the Core Storage utilities from the command line here. It’s extremely easy. Coming from an extensive background in LVM, I was personally a little suspicious of the entire process – it was just too easy. It boiled down to two commands:

diskutil cs create Fusion disk1 disk2  
diskutil coreStorage createVolume [GUID] jhfs+ Fusion 100%  

I named my device and volume “Fusion”. Just for kicks. And giggles.

One of the questions I had to answer was this: Is Core Storage supplied in the vanilla Mac OS X Mountain Lion (10.8) installer or in one of the later updates? If I wanted to use this as my System drive, I would either have to use another Mac (in Target Disk mode or by physically exchanging drives) or run these commands from the OS Installer. Fortunately, the OS ships with Core Storage – and it works beautifully from the Terminal supplied in the Installer environment. Here’s the step-by-step:

  1. Boot from the installer. I used a USB drive with the Mountain Lion (10.8) installer imaged to it. You can either purchase a restore USB drive from Apple or roll your own.
  2. Once the installer is up and running, you’ll need to drop into the Terminal. You can launch it from the Utilities menu. Hopefully, you’re familiar with this environment. If not, you should probably quit now.
  3. Create a new Core Storage device: diskutil cs create Fusion disk1 disk2 Keep in mind that I’ve named the volume “Fusion” and I’m using disk1 and disk2. You’ll need to double-check that those disk IDs are correct for your device. The could easily be different.
  4. Create a new volume on your Core Storage device:
    diskutil cs list diskutil coreStorage createVolume [GUID] jhfs+ Fusion 100%
    You need to issue the “cs list” command to get the GUID of your newly created Fusion volume. You will then, of course, need to replace “[GUID]” with that identifier. Also, I’ve elected to call the volume “Fusion” as well- you can choose any name you would like. Finally, I’m using 100% of the volume. You can choose any value here – percent or GB. “-help” is your friend.

That’s the entire process for creating your Core Storage Fusion drive. Quit Terminal, drop back in to Disk Utility, and verify that you now have something like this:

Brand New Fusion

Go ahead and partition it as you normally would and proceed with the installation. Everything should follow the standard workflow from here on out.

Verifying Fusion Functionality

For extra credit, you can follow Patrick Stein’s post to verify that you are genuinely enjoying the benefits of Fusion’s tiering capabilities. He’s done an excellent job of writing this up; I’ll simply refer you to his blog.

As you work with your new Fusion drive, there are a couple of things to keep in mind: data management (moving data from the SSD to the HDD and back again for the noted performance gains) is handled in the background when your computer is idle. It’s a learning system- as you use certain applications and data, it will continually update the data set to optimize speed for more frequently used data. If you have an older MacBook (like mine), it will not have the Power Nap capabilities. While I can’t be absolutely certain, I suspect that much of the optimization work would be done during the Power Nap state. In any case, you’ll want to provide some idle time to your computer to allow for Core Storage to do its magic.