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:
I got the following result. Same when typed -f in place of -fy.
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?
Best Answer
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 callsfsck_apfs
or another appropriatefsck_*
tool with the proper flags I'd prefer this command instead:If required, repair the container/volume with: