Although it didn’t make the keynote cut, one of the bigger news items for developers today is that Apple is rolling out a new file system for storage for all its products:

The Apple File System (APFS) is the next-generation file system designed to scale from an Apple Watch to a Mac Pro. APFS is optimized for Flash/SSD storage, and engineered with encryption as a primary feature. Learn about APFS benefits versus HFS+ and how to make sure your file system code is compatible.

Details are scant but developers can access information about the new File System here, but it comes with some significant caveats/limitations which will initially limit its usage:

  • Startup Disk: APFS volumes cannot currently be used as a startup disk.
  • Case Sensitivity: Filenames are currently case-sensitive only.
  • Time Machine: Time Machine backups are not currently supported.
  • FileVault: APFS volumes cannot currently be encrypted using FileVault.
  • Fusion Drive: Fusion Drives cannot currently use APFS.
The File system isn’t Open Source at this time and Apple isn’t quite saying if it will eventually Open Source the File System. Apple plans to document and publish the APFS volume format when Apple File System is released next year.

General Characteristics

Apple File System is a Next-Generation File System for Apple Products

HFS+ and it’s predecessor HFS are more than 30 years old. These file systems were developed in an era of floppy disks and spinning hard drives, where file sizes were calculated in kilobytes or megabytes. Today, solid-state drives store millions of files, accounting for gigabytes or terabytes of data. There is now also a greater importance placed on keeping sensitive information secure and safe from prying eyes.

A new file system is needed to meet the current needs of Apple products, and support new technologies for decades to come.

The following sections describe the general characteristics of Apple File System, as they relate to functionality in the HFS+ file system:

Containers and Volumes

A container is the base storage unit for APFS. It generally maps 1:1 to GUID Partition Table (GPT) entries, and manages its own space allocations and crash protection scheme. Each container exports one or more volumes, or file systems, each of which have their own namespaces, or sets of files and directories.

64-bit Inode Numbers

APFS supports 64-bit inode numbers, which improves upon the 32-bit file IDs supported by HFS+. As a 64-bit file system, APFS supports over 9 quintillion files on a single volume.

Nanosecond Timestamp Granularity

APFS supports 1 nanosecond timestamp granularity, which improves upon the 1 second timestamp granularity of HFS+.

Extensible Block Allocator

APFS has an expansive block allocator, allowing for arbitrarily large storage on a single device. When initializing very large disks, the block allocator may lazily initialize its data structures only as necessary to improve performance. HFS+, by comparison, is limited by its allocation block size and initializes the entire storage of a file system on creation.

Sparse Files

APFS supports sparse files, whereas HFS+ does not.

Crash Protection

APFS uses a novel copy-on-write metadata scheme to ensure that updates to the file system are crash-safe. This approach also reduces the additional overhead of journaling that occurs with HFS+.

Extended Attributes

APFS has built-in support for extended file attributes. HFS+ retrofitted this functionality with the Attributes file, a B-Tree that allows the implementation of named forks.

TRIM Operations

Like HFS+, APFS supports TRIM operations. On APFS, TRIM operations are issued asynchronously from when files are deleted or free space is reclaimed, which ensures that these operations are only performed once metadata changes are persisted to stable storage.

Encryption

Security and privacy are fundamental in the design of Apple File System.

On OS X, Full Disk Encryption has been available since OS X 10.7 Lion. On iOS, a version of data protection that encrypts each file individually with its own key has been available since iOS 4, as described in iOS Security Guide. APFS combines both of these features into a unified model that encrypts file system metadata.

APFS supports encryption natively. You can choose one of the following encryption models for each volume in a container: no encryption, single-key encryption, or multi-key encryption with per-file keys for file data and a separate key for sensitive metadata. APFS encryption uses AES-XTS or AES-CBC, depending on hardware. Multi-key encryption ensures the integrity of user data even when its physical security is compromised.

Compatibility

  • Existing third party utilities will need to be updated to support Apple File System. Consult the utility’s documentation, or contact the vendor for compatibility information.
  • APFS formatted volumes are not recognized on OS X 10.11 Yosemite and earlier.
  • You can share APFS formatted volumes using the SMB network file sharing protocol. The AFP protocol is deprecated and cannot be used to share APFS formatted volumes.

Favorite Gear