Do-It-Yourself APFS Fusion Drive how to create an APFS formatted DIY Fusion Drive

TNCS-0045 – Do-It-Yourself APFS Fusion Drive

Created: March 28, 2019

Apple has been offering their Fusion Drive as a hardware option on Macs since late 2012. Fusion Drive is Apple’s name for a hybrid hard drive system that combines a high-speed, solid state component with a large capacity spinning hard drive. More than just a larger capacity storage device, a Fusion Drive re-arranges the data stored on the hybrid device such that frequently accessed and/or performance sensitive data is stored on the solid-state portion, while less critical and less frequently accessed files are stored on the spinning hard drive portion. Because of this structure, a Fusion Drive offers many of the performance benefits of a pure solid state drive (SSD) but at much lower cost for large capacities.

fusion drive

Unbeknownst to many users is that a Fusion Drive can be manually constructed using a standard SSD in combination with a spinning hard drive. You do not have to purchase it pre-configured from Apple in order to gain all the benefits of this hybrid technology. This guide presents the steps required to create your own DIY Fusion Drive using standard components that you may already have in your possession. It then presents some benchmarks showing all of the advantages that a Fusion Drive has to offer.

This tech note will focus on the creation of an APFS formatted DIY Fusion Drive. Because we are dealing with APFS, these instructions only apply to macOS High Sierra and Mojave users. If you are using an older version of macOS, or you prefer to create an HFS+ formatted DIY Fusion Drive, read down to the end of this guide for instructions on how to create a Core Storage-based DIY Fusion Drive.

THE HARDWARE

For this tech note, we will be combining a 120 GB SSD with a 2 TB spinning hard drive to construct our DIY Fusion Drive. The SSD is an Apple-produced device, taken straight out of a 2017 MacBook Air. It was replaced by a much higher capacity SSD, using an OWC Aura Pro X SSD Upgrade Solution. As part of the update kit, an OWC Envoy Pro Enclosure was supplied to house the old Apple SSD. It functions as an external, bus-powered USB 3.0 drive.

The hard drive is an old Hitachi Deskstar 2 TB 7200 RPM SATA II mechanism installed in an inexpensive (~$15 USD), NexStar 6G 3.5″ Hard Drive enclosure. It is one of many such model drives that have seen service here at Econ for upwards of 10 years. In its day it was considered a fairly quick device and has always been extremely reliable, as evidenced by the fact that it is still ticking after 9+ years!

Performance-wise, however, it is significantly eclipsed by contemporary hard drives. A modern hard drive mechanism will offer 40-50% better performance. Take this into consideration when reviewing the benchmarks since a brand-new hard drive will perform much better, both in a Fusion and non-Fusion configuration.

RE-FORMAT & NAME THE DRIVES

We begin by connecting both the SSD and hard drive to available USB ports and powering them on. Since these drives were previously used as boot volumes in different Mac systems, they both mount as “Macintosh HD.”

The first step is to fire up the Disk Utility application located in /Applications/Utilities. Our objective is to reformat the two drives and rename them in such a way that it will be less likely for us to make a mistake later on. This step is not technically required. If you are comfortable using Terminal and using the diskutil command to identify devices, you can skip on to the next step for the actual creation of the Fusion Drive.

In Disk Utility, switch to “All devices” using the “View” popup menu in the toolbar. You will see all connected devices and the volumes stored on those devices appearing in the sidebar. The two devices you connected should appear along with your system’s boot drive and any other storage devices that are connected to your system.

Because there may be several devices listed, there could also be confusion regarding exactly which devices are the ones that you would like to ‘fuse’ together. To avoid problems (and catastrophe), right-click (or control click) the volume name on the device you believe to be the SSD you would like to use. Choose “Show in Finder” to open a Finder window revealing the contents of the drive.

Once you have confirmed that this is indeed the SSD you wish to fuse, choose the device name in sidebar and click the “Erase” button in the toolbar. Supply a very obvious name for the volume, making sure there is no confusion with other volumes you may have mounted. In our example, we’ve named it “Old Apple SSD.” When asked for what volume format to use, choose “Mac OS Extended (Journaled)” and click “Erase.”

Repeat the above steps for your external hard drive. Choose an equally obvious name. We’ve chosen “Old Hitachi HD.” The volume format is “Mac OS Extended (Journaled),” just like we selected for the SSD. After clicking “Erase,” you may be asked whether or not you want to use the volume for Time Machine backups. Just say “Don’t Use.”

Note: You could just use Finder to rename the volumes, but using Disk Utility as we’ve done here ensures that they are HFS+ formatted.

You are now finished with Disk Utility and may quit the application.

