Saturday, August 16, 2008

Incorrect owner flags for directoy hard link (id=xxxxxxxx)

While running Apple Disk Utility repair on my external USB drive (which I use primarily for Backup), I started getting hundreds and hundreds of warnings:

Incorrect owner flags for directoy hard link (id=xxxxxxxx)
(it should be 0x2 instead of 0x0)

where the id was a 8 digit number, like 19831030, that increased with each message. After running all night, it repair didn't seem any closer to finishing. So, I killed Disk Utility. I set the USB Drive as my startup drive (fortunately, it has OS X on it), and rebooted into safe mode (Cmd-S).

Then, I entered:
fsck_hfs -yprdf /dev/rdisk1s2

Fsck_hfs gave me similar messages, but seemed to be running faster. Indeed, it finished in about 47 minutes, with errors repaired. I ran it again, this time with no errors reported.

To finish and reboot, I entered:
shutdown -r now

After reboot, I switched the startup disk back to my built-in hard drive, and restarted. Once restarted, I ran Apple Disk Utility on the USB drive again. It found a minor error, and repaired it. Since then, it has been repairing fine.

I still have no idea why the USB drive started misbehaving. My guess is that one of the kids interrupted a backup by non-gracefully powering down the machine. Anyway, I hope this trick helps others.

No comments: