Content deleted Content added
Linus Tags: Reverted possible vandalism Visual edit |
→Third-party utilities: section |
||
(31 intermediate revisions by 21 users not shown) | |||
Line 1:
{{
{{distinguish|text=Apple File Service (AFS), the service implementing the [[Apple Filing Protocol]] (AFP)}}
{{distinguish|text=[[Andrew File System]] (AFS), the distributed file system}}
{{Use mdy dates|date=May 2018}}
{{Infobox filesystem
| name
| full_name
| developer
| introduction_os
| introduction_date
|'''iOS''': {{date and age|27 March 2017 | p=y}}
| preceded_by = [[HFS Plus]]▼
|'''macOS''': {{date and age|25 September 2017 | p=y}}
| succeeded_by =▼
}}
| partition_id = <code>7C3457EF-0000-11AA-AA11-00306543ECAC</code> ([[GUID Partition Table|GPT]])▼
| directory_struct = [[B-tree]]<ref name="hansenToolan2017">{{Cite journal|last1=Hansen|first1=K.H.|last2=Toolan|first2=F.|date=September 21, 2017|title=Decoding the APFS file system|journal=Digital Investigation|volume=22|pages=107–132|doi=10.1016/j.diin.2017.07.003|issn=1742-2876|df=mdy-all}}</ref>▼
| max_files_no = 9,223,372,036,854,775,808<ref name="appleVolumeComparision"/>▼
| max_file_size = 8 [[Exabyte|EB]] (9,223,372,036,854,775,808 bytes)<ref name="appleVolumeComparision">{{Cite web|url=https://developer.apple.com/library/content/documentation/FileManagement/Conceptual/APFS_Guide/VolumeFormatComparison/VolumeFormatComparison.html|title=Volume Format Comparison|website=Apple Developer|language=en|access-date=May 25, 2018|df=mdy-all}}</ref>▼
▲| directory_struct
| date_range = {{date|1970-01-01|MDY}} – {{date|2554-07-21|MDY}}<ref name="hansenToolan2017"/>▼
|
▲| max_file_size
| max_filename_size = ▼
| filename_character_set = [[Unicode|Unicode 9.0]] encoded in [[UTF-8]]<ref name="appleApfsFaq2018"/>▼
▲|
| dates_recorded = access, attributes modified, contents modified, created▼
▲| filename_character_set
| file_system_permissions = Unix permissions, [[NFSv4]] [[Access control list|ACL]]s
| compression
| encryption
| copy_on_write
| OS
| website
}}
'''Apple File System''' ('''APFS''') is a [[Proprietary software|proprietary]] [[file system]] developed and deployed by [[Apple Inc.]] for [[macOS]] [[macOS Sierra| Sierra (10.12.4)]]<ref name="TechRepublic 2017.04.13">{{cite news |last1=Vigo |first1=Jesus |title=How to set up and use Apple's APFS file system on macOS Sierra |url=https://www.techrepublic.com/article/how-to-set-up-and-use-apples-apfs-file-system-on-macos-sierra/ |publisher=TechRepublic |date=13 Apr 2017}}</ref> and later, [[iOS]] [[iOS 10 |10.3]], [[tvOS]] 10.2,<ref>{{cite web|url=https://developer.apple.com/library/content/releasenotes/General/WhatsNewinTVOS/Articles/tvOS10_2.html|title=tvOS 10.2|work=What's New in tvOS|publisher=Apple Inc.}}</ref> [[watchOS]] 3.2,<ref name="The Verge update today"/> and all versions of [[iPadOS]].<ref>{{cite web|url=http://appleinsider.com/articles/16/06/13/apple-file-system-will-scale-from-apple-watch-to-macs-replace-hfs|title='Apple File System' will scale from Apple Watch to Macs, replace HFS+|author=Roger Fingas|date=June 13, 2016|publisher=[[Apple Insider]]|url-status=live|archive-url=https://web.archive.org/web/20160723030751/http://appleinsider.com/articles/16/06/13/apple-file-system-will-scale-from-apple-watch-to-macs-replace-hfs|archive-date=July 23, 2016|df=mdy-all}}</ref><ref name="digging-into-apfs">{{Cite web |
== History ==
Line 36 ⟶ 39:
==Design==
The file system can be used on devices with relatively small or large amounts of storage. It uses 64-bit [[inode]] numbers,<ref name="appleVolumeComparision"/> and allows for more secure storage
=== Partition scheme ===
Line 45 ⟶ 48:
=== Clones ===
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 encoding|delta extents]], reducing storage space required for document revisions and copies.<ref name="digging-into-apfs"/> 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]].
The feature is automatically available when a user copies any files using the [[Finder (software)|Finder]] application, which is [[macOS]]'s default [[file manager]], but not when using the <code>[[cp (Unix)|cp]]</code> command.<ref>{{cite web|title=A ZFS developer's analysis of the good and bad in Apple's new APFS file system|website=Ars Technica|date=2016-06-26|url=https://arstechnica.com/gadgets/2016/06/a-zfs-developers-analysis-of-the-good-and-bad-in-apples-new-apfs-file-system/|ref={{sfnref|Ars Technica|2016}}|access-date=2025-02-17|quote="Side note: Finder copy creates space-efficient clones, but cp from the command line does not."}}</ref> To do that on the [[command-line]], the <code>cp</code> utility on macOS has a <code>-c</code> parameter that allows it to use the <code>clonefile</code> [[system call]].<ref>{{cite web|title=[dedup] Use APFS clone (CoW) on macOS · Issue #219 · pkolaczk/fclones|website=GitHub|date=2023-08-10|url=https://github.com/pkolaczk/fclones/issues/219|access-date=2025-02-17}}</ref>
=== Snapshots ===
Line 59 ⟶ 64:
=== Data integrity ===
Apple File System uses [[checksum]]s to ensure [[data integrity]] for [[file system#metadata|metadata]] but not for the actual user data, relying instead on [[error-correcting code]] (ECC) mechanisms in the [[computer data storage|storage]] [[computer hardware|hardware]].<ref name="leventhalPage5">{{cite web|url=http://dtrace.org/blogs/ahl/2016/06/19/apfs-part5/|author=Adam Leventhal|date=June 19, 2016|title=APFS in Detail: Data Integrity|url-status=live|archive-url=https://web.archive.org/web/20160621060302/http://dtrace.org/blogs/ahl/2016/06/19/apfs-part5/|archive-date=June 21, 2016|df=mdy-all}}</ref>
=== Crash protection ===
Line 77 ⟶ 82:
=== Performance on hard disk drives ===
Enumerating files, and any [[inode]] metadata in general, is much slower on APFS when it is located on a [[hard disk drive]] (HDD). This is because instead of storing [[File system#metadata|metadata]] at a fixed ___location like [[HFS+]] does, APFS stores them alongside the actual file data.
Besides that, a key feature of APFS is "[[copy-on-write]]," which allows for rapid file duplication by creating references to the original data rather than copying it outright. This feature enables functionalities like [[snapshot (computer storage)|snapshot]]s and quick file copies. However, when files are modified after being copied, APFS creates new extents ([[data block]]s) for the changes, leading to more fragmentation over time. This issue is exacerbated with applications like [[Time Machine (macOS)|Time Machine]], which creates multiple versions of files, further increasing fragmentation and slowing [[computer performance|performance]].<ref>{{cite web|title=APFS Is Not Yet Ready for Traditional Hard Drives|website=Larry Jordan|date=2017-12-03|url=https://larryjordan.com/blog/apfs-is-not-yet-ready-for-traditional-hard-drives/|ref={{sfnref|Larry Jordan|2017}}|access-date=2025-02-17}}</ref> As a result, APFS is generally not recommended for use on HDDs, particularly for workloads involving frequent file modifications, copying, or snapshot usage.<ref>{{cite web|last=Tim|first=OWC|title=Using APFS On HDDs ... And Why You Might Not Want To|website=Rocket Yard|date=2017-11-29|url=https://eshop.macsales.com/blog/43043-using-apfs-on-hdds-and-why-you-might-not-want-to/|access-date=2025-02-17}}</ref>
=== Compatibility with Time Machine prior to macOS 11===
Line 99 ⟶ 106:
=== Third-party utilities ===
{{Update-section|reason=Software companies have had a long time to update their software to support APFS. The article should reflect recent developments.|date=August 2025}}
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.<ref>{{cite web | url=https://www.alsoft.com/diskwarrior5apfs | title=DiskWarrior 5.2 & Apple File System (APFS) | access-date=2020-06-28}}</ref> 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]] <!-- Not OSI approved, so not really open source? --> that supports read-only access of APFS drives.<ref>{{cite web |title=Paragon Software Group Releases Free Paragon APFS SDK Community Edition for Software Developers, OEMs, Forensic Experts |url=https://www.paragon-software.com/paragon-software-group-releases-free-paragon-apfs-sdk-community-edition-for-software-developers-oems-forensic-experts/ |website=Paragon Software Group}} [https://github.com/Paragon-Software-Group/paragon_apfs_sdk_ce GitHub]</ref> 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.<ref>{{cite web |title=libyal/libfsapfs |url=https://github.com/libyal/libfsapfs |website=GitHub |date=7 November 2019 |quote=Library and tools to access the Apple File System (APFS)}}</ref><ref>{{Cite web |title=apfs-fuse - Fedora Packages |url=https://packages.fedoraproject.org/pkgs/apfs-fuse/apfs-fuse/ |access-date=2022-10-20 |website=packages.fedoraproject.org}}</ref><ref>{{Cite web |url=https://rhel.pkgs.org/9/forensics-x86_64/apfs-fuse-20200928-1.el9.x86_64.rpm.html|title=apfs-fuse-20200928-1.el9.x86_64.rpm|website=rhel.pkgs.org}}</ref> 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.<ref>{{cite web |last1=Ross |first1=Alistair |title=How to mount macOS APFS disk volumes in Linux |url=https://linuxnewbieguide.org/how-to-mount-macos-apfs-disk-volumes-in-linux/ |website=The Ultimate Linux Newbie Guide |date=23 February 2019}} ([https://github.com/sgan81/apfs-fuse Github])</ref> An "APFS for Linux" project is working to integrate APFS support into the Linux kernel.<ref>{{cite web |title=linux-apfs/linux-apfs-rw: APFS module for linux, with experimental write support |url=https://github.com/linux-apfs/linux-apfs-rw |website=GitHub |publisher=APFS for Linux |date=4 Feb 2022}}</ref>
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.<ref>{{cite web |title=APFS for Windows {{!}} Paragon Software |url=https://www.paragon-software.com/home/apfs-windows/ |website=Paragon Software Group |access-date=29 January 2024}}</ref>
== See also ==
*[[Comparison of file systems]]
==Notes==
:A.{{note label|disputed|A|none}}Disputed <ref>{{Cite web |title=libfsapfs/documentation/Apple File System (APFS).asciidoc at main · libyal/libfsapfs |url=https://github.com/libyal/libfsapfs/blob/main/documentation/Apple%20File%20System%20(APFS).asciidoc |access-date=2025-05-30 |website=GitHub |language=en}}</ref>
== References ==
|