Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Incorrect number of file hard links

I have a MacBook Pro (Retina, 13-inch, Late 2013) running OS X Yosemite Ver 10.10.2. I checked my Disk Utility because the Other part of my HD consumed 106.25 GB of my 500 GB flash storage and I wanted to know if it was an error or what. Disk Utility reported that I have an "Incorrect number of file hard links." It recommended that I restart my computer with Disk Utility and repair the drive there. Following the instructions, Disk utility on the Recovery HD reports that the disk is OK. I even tried to repair the disk just in case but no errors were still reported. When I restarted my computer and checked my Disk Utility again, it reports the same error. Does this mean my drive is corrupted? I do have Time Machine backup but I'm hoping I don't have to replace my drive. Should I bring my computer to an Apple Center? Can I fix it by myself?

MacBook Pro with Retina display, OS X Yosemite (10.10.2), null

Posted on Apr 1, 2015 7:37 AM

Reply
4 replies

Jan 3, 2017 8:01 PM in response to Alexis J

Alexis, I got these 2 errors on my MacBook Pro 500 Gb SSD (Sierra 10.12.2) when I ran the Disk Utility: "Incorrect number of file hard links" and "Invalid directory item count". I then ran the Disk Utility in Recovery Mode and theoretically nothing was wrong with the disk, except that the Disk Utility appeared to do the check far too fast (like 2 seconds) and I suspected it was not doing a proper check. After a bit of internet trolling I found an article suggesting to use the command "fsck -fy" in single user mode. This did appear to fix the disk after the command was run twice. However, on rebooting and checking with the Disk Utility the "Incorrect number of file hard links" was fixed but the "Invalid directory item count" persisted. Another article on the web suggested that FireVault might be the culprit. In my case it was turned on. I have since turned off FireVault then reran the Disk Utility in Recovery Mode. This time the Disk Utility found problems and ran for the expected time (about a minute or so) and claimed to have fixed the errors. Running it again, Disk Utility claimed the disk to be OK. Rebooting in normal mode and running the Disk Utility again the disk came up with a clean bill of health.

May 13, 2015 3:13 AM in response to Alexis J

It seems it is possible to cause there errors from userland. This happened recently with fish shell and how it uses /tmp, see https://github.com/fish-shell/fish-shell/issues/1859


They've filed a bug with Apple and also here:

http://openradar.appspot.com/radar?id=6387155723091968


A quote from the thread:

"I speculate that whatever clears the contents of /tmp does it in a way that messes up hard link counts"

So in addition to hard drive failure this might a combination of OSX bug and the way some software use /tmp.

Incorrect number of file hard links

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.