Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

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

Please help! Invalid node structure and invalid record count

My MacBook Pro is about 6.5 years old. I upgraded to Snow Leopard 2 years ago and added RAM at the same time. My first problem ever occurred three days ago when my computer got super sluggish, I restarted and got the gray screen with apple and spinning wheel...no boot up. I ran disk utility from the snow leopard install disk and found "invalid node structure" and "invalid record count". After reading on here what to do...try to repair the disk and so on with no success I went out and bought Disk Warrior. Got home expecting to fix everything and Disc Warrior won't boot...I just get a file with a question mark and the disc is ejected. I tried erasing the hard drive but was only able to use the "don't erase data" option. Then I tried to reinstall Snow Leopard with no luck. Now I am stuck. Any ideas?


One thing to note is I am to the point of not caring about the files on the hard drive, I was a dummy and never backed them up...lesson learned! I just want my computer back without having to spend $1000+ for a new one. Then again I am always willing to do that too as a last resort.


PLEASE HELP!

MacBook Pro, Mac OS X (10.6.8)

Posted on Sep 19, 2012 6:08 PM

Reply
61 replies

Nov 30, 2014 5:00 PM in response to Chris Watts1

Hi,

I tried Chris' suggestion, but I get a 'disk full' error:


/dev/rdisk3s1: starting

journal_replay(/dev/disk3s1) returned 0

Using cacheBlockSize=32K cacheTotalBlock=98304 cacheSize=3145728K.

Executing fsck_hfs (version hfs-285).

** Checking Journaled HFS Plus volume.

The volume name is SIMPLE500

** Checking extents overflow file.

** Checking catalog file.

** Rebuilding catalog B-tree.

BlockFindAll: found 42356 blocks but needed 587520

CreateNewBTree returned -34

Disk full error

** The volume SIMPLE500 could not be repaired.

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 976773040 0x3a385fb0

sector size = 512 0x200

VolumeObject flags = 0x07

total sectors for volume = 976773042 0x3a385fb2

total sectors for embedded volume = 0 0x00

CheckHFS returned 8, fsmodified = 0


Any ideas? This is an external USB 2.0 drive. I tried unmounting it first, but I got the same result.

tia, Patrick

Dec 16, 2014 10:27 AM in response to Chris Watts1

Thanks for the guidance! Had same problem upgrading a MacBook pro from Lion to Yosemite. I had to drop the "sudo" part of the command string to work In terminal. Also, I got into Terminal from OS X Utilities Menu, white background not the black background screen. I spent 2 days screwing around these forums and I just wanted to thank you. I'm going to backup the system now. For the record I typed the following and had to run it twice because the first time it said it fixed some but still failed. /sbin/fsck hfs -yprd /dev/disk0s2 disk0s2 was the name of Macintosh HD. That was the corrupt disk. Thanks again!

Jan 31, 2015 1:26 AM in response to AEC22

The corruption of the drive is an issue that is unique to the WD My Passport drive as I have lost the filesystem on my "My Passport" drive at leat 10 times now since I started using it for my Time Machine backups.


I have however noticed that the corruption seems to occur when the system is shutdown during a disk operation like a backup or when the system does not shut down cleanly. I suspect that there is a kernel timing issue associated with the drive cache in the "My Passport" drive which is causing thie filesystem corruption issues.


I have only once successfully recovered the partition using fsck_hfs only to find that a few days later an unrecoverable corruption occurred for no reason (the system was left on for the whole time). I haven't reported this to Apple yet but I think that it is time that it was, reported.


Oh, the "My Passport" drive was much more reliable after I formatted it using the "WD Drive Utilities" from their website.

Jun 4, 2015 12:13 PM in response to Patrick123

i recently stumbled across the same issue, as I tried to resurrect such a broken drive.

The user just wanted as much data as possible recovered, but I was unable to get the drive or even the partition, to be mounted again under Mac OS.


But, just out of curiosity i tried something unusual.

I have installed the original HFS driver form Apple under my windows machine. You can get the library from an original bootcamp installation.

And windows was mounting the Partition without ANY hassle (just read-only, as the windows driver does not support writing, but that was just perfect for quick and dirty recovering)


After that I tried to mount the partition again under Mac OS as i thought, it is working again (readonly) but, nope... Mac OS (Yosemite) still was unable to mount the partition. even read only...


Long story short: try Windows with the Original HFS Driver!

Sep 18, 2015 10:10 AM in response to AEC22

Like so many others, I found this thread and it was helpful, to an extent. I used the command on a software RAID I'm on my 2009 Mac Pro. It got the RAID to mount but almost all the files on it are now gone. The file structure in the root is intact, but almost all the folders are empty. Any of you wizards out there have a hint as to what might help?


P.S. I have all the files backed up on back blaze, I'd just love to not have to download several terabytes of data...

Jan 17, 2016 4:44 PM in response to Chris Watts1

Just a heads up I'm not one for long posts, but I wanted to include all the details for anyone who finds themselves in the same situation.😉


