When should you run Disk Utility’s First Aid?

Many of us develop practices we trust, and continue to use those even when they have become needless or ineffective. One of my roles is to challenge those, to get you to reconsider how you use your Mac, in the hope that becomes more effective and efficient. This article asks an apparently simple question whose answer has changed in recent years, but despite that many continue to run Disk Utility’s First Aid at the drop of a hat. To understand why we used to do that, I step back in history.

HFS+ was unreliable

It was obvious at the time we were using it that the Macintosh Extended File System, HFS+, was thoroughly unreliable. It had been introduced as HFS in 1985, when it was designed for use with the first 20 MB hard disks, and only supported a maximum of 65,535 files in a maximum volume size of 2 TB.

That was extended to HFS+ in 1998, but remained unreliable. It was prone to develop errors as a result of operating system crashes (and didn’t Classic Mac OS crash) and other events, and those tended to accumulate until more major errors resulted in data loss. Wonderful though Macs were in those days, they did crash or freeze frequently, and best practice was to run the separate Disk First Aid app as soon as your Mac was up and running again. This was justified by the number of times repairs had to be made.

diskutil001

At the same time, Alsoft launched its new DiskWarrior. Disk First Aid attempted to make its repairs by patching the file system directory in place, which could lose files and folders. DiskWarrior took a different approach, and built a replacement directory that could recover files and folders that nothing else could, as well as optimising the directory structure to deliver best performance. It was a godsend.

When a Mac with file system errors started up, it had no way of knowing which operations had been completed, and which hadn’t. That was addressed with the introduction of journalling, designed and implemented by Dominic Giampaolo, who came to Apple from implementing the file system for BeOS. That became a standard feature in Mac OS X 10.3 in 2003, and greatly reduced the problem of errors in HFS+, although they didn’t go away altogether.

When the iPhone became a runaway success in 2007-08, and was followed by the iPad three years later, HFS+ was the wrong file system. Apple produced a case-sensitive variant known as HFSX, but was in need of a new self-maintaining file system designed for use on solid-state storage.

APFS was designed to be reliable

APFS was first released for iOS in March 2017, and was followed in macOS High Sierra that autumn. As a thoroughly modern file system, it was intended to be resilient and self-maintaining, with features such as copy-on-write and checksums of the file system, although it has significantly avoided offering checksums as a means of verifying file data.

Single System volumes were unreliable

However, macOS still had a major problem in that it mixed its operating system files with those of the user. By this time, most of macOS was covered by System Integrity Protection (SIP), but that does nothing to prevent errors or verify the integrity of system files. This was well-recognised as a problem in macOS updates, which not infrequently didn’t behave as expected. The more fastidious continued to check their system disks for errors after updating macOS, and sometimes before as well.

Another popular solution to broken macOS updates was to install a Combo update, containing all the changed files in macOS since the last major version. That could recover from a great many errors that might have accrued across a succession of updates, and became a popular panacea.

The Signed System Volume

In 2019, macOS Catalina divided the startup volume into two, initially making its new System volume read-only. That was a preparatory step for Big Sur the following year, which baked the great majority of macOS into one of APFS’s new snapshots. To verify the integrity of the contents of that system snapshot, a tree of cryptographic hashes is built once macOS updating or installation is complete. As those hashes amplify the smallest differences, this new Signed System Volume is verified down to the last bit, against Apple’s master value for that version of macOS.

Warnings

Those who do run First Aid on their Mac’s data volume not infrequently see cryptic warnings reported, such as
Resource Fork xattr is missing for compressed file
Warnings and any errors are usually reported with the ID of the file, which is its inode number. Although it’s not difficult to convert that to a path, unless you know how, that message isn’t useful. Even when you do try to identify an item from its inode number, it’s not uncommon for that to be unsuccessful, perhaps because it refers to an inode in a snapshot but not the active file system.

Finally, as with any file system, you avoid trying to check it while it’s still active. In the case of the Data volume, that means running First Aid in Recovery Mode.

There are times when you do still need to call on First Aid or its command tool equivalent fsck_apfs. But it’s far better now to reserve that for occasions when you have evidence that there might be a problem with the file system. As a routine procedure, First Aid should no longer be necessary.