Site icon The IT Nerd

In Depth: Apple’s APFS Filesystem

Advertisements

APFS (Apple File System) is Apple’s new and modern file system that was introduced in macOS 10.13 (A.K.A. macOS High Sierra). It is a replacement for HFS+ (Hierarchical File System Plus) which has been around since 1998 and came out when the first iMac appeared, which in turn was preceded by HFS (Hierarchical File System) which appeared in 1985 when the Mac Plus appeared, and MFS (Macintosh File System) which appeared in 1984 alongside the original Macintosh. APFS is meant to be the default file system for all Apple products. In fact, if you’ve got an iPad or an iPhone, you’ve been running APFS since earlier this year when it was introduced as part of an iOS 10 update and you likely didn’t know about it. Even the Apple Watch runs APFS as its filesystem.

Here’s the key features of APFS:

*APFS currently does not support Apple Fusion Drives which is a mix of flash and spinning disk storage. This apparently is coming in a future macOS update. Pure spinning disks are not supported.

APFS has encryption using AES-XTS or AES-CBC modes depending on the hardware that is in play. Both files and metadata will be encrypted. Supported encryption methods include:

As far as I have been able to research and backed up by my observations, only the first two features have been implemented on macOS High Sierra. The reason why I worded it like that is that many of the under the hood features of APFS are not that well documented. That’s going to be a bit of a theme as I go along here. One thing that I should point out is that APFS encryption is software based encryption. Also, APFS encryption is volume based encryption. Meaning it doesn’t encrypt the whole disk. It encrypts volumes on the disk as you may have one or more volumes on the disk.

You can encrypt an APFS volume by going to:

It works the same way as FileVault 2 where it will ask you to save a recovery key in iCloud or it will generate one for you to write down or print out. You can also use the command line to initiate encryption and decryption. But I would avoid that as it is easy to get into trouble using that method.

Now APFS encryption is slow to encrypt. It encrypts at a rate of roughly 15 GB per hour. Or put another way, it took 19.5 hours to encrypt 295GB of data on an APFS volume residing on an SSD when I tested it. Conversion of a FileVault 2 encrypted HFS+ volume on the same SSD appears to be faster. My testing indicated that the same amount of data took 6 hours to convert that volume to APFS.

Now every Mac that I have upgraded to High Sierra has run into an issue where there has been “underallocation” or “overallocation” of the APFS volume. This I discovered by using Disk Utility after the upgrade process has completed. Again, Apple has no documentation that explains what this error means. But if I had to make a guess, the amount of space on the hard drive was not allocated properly during the HFS+ to APFS conversion. The only fix that I have found is to backup the data and reformat as Disk Utility cannot fix this error.

Now some key things to keep in mind about APFS:

Clearly this isn’t your father’s file system. APFS has a lot going for it. Hopefully, Apple fleshes out the details about it and software companies catch up with utilities that support this file system so that all Apple users can fully benefit from it.

 

Exit mobile version