I was working on an iMac (mid-2007) on 10.6.8 in Pages (eternally a trouble free event), and as I was finishing making some pdf's, saving and doing some other things. A bit later I noticed an odd save dialog box in Pages, so I checked what I had just done and it was fine. I quit and moved on other things off the computer. When I came back a while later, I went to launch Pages and the dock icon just bounced, and bounced and bounced before stopping with no small light underneath. The force quit dialog showed it was open, and if I tried to force quit it took a very long time. I went through that process a few times with no luck. Other programs seemed to work such as Safari and Mail. I decided to see what Disk Utility would tell me about the internal hard drive. it said I had an "invalid node structure" and had to repair the disk.


I have a back up external FW drive connected, so I booted into that drive to repair the hard drive. I tried Disk Utility (without high expectations), it started, then it said it could not repair the disk and it needed to be reformatted. It then said the disk would now be read only and I could copy files from it but not save to the disk. When I would restart it would get to the gray Apple screen, start to load, then the whole machine would just shut down. The back up is a few days old, so I could just have moved any files that were between the back up and the current state, reformatted the drive, take the reformatted drive and clone the back up back to the drive and try to fit in any differences between the two. Not easy or fun, but possible.😟


My next thought was to move to something like TechTool, before finally resorting to the reformat, but I decided to do some research on the node issue first. I landed on this thread and although it didn't work right out of the box, it gave me more than enough for a great foundation to fix my node issue on the internal hard drive. So many thanks to all of the posters, especially Chris Watts!


When I officially launched the Terminal (running from the external) I ran the "sudo /sbin/fsck_hfs -yprd /dev/disk0s2" command (disk0s2 the designation of the drive from Disk Utility info) and got: "starting, NO WRITE ACCESS UNEXPECTED INCONSISTENCY; RUN fsck_hfs MANUALLY". So I tried this few more times with no luck. I did a little more investigation and found it would help to unmount the disk and try again. I launched Disk Utility (still running from external) and tried to unmount the disk (partition). No luck, it said the drive could not be unmounted, so I did more investigation and found the following terminal command to force unmount: "sudo diskutil unmountDisk force /dev/disk0s2". This worked, the disk was now unmounted.


So back to the Terminal and then I did the command: "sudo /sbin/fsck_hfs -yprd /dev/disk0s2". This time it worked and was doing its business but stopped midway through with an error. I recalled one of Chris Watts' posts in this thread: "But don't despair. Try this, and don't give up till you've tried it at least three times", so I did it again in the Terminal AND THE REPAIR FULLY WORKED! I did it one more time just to make sure!


I then went back to Disk Utility and was able to remount the disk (partition) without issue. I also did a verify in Disk Utility, and it resulted in a positive report as well. I went to System Preferences: Start Up Disk and chose the internal drive partition and rebooted. Everything is working as it did before the "Node Issue".


Yes it was tedious and scary and a little frustrating at times, but everything is fine now; and I give my deepest thanks to the posters here for making me believe!

Feb 4, 2016 6:46 AM in response to Chris Watts1

Hi Chris. I did it 5 times so far. The result is the same.

The invalid nod is in a partition of an external drive that i use for time machine. The other partition is fine.

(And i also tried to delete the partition in disk utility but it freezes during unmounting.)

The disk is western digitals Black.



sudo /sbin/fsck_hfs -yprd /dev/disk2s2

Password:

/dev/rdisk2s2: starting

Using cacheBlockSize=32K cacheTotalBlock=24576 cacheSize=786432K.

Executing fsck_hfs (version diskdev_cmds-491.6~3).

Journal replay returned error = 6

** Checking Journaled HFS Plus volume.

** Checking extents overflow file.

** Checking catalog file.

** Rebuilding catalog B-tree.

hfs_UNswap_BTNode: invalid node height (1)

** Rechecking volume.

** Checking Journaled HFS Plus volume.

** Checking extents overflow file.

** Checking catalog file.

Incorrect number of thread records

(4, 29734)

CheckCatalogBTree: fileCount = 2194332, fileThread = 2194441

** Checking multi-linked files.

Incorrect number of file hard links

Error getting link=4268182 for inode=2000044

filelink prime buckets do not match

** Checking catalog hierarchy.

Invalid directory item count

(It should be 1372 instead of 1396)

Invalid directory item count

(It should be 4984 instead of 5013)

Invalid directory item count

(It should be 50335 instead of 50391)

** Checking extended attributes file.

hfs_swap_BTNode: record #42 invalid offset (0x000C)

Invalid node structure

(8, 131918)

** The volume TIME_MACHINE could not be verified completely.

volume check failed with error 7

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 2539062502 0x975704e6

sector size = 512 0x200

VolumeObject flags = 0x07

total sectors for volume = 2539062504 0x975704e8

total sectors for embedded volume = 0 0x00

Please help! Invalid node structure and invalid record count

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