What does Disk Utility’s First Aid really check in Catalina?

Recent versions of Disk Utility have changed. This vital tool had been evolving steadily to accommodate the quirks of Apple’s new file system APFS, through a period of turbulence during which some features haven’t worked right, and others have just been puzzling. In this article, I look at one of Disk Utility’s most essential features, First Aid, and how it works on different disk formats (HFS+ and APFS). The version that I’m using is 19.0 (1704), as supplied with macOS Catalina 10.15.7.

Read Disk Utility’s Help book, and you might wonder why there’s any need for this article. Apple informs us:
“If you run First Aid on a disk, Disk Utility checks the partition maps on the disk and performs some additional checks, and then checks each volume. If you run First Aid on a volume, Disk Utility verifies all the contents of that volume only.”
Only that’s not what I have found.

Run First Aid on an HFS+ disk and the following are checked:

  • The disk’s partition map
  • The hidden EFI partition
  • Miscellaneous features including loader spaces and booter partitions
  • Core Storage Physical Volume partitions.

Other volumes on that disk aren’t checked at all.

Run First Aid on an HFS+ volume and the volume is first unmounted, and the command
fsck_hfs -fy -x [device]
is then run on each available volume, which checks its HFS+ file system in full. On completion of any repairs, the volume is mounted again.

Run First Aid on your APFS boot disk and the same checks are made as on an HFS+ disk, including the partition map and EFI partition. If you want to check the container or volumes on it, you have to select each individually then click First Aid. As those require the volume(s) to be unmounted, this is discouraged when running in normal mode, and better performed in Recovery mode.

Run First Aid on an external APFS disk and the same checks are made as on an HFS+ disk, covering the partition map and EFI partition. Unmounting its volume(s) make no difference to that, but leaves its container and volumes unchecked.

If you try checking a container on an external APFS disk without ejecting all its volumes, First Aid usually returns an error code -69566 because it can’t apparently unmount the volumes itself.

If you manually unmount all the volumes in a container and run First Aid on that, or select a volume and run First Aid on that instead of its container, then each volume undergoes a full check on its file system., using the command
fsck_apfs -y -x [device]
When run on a mounted volume (not its container), Disk Utility is usually happy to unmount that volume before performing its checks, then re-mount the volume at the end. However, if it can’t, try unmounting the volume before running First Aid, and mounting it manually again afterwards.

File system objects which are checked on each volume include:

  • container superblock
  • APFS Space Manager (‘spaceman’)
  • volume superblock
  • object map
  • snapshots (metadata)
  • if there are snapshots on the volume, these are checked individually
  • extent references and trees
  • allocated space.

The description of Disk Utility’s First Aid command therefore appears incorrect. How this currently works is that performing First Aid depends on the item which is selected. If that’s a disk, then First Aid checks and repairs at that level, including the disk’s partition map and EFI partition, not its volumes. To perform full checks on an APFS volume, you should select that volume (not its disk or container) before clicking on the First Aid tool. To check and repair all volumes in a container, you must first eject each of its volumes, then select the container and click on the First Aid tool. Or run First Aid on them individually.

This all makes sense, apart from Disk Utility’s apparent inability to unmount volumes in order to check a container, but isn’t what the user is told in the app’s Help book.