Can I make a DIY Fusion Drive?
I have a Mac Mini with two drives: a 256GB SSD and a 500GB HDD. From what I've read, the new Fusion Drive does all of it's magic in software, using the Core Storage APIs.
Can I get my setup to behave like a Fusion Drive? That is, I want the two drives to appear as a single logical volume, with the system automatically moving frequently accessed files to the SSD. I understand that we can easily stripe or extend or RAID drives, but the automatically managed tiered storage features of Fusion drive would be great to have without investing in new hardware.
Solution 1:
Yes, you can create a fusion drive on older Macs, described in full length here:
- You obviously need both an SSD and a HD. Let's assume they are known to the OS as disk1 and disk7. You can check disk id by
diskutil list
. -
diskutil cs create bla disk1 disk7
to create it, wherebla
is the name you give to the fusion drive. -
diskutil cs list
and take note of the Logical Volume Group ID -
diskutil cs createVolume <ID from above> jhfs+ blub 100%
, whereblub
is the name you give to the volume.
Link to Apple instructions: Click Here
Note: These are instructions to fix a split fusion drive, but work also for making one.
Solution 2:
Yes and no.
The Fusion Drive is taking advantage of Core Storage to act as one logical volume, which you see as a single volume but can actually be made up of multiple physical volumes (in this case, an SSD and an HDD).
You can create and manage Core Storage volumes with the diskutil
command in Terminal. (Disk Utility does not yet have extensive Core Storage support via the GUI.) In particular, you can create your own logical volume groups and logical volumes, with diskutil coreStorage createLVG
and diskutil coreStorage createVolume
, among other commands (see the man page for details).
My guess, however, is that the Fusion Drive's special behavior, automatically moving your data between physical volumes, is encoded in a special logical volume family, and this is probably not something you could mimic easily. (I'd be happy if someone could prove me wrong!)
Solution 3:
I just finished creating a DIY Fusion Drive in my early 2009 MacBook Pro. It works great, and I figured out how to keep my recovery and Boot Camp partitions at the same time.
I started with backups: Both a Time Machine and a Carbon Copy Cloner backup of my Mountain Lion partition, and a WinClone backup of my Boot Camp partition. All backups were saved to an external hard drive that wasn't involved in the Fusion Drive upgrade.
For hardware, I bought a 128 GB Samsung 830 SSD and a hard drive caddy tray that let me replace my Apple Superdrive with a hard drive. (The instructions that came with the caddy are completely wrong, but the caddy is simple enough that I figured out how to install the drive in the caddy anyway.) The installation was tricky and required a tiny Torx screwdriver and some spudgers, but the instructions on ifixit.com were clear and helpful.
After installation, I discovered using System Information that the SSD in the CD bay had a negotiated link speed of 1.5 Gigabit rather than 3 Gigabit. So I opened up the MacBook Pro again and swapped the hard drive and the SSD. Next time I booted both drives were running at 3 Gigabit. As a temporary measure for testing, I formatted the SSD using Disk Utility as a single journaled HFS+ partition.
To create the Fusion Drive, I booted into the recovery partition by holding down Command-R during boot. I used the Terminal in recovery mode to create the Fusion Drive.
The first step was to use the diskutil list
command to get a complete list of the partitions on both drives. In my case, disk0s2 was the partition on the SSD and disk1s2 was my usual Mountain Lion partition on the hard disk.
Then I used the command diskutil cs create Fusion disk0s2 disk1s2
to create a logical volume group from the two partitions. This is the step that was special. By specifying partitions rather than whole disks when creating the logical volume group. I was able to leave the recovery and Boot Camp partitions intact. Most instructions I've seen have used disk names rather than partition names, which wipes the entire disk clean. The use of partition names is documented in the diskutil man page.
Next I used the diskutil cs createVolume <ID from above> jhfs+ Reliance '100%'
command to create a logical volume using 100% of the logical volume group. Since I still had my recovery and Boot Camp partitions, there was no need to leave room for them in the logical volume group, so I was free to use all of the space for my new Fusion Drive partition.
At that point the hard part was done. I booted from my cloned backup and used the Install OS X Mountain Lion application to re-install Mountain Lion on the Fusion Drive. (I could have cloned it back instead, but I liked the idea of taking the opportunity to reinstall Mountain Lion.) Once the install was done, I used Migration Assistant to copy my files and accounts from the clone back to the Fusion Drive.
As usual after a backup/restore, my Mac was busy for many hours re-indexing Spotlight and the next Time Machine backup was extremely slow. But once these things were out of the way, everything sped up and I started getting the benefits of my new Fusion Drive! It is continuing to get faster as it learns which applications I use most often.
There are a few glitches at the end of this process, but I consider them all extremely minor:
- If I boot with the option key down, my Mac firmware lists the Fusion Drive twice. Selecting either drive boots just fine.
- Disk Utility shows my Boot Camp partition as being part of the Fusion Drive, even though it is only on the hard drive. This seems to be harmless.
- The Boot Camp control panel in Windows 7 also lists the Fusion Drive twice. Again, both choices work fine.
- The first time I booted into Windows 7 I got the Windows boot loader screen, probably because I moved the hard drive with the Boot Camp partition to the CD bay. Windows 7 adjusted the drive address and it's been booting normally ever since.
All in all, it's a great upgrade and I'm glad I did it!