Question

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?

Was it helpful?

Solution

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
Licensed under: CC-BY-SA with attribution
Not affiliated with apple.stackexchange
scroll top