For faster navigation, this Iframe is preloading the Wikiwand page for Apple文件系统.

Apple文件系统

Apple 文件系统
开发者苹果公司
全称Apple File System
发布2017年3月27日(iOS),2017年9月25日(macOS) (iOS 10.3, macOS 10.13)
分区标识7C3457EF-0000-11AA-AA11-00306543ECAC (GPT)
结构
目录内容B树[1]
限制
最大文件尺寸8 EiB[2]
最大文件数量263
文件名字符集UTF-8编码的Unicode 9.0 [3]
功能
日期记录访问、属性修改、内容修改、创建
日期范围1970年1月1日 – 2554年7月21日
日期分辨率1 纳秒[2]
文件系统权限UNIX权限,NFSv4存取控制串列
透明压缩部分 (decmpfs)[4]
透明加密
寫入時複製
操作系统支持macOSiOStvOSwatchOS

Apple文件系统(英語:Apple File System,简称APFS)是一个适用于macOSiOStvOSwatchOS的文件系统,目前由苹果公司开发和部署。[5][6][7]它的目的是解决Mac OS扩展的HFS+文件系统的核心问题。[8]APFS针对闪存固态存储设备进行优化,具有寫入時複製等设计特点,使用I/O合并改进性能。[9][10]

特点

Apple 文件系统使用64位inode号码,并允许使用更安全的存储。与HFS+类似,为了提供更好的空间管理与性能,APFS的代码使用TRIM命令。由于APFS采用全新的数据计算方式,设备的读写速度与可用空间可能会因此提升。[11]

寫入時複製

寫入時複製可以使文件系统快速、高效地在同个卷宗上复制文件,且不须占用额外存储空间。对数据的修改将写入其他位置,未修改的则继续共享使用。对文件的更改将使用差分編碼保存,减少文档修订和复制所需的存储空间。[7]

快照

APFS支持创建特定时间点、文件系统只读实例的快照[7]

加密

APFS将实现文件和敏感元数据磁盘加密。它对一个容器中的每个卷支持下列加密模型:

  • 不加密
  • 单密钥加密
  • 多密钥加密,每个文件使用单独的密钥加密,元数据再使用另一个密钥加密。[7]

数据完整性

APFS利用现代硬件固件中强大的校验和错误纠正的优势。为确保数据完整性,APFS 对元数据采用校验和技术,但未同时对用户数据采用。[12]

崩溃防护

APFS被设计为可以免受崩溃带来的数据损失。它使用“写入全新的元数据记录、指向新的记录、释放旧的记录”的逻辑,而非直接覆盖现有的记录。这能避免更新期间崩溃而导致的记录损坏,也能防止重复写入两次更改(HFS+日志文件系统需要将更改先写入日志,再写入目录文件)。[13]

限制与不足

第一代APFS不为用户数据提供校验和,但通过基于元数据的校验和检查来确保数据完整。[14]另外,它并不利用易失性存储器可比特寻址这一特性,也不支持压缩[15]

与HFS+不同的是,在macOS High Sierra测试版本之前,APFS不进行Unicode正规化[16]无法支持大多数非英语语言。[17][18]

操作系统支持

macOS

APFS于macOS Sierra中提供,但存在一些限制:

  • 使用macOS Sierra格式化所得到的磁盘可能并不会与未来版本的macOS兼容,并也可能不与macOS的最终版本兼容。
  • APFS的可用选项有“区分大小写”,“加密”,“区分大小写,加密”。
  • 关于Time MachinemacOS Catalina (10.15) 及先前版本不能备份到 APFS 格式的磁盘[19],而在macOS Big Sur(11)中支持备份至APFS格式的硬盘[20]
  • macOS 10.14 前的系統不兼容Fusion Drive
  • 在macOS的磁盘工具中,可通过“菜单-编辑-转换为APFS”无损把HFS+分区转换为APFS分区,但不能无损把APFS分区转换回HFS+分区。

在macOS Sierra中可使用diskutil命令行工具将分区格式化为APFS。APFS 在 macOS High Sierra(10.13)之後將成為預設的檔案格式。

iOS、tvOS与watchOS

所有兼容的设备升级到iOS 10.3tvOS 10.2watchOS 3.2,会将HFS+文件系统转换为APFS。[21]有测试表明APFS不支持32位的设备,例如iPhone 5[22]

第三方工具

Paragon软件公司英语Paragon_Software_Group公司发布了一个遵循四句版BSD许可证软件开发工具包,提供对APFS驱动器的只读访问支持[23]。由Joachim Metz独立开发的实现APFS驱动器只读访问的开源实现libfsapfs按GNU宽通用公共许可证第三版发布,并已打包到DebianFedora LinuxRocky LinuxRed Hat Enterprise LinuxUbuntu等Linux发行版的软件仓库。[24][25][26]上述两个工具是命令行工具,不提供通常的文件系统驱动程序接口。Linux上有一个名为apfs-fuse的用户空间文件系统驱动程序,能提供APFS驱动器的只读访问支持。[27]还有名为“APFS for Linux”的项目正努力将APFS支持集成到Linux内核。[28]

Paragon软件公司推出的商业软件APFS for Windows对Windows 7到Windows 11及Windows Server 2008 R2到Windows Server 2022的所有版本提供APFS卷的读写支持,但不支持格式化或验证APFS卷,也不能读取受Apple T2安全芯片保护的加密APFS卷。[29]

参见