CONSTRUCT THE FUSION CONTAINER

For the next step, we must launch the Terminal application located in /Applications/Utilities. Once it launches, enter the command:

diskutil list

This produces a list of all storage devices & volumes connected to your system (you may want to make the window larger so you can clearly see all devices).

On our test system we see:

Locate the SSD and hard drive you just formatted in this list. Because you (hopefully) chose very obvious names for the volumes, they should be very easy to spot in the list. Our listing clearly shows “Old Hitachi HD” and “Old Apple SSD.” When you find your volumes, take note of each of their Identifier’s in the far right column.

With the Identifiers in hand, go ahead and enter the following command:

diskutil apfs createContainer -main <ssd identifier> -secondary <hard drive identifier>

… making sure you replace “<ssd identifier>” and “<hard drive identifier>” with the identifiers of your SSD and hard drive, respectively.

On our test system, we’ve entered the command as:

diskutil apfs createContainer -main disk8s2 -secondary disk6s2

Note: Be sure to replace “disk8s2” and “disk6s2” with the correct identifiers from your system. They almost certainly will be different. Specifying the wrong identifier could destroy another volume on your system!

The command should run quickly and it will create the APFS logical container that encapsulates both devices. You’re half-way there!

The next step will be to add a volume to the container. Start by entering:

diskutil list

You should look for a ‘synthesized’ volume that contains an “APFS Container Scheme,” but there should be no volumes listed in the container.

The listing on our test system looks like this:

In our case, the APFS container we just created has the identifier of ‘disk7,’ but yours will almost certainly be different.

You should take note of your container’s identifier and enter the following command:

diskutil apfs addVolume <container identifier> APFS “Volume Name”

… making sure to replace “<container identifier>” with your container’s identifier. You can also change “Volume Name” to whatever volume name you would like.

In our case, we entered the following command:

diskutil apfs addVolume disk7 APFS “Fusion SSD”

This also executes very quickly and places the “Fusion SSD” APFS volume inside the container.

To confirm everything looks good, list your devices again:

diskutil list

Our test system produced:

Here you can see “Fusion SSD” in all its glory. The “Fusion SSD” volume should also appear on your desktop, ready for you to start placing files on it. At this point you are done!

WHAT IS IT GOOD FOR?

To determine whether all this effort has been worth it, we ran a series of benchmarks on the above DIY Fusion Drive to determine what kind of performance improvement we were getting (if any). Prior to constructing the DIY Fusion Drive, we also performed the same exact tests on the Hitachi hard drive so we could have a point of reference. The results were pretty impressive.

Benchmark Results:

The test system was a 2017 27″ 5K iMac w/16 GB RAM. Both components of the DIY Fusion Drive (SSD & HD) were connected directly to the USB 3.1 interface ports. The exact same tests were performed in sequence on each configuration.

We began by installing macOS Mojave on the destination drive. We rebooted the system and let it sit for 15 minutes in order to stabilize, then we rebooted three times and measured/averaged the boot times. This was done by starting up to Startup Manager (by holding the Option key down), selecting the boot volume and starting a stopwatch. The timer was stopped when we reached Finder with the menubar, dock and desktop icons displayed. In this test, the DIY Fusion Drive clearly showed its superiority.

We next ran the DiskMark utility to see what kind of raw performance each drive offered. As expected, the DIY Fusion Drive killed the standard hard drive. This is because a Fusion Drive uses the SSD component as a write buffer for active file I/O and thus will deliver pure SSD performance. Behind the scenes, however, such files will be silently moved to the HD component. If you will be using a DIY Fusion Drive in a workflow that will involve streamed writes of exceptionally large files (e.g. video rendering), you will be better served by using a larger size SSD in your configuration.

For the next test, we performed a ChronoSync synchronization with a static set of data that we normally use for testing. This is comprised of 400,332 files/folders spanning 441.92 GB of data. The source volume was the same in both cases, so the difference in performance is measuring write speed and the updating of file system structures. Here the difference is less pronounced. While individual files would write extremely quick, the shuffling of data to the HD that took place in the background was impeding the overall process.

Now that we’ve copied over 400 GB to our DIY Fusion Drive, we tested reboot performance on this ‘dirty’ system by again averaging three boot times. In this state, the drive was firmly saturated with a large number of files – well beyond the capacity of the 120 GB SSD component. This eliminated the possibility that we were simply storing all data on the SSD component and that is why the DIY Fusion Drive was delivering superior performance. As you can see, the DIY Fusion Drive was minimally impacted by all this data whereas the standard HD was starting to show some degradation.

With a ‘dirty’ system in place, we next ran the DiskMark benchmarks again. Here you can see performance degradation on both the DIY Fusion Drive and the standard HD, but the DIY Fusion Drive degradation was much less pronounced.

Next we ran several ChronoSync file system scans of the 400,000+ data set to see how quickly it could traverse the file system. This gave some indication of how real-world, disk intensive applications would be affected by the DIY Fusion Drive. Here you can see the difference is much more pronounced than the initial ChronoSync test. This is good news for users since many modern apps (e.g. Apple Mail, Photos, Safari, etc.) are extremely disk intensive.

Lastly, we applied the macOS 10.14.3 Supplemental Update to our OS installation. This introduced potential fragmentation into our clean OS install, so it should have affected OS boot times. As we did originally, we let the system sit after installing the update so it could stabilize, then we measured the average boot time based of three reboots. The results show that the standard HD is starting to be seriously affected by fragmentation whereas the DIY Fusion Drive hardly even noticed.

Degradation over time is a common occurrence for ALL macOS systems regardless of their data storage medium. We tried to construct this test to expose the kind of degradation that will occur over time. We feel like we were moderately successful in this regard but the proof is only going to come after extensive real-world usage. No synthetic benchmark is going to reflect that with 100% accuracy.

All-in-all, the DIY Fusion Drive configuration performed admirably during all our tests. It was very quick and responsive, feeling exactly like you would expect a modern, 2017 iMac to feel. It’s worth noting that it performed better than the ‘stock’ 1 TB Fusion Drive that this model iMac was originally equipped with, though we didn’t perform the full suite of tests on the built-in drive. The standard HD, however, always felt pokey. Lag times for simple actions such as launching System Preferences and even clicking on menus was noticeable. Having to use such a system on a daily basis would certainly be frustrating.

SPECIAL CONSIDERATIONS

A Fusion Drive configuration is not a RAID and thus provides absolutely no redundancy to protect against hardware failure. In fact, quite the opposite is the case – if any drive in a Fusion configuration fails, data on ALL the drives will be lost. This fact effectively doubles your chances of experiencing hardware-induced data loss. In our example configuration, we used an extremely old hard drive for our tests. This is not recommended since the chance that hard drive will fail in the near future is very high. If you choose to use old hardware, refrain from doing so as a primary means of backup. However, it may be adequate as a tertiary backup layer depending on your risk tolerance.

Also note that in our example, one device (the SSD) was bus-powered while the other device (the spinning HD) used an external power supply. If this DIY Fusion Drive setup were attached to a laptop, and a power failure was encountered, you’d run the risk of data loss because the SSD component is still powered when the HD component is un-available. In such a scenario, you should protect yourself by using a UPS to ensure all devices receive adequate power.

On a similar note, having multiple USB devices plugged in will increase the chance of inadvertently unplugging one of the devices. It is suggested that you use a wire-tie (or simply tape) to bind the two USB cables together so that it is obvious that they both belong to the same device.

Lastly, you should avoid plugging the two devices into a USB hub. Always try to connect directly to your computer, if possible, since it will yield greater performance.

GOING OLD SCHOOL ... HFS+ AND CORE STORAGE

If using an older version of macOS, or if you simply prefer to use HFS+, you can also build a DIY Fusion Drive. The process is nearly identical to the above method except you will will enter some slightly different commands in Terminal.

After obtaining the identifiers for your SSD and spinning hard disk (via the diskutil list command), you would enter the following Terminal command:

diskutil cs create “Group Name”

The “Group Name” argument can be whatever you would like. It names the logical volume group that you are creating. Note: Be sure to list your SSD’s identifier first, followed by the hard drive’s identifier.

For our test configuration, we would have entered:

diskutil cs create “Fusion LVG” disk8s2 disk6s2

This will produce some feedback and, if all works properly, will display “Core Storage LVG UUID:” followed by a cryptic identifier of the form 4E09A299-3750-46D4-858C-73B8FB94C565 (this identifier will be different on your system). Take note of this identifier since you will need to use it in the next command.

With the logical volume group created, the next step is to add a volume to the group. To do this, type the following command:

diskutil cs createVolume jhfs+ “Volume Name” 100%

Replace “” with the cryptic identifier produced by the previous command. You can also replace “Volume Name” with whatever you’d like.

In our test configuration, we would have entered:

diskutil cs createVolume 4E09A299-3750-46D4-858C-73B8FB94C565 jhfs+ “Fusion SSD” 100%

The “Fusion SSD” volume should now appear on your desktop, ready for you to start placing files on it. At this point you are done!

REVISION HISTORY

Mar-28-2019 – Created Internally.

Shopping cart0
There are no products in the cart!
Continue shopping
0