Incorrect Number of File Hard Links.

I decided to run the Disk Utility to see if some issues that I was having with my computer freezing was due to incorrect file permissions. I repaired my disk permissions, but then I decided to check the disk itself. I did the Verify Disk option, and found that the utility gave me an error about an incorrect number of file hard links. It recommended that I boot to the recovery partition and run the Disk Utility from there to repair. I was able to get into the recovery partition and repair the problem.


My question is, what exactly does this mean? Does this mean the hard disk is starting to fail? Or is this related to a filesystem error? I am guessing this is more of some kind of filesystem corruption since the utility was able to fix it. Can anyone tell me for sure?


Thanks!

MacBook Pro, OS X Mountain Lion (10.8.4)

Posted on Aug 18, 2013 7:53 PM

Reply
Question marked as Top-ranking reply

Posted on Aug 18, 2013 9:16 PM

One of the misconceptions that circulate on this site is the idea that a journaled HFS volume can be corrupted by a forced unmount, as for example in a system crash or a power failure. This is false. With filesystem journaling, when the volume is remounted after a forced unmount, the directory is automatically repaired, and files are restored to their previous state, using redundant information (the journal) stored on the drive. This is very well established technology, and for all practical purposes, it always works, unless the journal itself is corrupt due to a hardware failure in the drive. So if the directory of a journaled volume is found to be corrupt, the storage device hosting the volume has thrown at least one unrecoverable hardware error.


People who don't understand journaling will tell you to repair the corrupt volume with Disk Utility (if possible), or with Disk Warrior otherwise, and then go on using the drive as if everything is fine. That might have been good advice years ago, before the introduction of HFS journaling, when it was common for volumes to be corrupted as the result of forced unmounting. Today, because forced unmounts no longer cause that kind of corruption, it's relatively rare – or should be – and when it does happen, the implications are different.


My opinion is that when a drive throws such a severe error that a volume directory not only can't be restored by journal replay, but also can't be repaired by Disk Utility, that drive should no longer be trusted with data. It should be taken to a recycling center.


But even if you do choose to go on trusting the drive, if you have backups, you shouldn’t try to scavenge the directory with Disk Warrior. You should erase the volume and restore the data from your backups. Doing that is faster, safer, and cheaper than using DW. DW should be reserved for those situations where there are no backups, and even then, the drive should still be erased, or preferably retired, after the data is recovered.


Deric Horn, the head of filesystem engineering at Apple, gave a presentation at WWDC 2012 in which he stated, with regard to journaled HFS (starting at offset 3:18 in the recording) "The journal means that you can pull power at any time, and your filesystem is still intact. The shouldn't be any data corruption or any volume corruption on that disk." You can hear that presentation by registering for a free developer account and going to this page:


WWDC 2012 Session Videos - Apple Developer


Look for "What's New In The Filesystem" near the bottom of the page.


If a poster on this site knows more about HFS than the Apple developer in charge of it, then Horn should be fired, and the ASC poster should get his job. Until that happens, I suggest you believe what Horn says.

19 replies

Aug 5, 2015 6:10 PM in response to vandersonrangel

You are welcome, I'm Effect, This is my another ID, I came back to look for the help again, because I found it on my new Macbook pro, I believe it might be a OS X system bug, this problem still appears on my new macbook, it might be related to some of the apps I use, maybe some apps will trigger this bug. I called my friends who were using macbook to, they don't have this issue.

I think maybe you can keep an eye on it, run Disk Utility some time to be sure it does work for you.

Sep 18, 2015 1:14 PM in response to neffect

Maybe you could explain a bit better and more carefully what you really did to "fix" the "Incorrect number of file hard links" problem, but what you have written doesn't make any sense at all.

I cannot translate what you might have done. And changing X format for X format sure isn't going to help fix anything that I can see. 😕

Oct 1, 2015 7:08 AM in response to Linc Davis

Dear MR. Linc Davis:


I just got my Mac Book Pro last year and this problem just arouse "Incorrect Number of File Hard Links". I tried to fix it with the Disk Utility and have not being able to. For what I have read I need to take the Mac Book Pro to the apple store so the disk is replaced? Is that correct? With a register clean, can I fix it? Do you have a free app that I can run to see if I can fix the problem. Thanks.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

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 Account.