We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.

Seadoodude • 3 years ago

I get this error:

Jeffs-NT-MBP-2:dev root# hdiutil attach -nomount -noverify -noautofsck "/Volumes/TimeMachine/Jeff's NT MacBook Pro.sparsebundle"
/dev/disk2 GUID_partition_scheme
/dev/disk2s1 EFI
/dev/disk2s2 Apple_HFS
Jeffs-NT-MBP-2:dev root# fsck_hfs -drfy /dev/disk2s2
Unable to open block device /dev/disk2s2: Operation not permittedjournal_replay(/dev/disk2s2) returned 1
** /dev/rdisk2s2 (NO WRITE)
Can't open /dev/rdisk2s2: Operation not permitted

If I mount with this command instead will it verify the file system, it is churning away doing something?
Jeffs-NT-MBP-2:dev root# hdiutil attach "/Volumes/TimeMachine/Jeff's NT MacBook Pro.sparsebundle"

yuppymike • 4 years ago

When doing "hdiutil attach -nomount -noverify -noautofsck " followed by the sparsebundle location terminal still says "attach failed - image not recognised". And doesn't give any outputs etc.
Where should I be looking for Apple_HFSX? Thanks in advance!

Raz Yalov • 4 years ago

https://media2.giphy.com/me...

Although the original post is old, it just saved my old backup and worked for me on the latest MacOS Mojave 10.14.
And the fact is: Apple support didn't know to offer this solution that is fully based on standard tools in the OS, shame.
Note: I have ran multiple disk checks on the physical containing disk itself with no errors found. The error was really inside the sparsebundle disk image itself. It took it a few good hours to complete, but it found and repaired the image and now my backup is working again without losing my backup history.
Thanks for this useful article.
I feel like Apple, or someone else should pick up the glove and turn this into a small Time Machine backup repair tool for remote backups.

Jeff Lerman • 4 years ago

I know this post is nearly 3 years old, but just wanted to say Thank You!! - this worked for me! I'm (still) running High Sierra, and had a NAS (Synology) Time Machine volume fail verification, with the dreaded message to the effect that I could either let the system nuke my old backups and start over, or... delay, and do that later :(.

Following your advice I was able to get the volume repaired, and backups are now succeeding again; I've confirmed that my older snapshots (going back a few years!) are still available in the Time Machine sparsebundle. I now plan to make a backup of my TM volume - I'd never realized how volatile it might be!

I did have to run fsck_hfs a couple of times in a row; the first time it failed (after doing some repair) with the message that it wasn't able to fix things after 3 tries. Second time completed successfully. Also, the chflags step was taking a long time and I think I lost the connection to the volume (machine went to sleep) while it was working; I ended up skipping the remainder of that step and everything else still worked fine.

I definitely recommend using a wired connection rather than WiFi to the network while doing all this; in my case with a 1.4GB TM volume, each run of fsck_hfs took hours (not sure how many - somewhere between 2 and 10).