Close, but still no banana: Disk Utility 22.6

Since Apple’s introduction of APFS nearly six years ago, it has enjoyed a complete monopoly over tools and utilities to check and repair the file system. Currently, the only options are the First Aid feature in Disk Utility, and the command tool fsck_apfs, which is used by Disk Utility anyway.

No matter how stable a file system might be, having reliable and effective repair tools is essential. Yet for those few years, Disk Utility’s First Aid feature has frequently failed to perform checks on APFS volumes, reporting various errors that are the result not of file system problems but bugs in Disk Utility. These boil down to the fact that fsck_apfs requires the volume to be unmounted, and Disk Utility has been unable to do that reliably. This has left users having to manually unmount volumes before using the First Aid tool.

I first explored this problem nearly two years ago, using Disk Utility version 20.1.

firstaid04

Neither had it changed in Disk Utility version 21.0 in Monterey 12.0.1.

diskutil10

It persisted in version 21.5 in macOS 12.4 as I reported a year ago

diskutil1

And when I revisited that in early April this year nothing had changed in Disk Utility version 22.3.

I there asked Apple to make macOS 13.4 its target, writing: “The time has come to fix this pernicious and infuriating bug, so that Disk Arbitration no longer has to turn a blind eye to it, and vital disk tools can get on with their intended tasks. macOS 13.4 would be an excellent target, to ensure that when macOS 14 ships later this year, those long years of neglect can be put behind us. If that’s not possible, then Apple should release the source to fsck_apfs and let someone else fix it. We’ve had enough of status 65, thank you.”.

Apple has at long last responded, and Disk Utility in Ventura 13.4 reaches new heights in version 22.6. I’m delighted to report that you can now check and repair almost every APFS volume you might wish. I’ve tried it on a wide range, including Time Machine backups, and on both internal and external disks.

diskutil1

Sadly, and I’m almost embarrassed to admit this, I have found one circumstance where you’ll still see an error message: when checking the Data volume of a second boot volume group, such as that on a bootable external disk.

diskutil2

What then appears to happen is that, because that Data volume is joined to the System volume using firmlinks, and mounted at a different path, Disk Utility can’t unmount the Data volume alone, so fails with the original error. The workaround is to select the Data volume, click the Unmount tool, which will then unmount both System and Data volumes, and you can then run First Aid without error.

diskutil3

Once that’s complete, remount volumes as you need.

While I’m very grateful to Apple’s engineers for meeting this deadline, and delivering the first (almost) fully functional version of Disk Utility since Sierra, I’m sorry to have to break the news that there’s one remaining bug still to fix. Maybe we can live with this one until macOS 14 arrives this autumn/fall, and we can break out the bananas.

Postscript

Since posting this, I have filed a Feedback report with Apple, FB12198231. To that I have added a factor that may help you reproduce this bug: before running First Aid on the secondary Data volume, open a Finder window on a folder on that volume, such as a Documents folder in one of its Users. In other circumstances, having a Finder window open on a volume being checked using First Aid won’t prevent that volume from being successfully unmounted. But if the folder is on a secondary Data volume, it prevents successful unmounting as described above.