Developer(s) | Apple Inc. |
---|---|
Full name | Apple File System |
Introduced |
|
Preceded by | HFS Plus |
Partition IDs | 7C3457EF-0000-11AA-AA11-00306543ECAC (GPT) |
Structures | |
Directory contents | B-tree [1] |
Limits | |
Max file size | 8 Exabyte (9,223,372,036,854,775,808 bytes) [2] |
Max no. of files | 9,223,372,036,854,775,808 [2] |
Allowed filename characters | Unicode 9.0 encoded in UTF-8 [3] |
Features | |
Dates recorded | access, attributes modified, contents modified, created |
Date range | January 1, 1970 – July 21, 2554 [1] |
Date resolution | 1 nanosecond [2] |
File system permissions | Unix permissions, NFSv4 ACLs |
Transparent compression | Partial (decmpfs) [4] |
Transparent encryption | Yes [5] |
Copy-on-write | Yes [3] [5] |
Other | |
Supported operating systems | macOS, iPadOS, iOS, tvOS, watchOS |
Apple File System (APFS) is a proprietary file system developed and deployed by Apple Inc. for macOS Sierra (10.12.4) [6] and later, iOS 10.3, tvOS 10.2, [7] watchOS 3.2, [8] and all versions of iPadOS. [9] [10] It aims to fix core problems of HFS+ (also called Mac OS Extended), APFS's predecessor on these operating systems. APFS is optimized for solid-state drive storage and supports encryption, snapshots, and increased data integrity, among other capabilities. [11] [12]
Apple File System was announced at Apple's developers’ conference (WWDC) in June 2016 as a replacement for HFS+, which had been in use since 1998. [11] [12] APFS was released for 64-bit iOS devices on March 27, 2017, with the release of iOS 10.3, and for macOS devices on September 25, 2017, with the release of macOS 10.13. [13] [8]
Apple released a partial specification for APFS in September 2018 which supported read-only access to Apple File Systems on unencrypted, non-Fusion storage devices. The specification for software encryption was documented later. [14]
The file system can be used on devices with relatively small or large amounts of storage. It uses 64-bit inode numbers, [2] and allows for more secure storage by using a technology called Data Protection. 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, [8] as well as space on iOS devices, due to the way APFS calculates available data. [15]
APFS uses the GPT partition scheme. Within the GPT scheme are one or more APFS containers (partition type GUID is 7C3457EF-0000-11AA-AA11-00306543ECAC). Within each container there are one or more APFS volumes, all of which share the allocated space of the container, and each volume may have APFS volume roles. macOS Catalina (macOS 10.15) introduced the APFS volume group, which are groups of volumes that Finder displays as one volume. APFS firmlinks lie between hard links and soft links and link between volumes.
In macOS Catalina the System volume role (usually named "Macintosh HD") became read-only, and in macOS Big Sur (macOS 11) it became a signed system volume (SSV) and only volume snapshots are mounted. The Data volume role (usually named "Macintosh HD - Data") is used as an overlay or shadow of the System volume, and both the System and Data volumes are part of the same volume group and shown as one in Finder.
Clones allow the operating system to make efficient file copies on the same volume without occupying additional storage space. Changes to a cloned file are saved as delta extents, reducing storage space required for document revisions and copies. [10] There is, however, no interface to mark two copies of the same file as clones of the other, or for other types of data deduplication.
APFS volumes support snapshots for creating a point-in-time, read-only instance of the file system. [10]
Apple File System natively supports full disk encryption, [2] and file encryption with the following options:
APFS supports 64-bit inode numbers, supporting over 9 quintillion files (263) on a single volume. [2] [5]
Apple File System uses checksums to ensure data integrity for metadata but not for user data. [16]
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, an approach known as redirect-on-write. 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. [16]
APFS supports transparent compression on individual files using Deflate (Zlib), LZVN (libFastCompression), and LZFSE. All three are Lempel-Ziv-type algorithms. This feature is inherited from HFS+, and is implemented with the same AppleFSCompression / decmpfs system using resource forks or extended attributes. As with HFS+, the transparency is broken for tools that do not use decmpfs-wrapped routines. [17]
APFS adds the ability to have multiple logical drives (referred to as volumes) in the same container where free space is available to all volumes in that container (block device). [18]
While APFS includes numerous improvements relative to its predecessor, HFS+, a number of limitations have been noted.
APFS does not provide checksums for user data. [19] It also does not take advantage of byte-addressable non-volatile random-access memory. [20] [21]
Enumerating files, and any inode metadata in general, is much slower on APFS when it is located on a hard disk drive. This is because instead of storing metadata at a fixed location like HFS+ does, APFS stores them alongside the actual file data. This fragmentation of metadata means more seeks are performed when listing files, acceptable for SSDs but not HDDs. [22]
Unlike HFS+, APFS does not support hard links to directories. [3] [23] Since the version of the Time Machine backup software included in Mac OS X 10.5 (Leopard) through macOS 10.15 (Catalina) relied on hard links to directories, APFS was initially not a supported option for its backup volumes. [24] [23] This limitation was overcome starting in macOS 11 Big Sur, wherein APFS is now the default file system for new Time Machine backups (existing HFS+-formatted backup drives are also still supported). [25] macOS Big Sur's implementation of Time Machine in conjunction with APFS-formatted drives enables "faster, more compact, and more reliable backups" than were possible with HFS+-formatted backup drives. [26] [27]
An experimental version of APFS, with some limitations, is provided in macOS Sierra 10.12.4. It is available through the command line diskutil
utility. Among these limitations, it does not perform Unicode normalization while HFS+ does, [33] leading to problems with languages other than English. [34] Drives formatted with Sierra’s version of APFS may also not be compatible with later versions of macOS or APFS, and the Sierra version of APFS cannot be used with Time Machine, FileVault volumes, or Fusion Drives. [35]
Since macOS 10.13 High Sierra, all devices with flash storage are automatically converted to APFS. [36] As of macOS 10.14 Mojave, Fusion Drives and hard disk drives are also upgraded on installation. [37] The primary user interface to upgrade does not present an option to opt out of this conversion, and devices formatted with the High Sierra version of APFS will not be readable in previous versions of macOS. [36] Users can disable APFS conversion by using the installer's startosinstall
utility on the command line and passing --converttoapfs NO
. [38]
FileVault volumes are not converted to APFS as of macOS Big Sur 11.2.1. Instead macOS formats external FileVault drives as CoreStorage Logical Volumes formatted with Mac OS Extended (Journaled). FileVault drives can be optionally encrypted.[ citation needed ]
iOS 10.3, tvOS 10.2, and watchOS 3.2 convert the existing HFSX file system to APFS on compatible devices. [13] [8] [39]
Despite the ubiquity of APFS volumes in today's Macs and the format's 2016 introduction, third-party repair utilities continue to have notable limitations in supporting APFS volumes, due to Apple's delayed release of complete documentation. According to Alsoft, the maker of DiskWarrior, Apple's 2018 release of partial APFS format documentation has delayed the creation of a version of DiskWarrior that can safely rebuild APFS disks. [40] Competing products, including MicroMat's TechTool and Prosoft's Drive Genius, are expected to increase APFS support as well.
Paragon Software Group has published a software development kit under the 4-Clause BSD License that supports read-only access of APFS drives. [41] An independent read-only open source implementation by Joachim Metz, libfsapfs, is released under GNU Lesser General Public License v3. It has been packaged into Debian, Fedora Linux, Rocky Linux, Red Hat Enterprise Linux and Ubuntu software repositories. [42] [43] [44] Both are command-line tools that do not expose a normal filesystem driver interface. There is a Filesystem in Userspace (FUSE) driver for Linux called apfs-fuse with read-only access. [45] An "APFS for Linux" project is working to integrate APFS support into the Linux kernel. [46]
A commercial product, Paragon's APFS for Windows, allows for read and write support to APFS volumes in all versions of Windows from Windows 7 through Windows 11 and Windows Server 2008 R2 through Windows Server 2022, but it is unable to format or verify APFS volumes, and it cannot read APFS volumes which are hardware-encrypted against the Apple T2 security chip. [47]
Hierarchical File System (HFS) is a proprietary file system developed by Apple Inc. for use in computer systems running Mac OS. Originally designed for use on floppy and hard disks, it can also be found on read-only media such as CD-ROMs. HFS is also referred to as Mac OS Standard, while its successor, HFS Plus, is also called Mac OS Extended.
A resource fork is a fork of a file on Apple's classic Mac OS operating system that is used to store structured data. It is one of the two forks of a file, along with the data fork, which stores data that the operating system treats as unstructured. Resource fork capability has been carried over to the modern macOS for compatibility.
XNU is the computer operating system (OS) kernel developed at Apple Inc. since December 1996 for use in the Mac OS X operating system and released as free and open-source software as part of the Darwin OS, which, in addition to being the basis for macOS, is also the basis for Apple TV Software, iOS, iPadOS, watchOS, visionOS, and tvOS.
Macintosh File System (MFS) is a volume format created by Apple Computer for storing files on 400K floppy disks. MFS was introduced with the original Apple Macintosh computer in January 1984.
HFS Plus or HFS+ is a journaling file system developed by Apple Inc. It replaced the Hierarchical File System (HFS) as the primary file system of Apple computers with the 1998 release of Mac OS 8.1. HFS+ continued as the primary Mac OS X file system until it was itself replaced with the Apple File System (APFS), released with macOS High Sierra in 2017. HFS+ is also one of the formats supported by the iPod digital music player.
In computing, a file system or filesystem governs file organization and access. A local file system is a capability of an operating system that services the applications running on the same computer. A distributed file system is a protocol that provides file access between networked computers.
In computing, an extent is a contiguous area of storage reserved for a file in a file system, represented as a range of block numbers, or tracks on count key data devices. A file can consist of zero or more extents; one file fragment requires one extent. The direct benefit is in storing each range compactly as two numbers, instead of canonically storing every block number in the range. Also, extent allocation results in less file fragmentation.
Disk Utility is a system utility for performing disk and disk volume-related tasks on the macOS operating system by Apple Inc.
The following tables compare general and technical information for a number of file systems.
The Sleuth Kit (TSK) is a library and collection of Unix- and Windows-based utilities for extracting data from disk drives and other storage so as to facilitate the forensic analysis of computer systems. It forms the foundation for Autopsy, a better known tool that is essentially a graphical user interface to the command line utilities bundled with The Sleuth Kit.
Time Machine is the backup mechanism of macOS, the desktop operating system developed by Apple. The software is designed to work with both local storage devices and network-attached disks, and is commonly used with external disk drives connected using either USB or Thunderbolt. It was first introduced in Mac OS X 10.5 Leopard, which was released in October 2007 and incrementally refined in subsequent releases of macOS. Time Machine was revamped in macOS 11 Big Sur to support APFS, thereby enabling "faster, more compact, and more reliable backups" than were possible previously.
Target Disk Mode is a boot mode unique to Macintosh computers.
Paragon Software Group is a German software company that develops hard drive management software, low-level file system drivers and storage technologies. The Smart Handheld Device Division (SHDD) offers multilingual dictionaries, multilingual handwriting recognition, weather information, and two-way data synchronization with desktop devices.
AppleDisk Image is a disk image format commonly used by the macOS operating system. When opened, an Apple Disk Image is mounted as a volume within the Finder.
Tuxera Inc. is a Finnish company that develops and sells file systems, flash management and networking software. The company was founded in 2008 and is headquartered in Espoo, Finland. Tuxera's other offices are located in the US, South Korea, Japan, Hungary, Germany, Taiwan and China.
macOS Sierra is the thirteenth major release of macOS, Apple Inc.'s desktop and server operating system for Macintosh computers. The name "macOS" stems from the intention to unify the operating system's name with that of iOS, watchOS and tvOS. Sierra is named after the Sierra Nevada mountain range in California and Nevada. Specifically, Lone Pine Peak is the location for macOS Sierra's default wallpaper. Its major new features concern Continuity, iCloud, and windowing, as well as support for Apple Pay and Siri.
macOS High Sierra is the fourteenth major release of macOS, Apple Inc.'s desktop operating system for Macintosh computers. macOS High Sierra was announced at the WWDC 2017 on June 5, 2017 and was released on September 25, 2017. The name "High Sierra" refers to the High Sierra region in California. Its name signified its goal to be a refinement of the previous macOS version, macOS Sierra, focused on performance improvements and technical updates rather than features. This makes it similar to previous macOS releases Snow Leopard, Mountain Lion and El Capitan. Among the apps with notable changes are Photos and Safari.
macOS Mojave is the fifteenth major release of macOS, Apple Inc.'s desktop operating system for Macintosh computers. Mojave was announced at Apple's Worldwide Developers Conference on June 4, 2018, and was released to the public on September 24, 2018. The operating system's name refers to the Mojave Desert, and is part of a series of California-themed names that began with OS X Mavericks. It succeeded macOS High Sierra and was followed by macOS Catalina. macOS Mojave is the last version of macOS that features the iTunes and Dashboard apps.
macOS Big Sur is the seventeenth major release of macOS, Apple's operating system for Macintosh computers. It was announced at Apple's Worldwide Developers Conference (WWDC) on June 22, 2020, and was released to the public on November 12, 2020.
APFS right now is incompatible with Time Machine due to the lack of directory hard links, a fairly disgusting implementation that likely contributes to Time Machine's questionable reliability.
Library and tools to access the Apple File System (APFS)