Apple Quietly Upgrades the File System of Millions of iOS Devices
With the release of iOS 10.3 to the general public, millions of devices will be upgraded to Apple’s new file system, APFS, in what is a bold, yet not risk-free move, according to several commentators.
Presented at the last WWDC and covered by InfoQ at the time, APFS is the replacement for the almost 20 year old HFS+ file system that was introduced with Mac OS 8.1, sporting a number of features that put it in the same category as ZFS and HAMMER, including advanced support for encryption, copy-on-write, flexible partitioning, snapshots, atomic saves, and more.
As many developers who had previously installed iOS 10.3 beta versions, users installing the official 10.3 release on their devices have been experiencing a rather lengthy upgrade process, seemingly due to the file system conversion, but no reports of any significant issues are known at the time of writing.
Interestingly, this is APFS's official debut, since it has been previously available on macOS Sierra only as a developer preview, and with a number of limitations including the impossibility of using an APFS-formatted disk as a startup disk. This makes it even more surprising that Apple decided to push a file system conversion on tens of millions of devices almost at once, which would amplify greatly the impact of any issues. Still, as Ars Technica's Andrew Cunningham remarked, the move makes more sense when you consider that Apple controls the iOS platform and knows every detail of the hardware and partition schemes used. Additionally, the closed nature of iOS devices makes it pretty unlikely that non-jailbroken users have messed with their devices' storage, adding further predictability to the picture.
This does not mean, however, that upgrading to APFS will not have some undesirable consequences for a number of users. As macOS and iOS developer Michael Tsai wrote in his blog, there are a number of things that make APFS intrinsically at odds with HFS+, including the way APFS does not normalize Unicode filenames, or the fact that APFS allows multiple files whose names differ only in the case of existing in the same directory. InfoQ will keep an eye on such kind of issues and report back if anything interesting arises.
As to the technical merit of upgrading a file system in a transparent way for users, Reddit user applishish explains that the migration does not actually move data, but rather it writes APFS metadata into HFS+ free space. The advantage of this approach is that if anything goes wrong with the conversion, the user is still left with a valid HFS+ partition. In the same thread, Reddit user 1337Gandalf says Apple’s move is somewhat reminiscent of Microsoft’s when introducing XP and dealing with the upgrade to NTFS from FAT32 volumes, although in that case the user was given the option whether to upgrade to NTFS during the upgrade process or not.