0

While trying to understand why my Mac stopped performing so well on Spotlight.. I tried a suggestion that had me check my HD's status on Disk Utility. I can't press the Unmount button even after using First-Aid, weird. So this led me to searching this link - an old one but informative - and tried the commands there.

For the two other commands I got the expected result. Using sudo fsck_hfs -f /dev/disk0s2 or -fy, however.. (-y for Always attempt to repair any damage that is found ) while this is expected:

enter image description here

I got the following result. Same when typed -f in place of -fy.

enter image description here

This seemed troublesome. But shame I don't have a clue what is the issue nor how to deal with it. Could anyone share some insight please?

1 Answer 1

3

You are trying to check the file system on disk0s2 with the wrong tool. fsck_hfs targets HFS file systems. Your main drive is formatted to APFS though.

The output of sudo fsck_hfs -fy /dev/disk0s2 in your screenshot shows the first block of the/an APFS container. This is indicated by the NXSB magic string in the third line.

The proper tool to check APFS containers or volumes is fsck_apfs!

Check man fsck_apfs for further details.


Since diskutil verifyDisk|verifyVolume|repairDisk|repairVolume [device] also calls fsck_apfs or another appropriate fsck_* tool with the proper flags I'd prefer this command instead:

diskutil list # to get the device identifiers
diskutil verifyDisk disk0
diskutil verifyVolume disk0s2
diskutil verifyVolume disk1s1

If required, repair the container/volume with:

diskutil repairDisk disk0s
diskutil repairVolume disk0s2
diskutil repairVolume disk1s1
1
  • Commenting on an old answer here, but I get a fairly similar result when running fsck_hfs on an external 1.5TB HDD which won’t mount, and which Disk Utility says it can’t repair. I’m fairly sure my disk is not APFS (at least according to diskutil list). I get three output blocks, all of which are blank (no letters, just dots); the relevant section of diskutil list and the total output of sudo /sbin/fsck_hfs -fy /dev/disk2s2 can be seen in this pastebin. Does that output make any sense? And is it normal that fsck takes hours to run? Feb 14, 2021 at 10:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .