Fix “invalid node structure” error in macOS

Note: If you’re getting this error on an OWC drive, it is hardware issue. If your drive is still under warranty, contact OWC about a replacement.

One of our Macs got a filesystem error of “invalid node structure.” You can still mount the drive (if you want to get at the user data), but the drive is unbootable.

invalidnodestructure You won’t be able to fix it with Disk Utility (or in single user mode with fsck).

I did a lot of Googling and ran into Please help! Invalid node structure and invalid record count, which contained the solution:

sudo /sbin/fsck_hfs -yprd /dev/disk0s2
Substitute in your actual disk name for disk0s2.

Note: You may get that it didn’t work:

** The volume Macintosh HD could not be repaired after 3 attempts.
volume type is pure HFS+
primary MDB is at block 0 0x00
alternate MDB is at block 0 0x00
primary VHB is at block 2 0x02
alternate VHB is at block 1873113742 0x6fa5728e
sector size = 512 0x200
VolumeObject flags = 0x07
total sectors for volume = 1873113744 0x6fa57290
total sectors for embedded volume = 0 0x00
CheckHFS returned 8, fsmodified = 1
doing update / reload mount for /Volumes/Macintosh HD now
But it may still work anyway, and you may still be able to boot up your Mac again.

Just to double-check it did work, boot into single-user mode and run the fsck command when prompted.

3 responses to “Fix “invalid node structure” error in macOS”

  1. Really really THANK YOU.
    sudo /sbin/fsck_hfs -yprd did the trick 🙂
    Had to run it 3-4 times to fix disk, so if first time failed rerun it.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.