Archive for April 3, 2024

Wednesday, April 3, 2024

Seven Years of APFS

Howard Oakley:

Although APFS has certainly had its moments over the last seven years, Apple’s gambles have paid off, and proved key to the success of Apple silicon Macs. Had there been no APFS, many of the fundamental technologies like Secure Boot and the Signed System Volume (SSV) would have been far tougher if not impossible to implement.

[…]

What has attracted almost no attention, though, is how APFS is designed to prolong the working life of SSDs by minimising the number of write/erase cycles. Although the user may be unable to realise the space efficiency achieved with the use of sparse and clone files, for instance, by reducing the number of storage blocks actually written in order to store files, with APFS each write/erase cycle should store unique data rather than needless copies or null data.

This is of little or no comfort to those condemned to use hard disks for storage, even if only for Time Machine backups. Although the great majority of APFS users’ devices will never be connected to a hard disk, for the small minority running it in macOS, they remain the medium of choice for backups and other bulk storage, and vulnerable to performance degradation resulting from fragmentation by the file system.

[…]

Although Apple dropped early hints that APFS might be released as open source, after seven years information about its internals released by Apple still appears to be insufficient to allow third-party developers to create maintenance tools independent of those bundled in macOS. This isn’t just about the potential for someone outside Apple to improve on the performance of fsck or Disk Utility, but also concerns features that Apple shows no sign of supporting.

For me, the biggest issues are:

Previously:

A Disk So Full, It Couldn’t Be Restored

Glenn Fleishman (Mastodon):

Turned out, my kid had managed a neat trick, though they were not alone: they had filled macOS’s startup volume storage so full that the operating system was incapable of deleting files in any fashion. Instead of halting the massive Steam download when the drive became disastrously full, macOS continued to write files until there was just 41K free on the drive.

[…]

Due to our gigabit Internet connection and the size of the Steam file, macOS outstripped its ability to throttle filling storage because it was also making a local Time Machine snapshot.

[…]

It was time to restart to see if it would clear caches. Unfortunately, restarting left the Mac unable to start up at all. No matter what I tried, it would reach about halfway through the progress bar before failing.

[…]

I shifted to recoveryOS, Apple’s somewhat new name for the special disk partition in macOS that lets you run operations on the main startup volume while it’s not mounted, including Disk Utility repairs and reinstallation. From there, I hit the wall as well, as Terminal commands continued to fail with the same error.

He had to erase the Mac and ran into a Sonoma bug trying to restore from a network Time Machine backup.

Previously:

Checking Bootable Systems Using bputil

Howard Oakley:

Apple gives the user control over the level of security to be used, in Startup Security Utility, in Recovery. For this to work with boot volume groups (BVGs), each must have its own set of boot security policies, determined by its LocalPolicy.

Without a valid LocalPolicy, Apple silicon Macs will refuse to boot from what would otherwise be a bootable BVG. This article extends my previous account of what makes a disk bootable by explaining more about LocalPolicy, and how you can use the command tool bputil to check it.

[…]

LocalPolicy is created when installing macOS to an external disk, when the boot volume group on that disk is assigned its Owner. It can also be created when selecting the boot volume group on a bootable external disk to be the startup disk, if it doesn’t already have a valid LocalPolicy, for example when you want to boot from an external disk previously created using another Mac. This is commonly the point at which failure occurs.

Previously:

Apple’s Problem With Lina Khan

Matt Stoller (ArsTechnica):

As part of the claim outside of the smartphone, the Antitrust Division asserted that “Apple’s conduct extends beyond just monopoly profits and even affects the flow of speech. For example, Apple is rapidly expanding its role as a TV and movie producer and has exercised that role to control content.” Some economists mocked the suit, suggesting, among other things, that political power should have no role in analysis of how monopolies function.

A recent incident should have disabused us all of that naive illusion. Last night, Jon Stewart interviewed Federal Trade Commission Chair Lina Khan on the Daily Show. Stewart, after a long hiatus, which included a stint doing a podcast for Apple TV+, resumed hosting the show he made famous, even if only one night a week. During the interview with Khan, he said that Apple had blocked him from interviewing her while he was at Apple. “They literally said, please don’t talk to her,” he offered. Stewart also noted that Apple had told him not to do segments on artificial intelligence, adding to his earlier complaints about Apple’s refusal to sanction discussions of China.

Note that Stewart was trying to interview Khan for his podcast, not for his actual Apple TV+ show.

Previously:

Update (2024-04-24): John Gruber:

The thing I don’t understand about this is why Apple ever hired Stewart to do that show, or why Stewart agreed to do that show with Apple. Based on, you know, the entire body of Stewart’s work, it’s obvious that Lina Khan is exactly the sort of person he’d want to interview. It’s not like something changed. My only guess is that the part of Apple that agreed to host The Problem With Jon Stewart didn’t get buy-in from the top of the company. But I find that hard to believe. It just doesn’t make sense. It’s like hiring Martha Stewart to do a show and then asking her not to do any cooking segments.

Personally, I think Apple should put its big boy pants on and gladly host a topical news show that is free to criticize the company or the technology industry as a whole.