参考资料

  1. ^ Hansen, K.H.; Toolan, F. Decoding the APFS file system. Digital Investigation. 2017-09-21, 22: 107–132. ISSN 1742-2876. doi:10.1016/j.diin.2017.07.003. 
  2. ^ 2.0 2.1 Volume Format Comparison. Apple Developer. [2018-05-25]. (原始内容存档于2017-09-05) (英语). 
  3. ^ Apple File System Guide / Frequently Asked Questions. [2018-05-25]. (原始内容存档于2017-08-29). 
  4. ^ Bertin, René. Compression and APFS. Github. [2019-02-02]. (原始内容存档于2020-10-21). 
  5. ^ Apple is upgrading millions of iOS devices to a new modern file system today. The Verge. 2017-03-27 [2017-04-02]. (原始内容存档于2017-03-27). 
  6. ^ Roger Fingas. 'Apple File System' will scale from Apple Watch to Macs, replace HFS+. Apple Insider. June 13, 2016 [2016-06-23]. (原始内容存档于2016-07-23). 
  7. ^ 7.0 7.1 7.2 7.3 Hutchinson, Lee. Digging into APFS, Apple's new file system. Ars Technica UK. 13 June 2016 [15 June 2016]. (原始内容存档于2017-07-23). 
  8. ^ 进步与缺憾 资深开发者讲解苹果新文件系统. 威锋网. [2016-06-29]. (原始内容存档于2019-12-04). 
  9. ^ Weintraub, Seth. Apple File System (APFS) announced for 2017, scales ‘from Apple Watch to Mac Pro’ and focuses on encryption. 9to5Mac. 2016-06-13 [2017-04-02]. (原始内容存档于2017-03-28). 
  10. ^ New file system spotted in macOS Sierra [Updated]. Ars Technica. [2017-04-02]. (原始内容存档于2017-03-28) (美国英语). 
  11. ^ Updating your iPhone will give you one major benefit. JOE.co.uk. [2017-06-09]. (原始内容存档于2017-05-20) (英语). 
  12. ^ Adam Leventhal. APFS in Detail: Data Integrity. June 19, 2016 [2016-06-23]. (原始内容存档于2016-06-21). 
  13. ^ APFS in Detail: Data Integrity. dtrace.org. [2017-06-09]. (原始内容存档于2016-06-21). 
  14. ^ A ZFS developer’s analysis of the good and bad in Apple’s new APFS file system. Ars Technica. [2017-01-28]. (原始内容存档于2017-06-19) (美国英语). 
  15. ^ Harris, Robin. Why Apple's APFS won't last 30 years | ZDNet. ZDNet. [2017-01-28]. (原始内容存档于2017-04-06) (英语). 
  16. ^ Tsai, Michael J. APFS's "Bag of Bytes' Filenames. mjtsai.com. [2017-06-09]. (原始内容存档于2021-01-24) (英语). 
  17. ^ hoakley. APFS is currently unusable with most non-English languages. The Eclectic Light Company. 2017-04-06 [2017-06-09]. (原始内容存档于2017-06-08). 
  18. ^ Inc., Apple. What's new in Apple File System - WWDC 2017 - Videos - Apple Developer. Apple Developer. [2017-08-03]. (原始内容存档于2021-05-07) (美国英语). 
  19. ^ 在 Mac 上可以与时间机器配合使用的磁盘类型. Apple Support. [2020-07-15]. (原始内容存档于2020-07-15) (中文(中国大陆)). 
  20. ^ APFS changes affect Time Machine in macOS Big Sur, encrypted drives in iOS 14. AppleInsider. [2020-07-15]. (原始内容存档于2021-01-22) (英语). 
  21. ^ Clover, Juli. Apple Releases iOS 10.3 With Find My AirPods, APFS, App Store Review Tweaks and More. [2017-04-02]. (原始内容存档于2017-03-27). 
  22. ^ Andrle, Tomas, TestIOSAPFSCheck: Trying to programmatically detect if filesystem is APFS, 2017-06-02 [2017-06-09] [永久失效連結]
  23. ^ Paragon Software Group Releases Free Paragon APFS SDK Community Edition for Software Developers, OEMs, Forensic Experts. Paragon Software Group. [2024-03-21]. (原始内容存档于2024-03-21).  GitHub页面存档备份,存于互联网档案馆
  24. ^ libyal/libfsapfs. GitHub. 7 November 2019 [2024-03-21]. (原始内容存档于2024-05-05). Library and tools to access the Apple File System (APFS) 
  25. ^ apfs-fuse - Fedora Packages. packages.fedoraproject.org. [2022-10-20]. (原始内容存档于2024-05-15). 
  26. ^ apfs-fuse-20200928-1.el9.x86_64.rpm. rhel.pkgs.org. [失效連結]
  27. ^ Ross, Alistair. How to mount macOS APFS disk volumes in Linux. The Ultimate Linux Newbie Guide. 23 February 2019 [2024-03-21]. (原始内容存档于2024-03-21).  (Github页面存档备份,存于互联网档案馆))
  28. ^ linux-apfs/linux-apfs-rw: APFS module for linux, with experimental write support. GitHub. APFS for Linux. 4 Feb 2022 [2024-03-21]. (原始内容存档于2024-05-05). 
  29. ^ APFS for Windows | Paragon Software. Paragon Software Group. [29 January 2024]. (原始内容存档于2024-05-20). 

外部链接

{{bottomLinkPreText}} {{bottomLinkText}}
Apple文件系统
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?