Apple File System
Apple File System (APFS) is a file system for macOS, iOS, tvOS and watchOS[1] that is being developed and deployed by Apple Inc.[2][3] It aims to address the core issues of the existing HFS+ (also called Mac OS Extended) file system in use on these platforms today. Apple File System is optimized for flash and solid-state drive storage, with a primary focus on encryption.[4][5]
History
Apple File System was announced at Apple's developers conference (WWDC) in June 2016, replacing HFS+ that has been in use since 1998, in an era of floppy disks and hard drives.[4][5] It was released for iOS devices on March 27, 2017, with the release of iOS 10.3.[6][1]
Design
The file system scales from an Apple Watch to a Mac Pro. It uses 64-bit inode numbers, and allows for more secure storage. The APFS code, like the HFS+ code, uses the TRIM command, for better space management and performance. It may increase read-write speeds on iOS and macOS[1], as well as space on iOS devices, due to the way APFS calculates available data.[7]
Clones
Clones allow the operating system to make fast, power-efficient file copies on the same volume without occupying additional storage space. Modifications to the data write the new data elsewhere and continue to share the unmodified blocks. Changes to a file are saved as differences of the cloned file, reducing storage space required for document revisions and copies.[3]
Snapshots
Apple File System supports snapshots for creating a point-in-time, read-only instance of the file system.[3]
Encryption
Apple File System natively supports full disk encryption, and file encryption with the following options:
- no encryption,
- single-key encryption, and
- multi-key encryption, which encrypts each file with a separate key, with metadata encrypted with another one.[3]
Increased maximum number of files
APFS supports 64-bit inode numbers, supporting over 9 quintillion files on a single volume.
Data integrity
Apple File System uses checksums to ensure data integrity for metadata, but not user data.[8]
Crash protection
Apple File System is designed to avoid metadata corruption caused by system crashes. Instead of overwriting existing metadata records in place, it writes entirely new records, points to the new ones and then releases the old ones. This avoids corrupted records containing partial old and partial new data caused by a crash that occurs during an update. It also avoids having to write the change twice, as happens with an HFS+ journaled file system, where changes are written first to the journal and then to the catalog file.[8]
Limitations
In its first generation, Apple File System does not provide checksums for user data, but does for metadata integrity.[9] It also does not take advantage of byte-addressable non-volatile random-access memory,[10] and does not support compression yet.
Apple File System does not perform Unicode normalization, while HFS+ does.[11]
Support
macOS
Apple File System is available in macOS Sierra, albeit with numerous limitations; it is considered experimental. Among its limitations:[12]
- drives formatted with Sierra’s version of APFS may not be compatible with future versions of macOS or the final version of APFS;[citation needed]
- the only option currently available for APFS is a case-sensitive file system;
- APFS cannot be used with Time Machine, FileVault encryption, or Fusion drives.
A drive partition can be formatted with APFS in macOS Sierra with the diskutil
command-line utility. A final version is expected in 2017.[12]
iOS, tvOS, and watchOS
iOS 10.3, tvOS 10.2, and watchOS 3.2, released on March 27, 2017, convert the existing HFS+ file system to APFS on devices compatible with iOS 10, and all Apple TV and Apple Watch devices.[6][1][13]
Tests have indicated that the iPhone 5 does not support APFS.[14]
See also
References
- ^ a b c d Warren, Tom (March 27, 2017). "Apple is upgrading millions of iOS devices to a new modern file system today". The Verge. Vox Media. Retrieved March 27, 2017.
- ^ Roger Fingas (June 13, 2016). "'Apple File System' will scale from Apple Watch to Macs, replace HFS+". Apple Insider.
- ^ a b c d Hutchinson, Lee (June 13, 2016). "Digging into APFS, Apple's new file system". Ars Technica UK. Retrieved June 15, 2016.
- ^ a b Weintraub, Seth (June 13, 2016). "Apple File System (APFS) announced for 2017, scales 'from Apple Watch to Mac Pro' and focuses on encryption". 9to5Mac. Retrieved March 27, 2017.
- ^ a b Hutchinson, Lee (June 13, 2016). "New file system spotted in macOS Sierra [Updated]". Ars Technica. Condé Nast. Retrieved March 27, 2017.
- ^ a b Clover, Juli (March 27, 2017). "Apple Releases iOS 10.3 With Find My AirPods, APFS, App Store Review Tweaks and More". MacRumors. Retrieved March 27, 2017.
- ^ Alan Loughnane. "Updating your iPhone will give you one major benefit". joe.co.uk.
- ^ a b Adam Leventhal (June 19, 2016). "APFS in Detail: Data Integrity".
- ^ A ZFS developer’s analysis of the good and bad in Apple’s new APFS file system
- ^ Why Apple's APFS won't last 30 years
- ^ APFS’s “Bag of Bytes” Filenames
- ^ a b "How to Format a Drive With the APFS File System on macOS Sierra". Retrieved October 26, 2016.
- ^ "jakepetroules/Filesystem". GitHub. Retrieved March 29, 2017.
- ^ "catnapgames/TestIOSAPFSCheck". GitHub. Retrieved March 5, 2017.