APFS Internals
A deep dive into the Apple File System, published as part of the 2022 APFS Advent Challenge. 18 parts covering on-disk structures, B-Trees, encryption, and more.
Foundations
- Anatomy of an ObjectAPFS is a copy-on-write file system, consisting of a set of immutable objects that are...
- Kinds of ObjectsAs we discussed in our last post, objects are the fundamental building blocks of APFS....
Container Layer
- ContainersAPFS is a pooled storage, transactional, copy-on-write file system. Its design relies on a core...
- NX Superblock ObjectsThe NX Superblock Object is a key component of APFS. It stores key information about...
- Checkpoint Maps and Ephemeral ObjectsIn our last post, we discussed NX Superblock Objects and how they can be used...
B-Trees and Indexing
- B-Trees (Part 1)In yesterday’s post, we discussed Checkpoint Maps, the simple linear-time data structures that APFS uses...
- B-Trees (Part 2)Mastering the skill of B-Tree traversal is essential in parsing information from APFS. Our last...
- Object MapsEarlier in this series, we discussed APFS Containers and how they address physical objects via...
Volume Layer
- Volume Superblock ObjectsThe Volume Superblock is a data structure containing key information about an individual APFS volume....
- File System TreesEach APFS volume has a logical file system stored on disk as a collection of...
- Inode and Directory RecordsEach APFS file system entry has both an inode and directory record. The inode record...
- Data StreamsData in APFS that is too large to store within records is stored elsewhere on...
Integrity and Encryption
- Sealed VolumesWith the release of macOS 11, Apple added a security feature to APFS called sealed...
- KeybagsAPFS is designed with encryption in mind and removes the need for the Core Storage...
- Wrapped KeysIn our last post, we discussed both Volume and Container Keybags and how they protect...
- DecryptionNow that we know how to parse the File System Tree, analyze keybags, and unwrap...
Advanced Topics
- Snapshot MetadataOur previous post covered how Object Maps facilitate the implementation of point-in-time Snapshots of APFS...
- Fusion ContainersAs we discussed in an earlier post, Apple’s Fusion Drives combine the storage capacity of...