Filter
View
Poll
Refurb

Save the World, Save Time Machine

par Moose - 04/06/2008
How to save your corrupted Time Machine sparsebundle image...

But then, out of pure luck, I checked Disk Utility, and there in the sidebar was my sparsebundle showing that it contained an unmounted disk image called “backup of rangiroa”... I then decided to launch a repair on it, which started and after about 30 minutes started finding a whole bunch of errors, and fixing them:


/dev/rdisk2s2: fsck_hfs run at Tue May 27 15:47:11 2008
/dev/rdisk2s2: ** /dev/rdisk2s2 (NO WRITE)
/dev/rdisk2s2: QUICKCHECK ONLY; FILESYSTEM DIRTY
[...]
/dev/rdisk2s2: fsck_hfs run at Tue May 27 15:47:11 2008
/dev/rdisk2s2: ** /dev/rdisk2s2
/dev/rdisk2s2: ** Checking Journaled HFS Plus volume.
/dev/rdisk2s2: ** Detected a case-sensitive catalog.
/dev/rdisk2s2: ** Checking Extents Overflow file.
/dev/rdisk2s2: ** Checking Catalog file.
/dev/rdisk2s2: Keys out of order
/dev/rdisk2s2: (4, 89246)
/dev/rdisk2s2: ** Rebuilding Catalog B-tree.
/dev/rdisk2s2: Invalid record count
/dev/rdisk2s2: (4, 785)
/dev/rdisk2s2: Invalid node structure
[... thousands of them]
/dev/rdisk2s2: ** Rechecking volume.
/dev/rdisk2s2: ** Checking Journaled HFS Plus volume.
/dev/rdisk2s2: ** Detected a case-sensitive catalog.
/dev/rdisk2s2: Invalid B-tree node size
/dev/rdisk2s2: (8, 0)
/dev/rdisk2s2: ** Volume check failed.

but then it went on:

/dev/rdisk2s2: fsck_hfs run at Tue May 27 16:19:39 2008
/dev/rdisk2s2: ** /dev/rdisk2s2
/dev/rdisk2s2: ** Checking Journaled HFS Plus volume.
/dev/rdisk2s2: ** Detected a case-sensitive catalog.
/dev/rdisk2s2: ** Checking Extents Overflow file.
/dev/rdisk2s2: ** Checking Catalog file.
/dev/rdisk2s2: Keys out of order
/dev/rdisk2s2: (4, 89246)
/dev/rdisk2s2: ** Rebuilding Catalog B-tree.

 

/dev/rdisk2s2: fsck_hfs run at Tue May 27 17:32:47 2008
/dev/rdisk2s2: (S,”Checking Journaled HFS Plus volume.”,0)
/dev/rdisk2s2: (S,”Detected a case-sensitive catalog.”,0)
/dev/rdisk2s2: (S,”Checking Extents Overflow file.”,0)
/dev/rdisk2s2: (1 %)
[...]
/dev/rdisk2s2: (S,”Checking Catalog file.”,0)
[...]
/dev/rdisk2s2: (40 %)
/dev/rdisk2s2: (E,”Keys out of order”,0)
/dev/rdisk2s2: (S,”Rebuilding Catalog B-tree.”,0)
/dev/rdisk2s2: (S,”Rechecking volume.”,0)
/dev/rdisk2s2: (S,”Checking Journaled HFS Plus volume.”,0)
/dev/rdisk2s2: (S,”Detected a case-sensitive catalog.”,0)
/dev/rdisk2s2: (S,”Checking Extents Overflow file.”,0)
/dev/rdisk2s2: (1 %)
/dev/rdisk2s2: (2 %)
/dev/rdisk2s2: (S,”Checking Catalog file.”,0)
[...]
/dev/rdisk2s2: (45 %)
/dev/rdisk2s2: (E,”Incorrect number of thread records”,0)
/dev/rdisk2s2: (S,”Checking multi-linked files.”,0)
/dev/rdisk2s2: (E,”Incorrect number of file hard links”,0)
/dev/rdisk2s2: (S,”Checking Catalog hierarchy.”,0)
[...]
/dev/rdisk2s2: (E,”Invalid directory item count”,0)
/dev/rdisk2s2: (E,”(It should be %@ instead of %@)”,2)
/dev/rdisk2s2: 11692
/dev/rdisk2s2: 11690
/dev/rdisk2s2: (85 %)

/dev/rdisk2s2: fsck_hfs run at Tue May 27 18:27:13 2008
/dev/rdisk2s2: ** /dev/rdisk2s2 (NO WRITE)
/dev/rdisk2s2: QUICKCHECK ONLY; FILESYSTEM DIRTY
/dev/rdisk2s2: (E,”Incorrect folder count in a directory (id = %@)”,1)
/dev/rdisk2s2: 19
/dev/rdisk2s2: (E,”(It should be %@ instead of %@)”,2)
/dev/rdisk2s2: 11692
/dev/rdisk2s2: 11690
/dev/rdisk2s2: (S,”Checking Extended Attributes file.”,0)
/dev/rdisk2s2: (E,”Overlapped extent allocation (file %@)”,1)
/dev/rdisk2s2: 9899556 /.HFS+ Private Directory Data
[...]
/dev/rdisk2s2: (S,”Checking multi-linked directories.”,0)
/dev/rdisk2s2: (E,”Incorrect number of directory hard links”,0)
/dev/rdisk2s2: (S,”Checking volume bitmap.”,0)
/dev/rdisk2s2: (E,”Volume Bit Map needs minor repair”,0)
/dev/rdisk2s2: (S,”Checking volume information.”,0)
/dev/rdisk2s2: (E,”Invalid volume free block count”,0)
/dev/rdisk2s2: (E,”(It should be %@ instead of %@)”,2)
/dev/rdisk2s2: 84245711
/dev/rdisk2s2: 80893131
/dev/rdisk2s2: (E,”Volume Header needs minor repair”,0)
/dev/rdisk2s2: (100 %)
/dev/rdisk2s2: (S,”Repairing volume.”,0)
/dev/rdisk2s2: (E,”Previous ID in a hard link chain is incorrect (id = %@)”,1)
[...]
/dev/rdisk2s2: 1
/dev/rdisk2s2: 2
/dev/rdisk2s2: (E,”Orphaned directory hard link (id = %@)”,1)
/dev/rdisk2s2: 9787044
/dev/rdisk2s2: (S,”Look for links to corrupt files in DamagedFiles directory.”,0)
/dev/rdisk2s2: (S,”Rechecking volume.”,0)
/dev/rdisk2s2: (S,”Checking Journaled HFS Plus volume.”,0)
/dev/rdisk2s2: (S,”Detected a case-sensitive catalog.”,0)
/dev/rdisk2s2: (S,”Checking Extents Overflow file.”,0)
[...]
/dev/rdisk2s2: (85 %)
/dev/rdisk2s2: (E,”HasFolderCount flag needs to be set (id = %@)”,1)
[...]
/dev/rdisk2s2: 25
/dev/rdisk2s2: (S,”Checking Extended Attributes file.”,0)
/dev/rdisk2s2: (S,”Checking multi-linked directories.”,0)
/dev/rdisk2s2: (S,”Checking volume bitmap.”,0)
/dev/rdisk2s2: (S,”Checking volume information.”,0)
/dev/rdisk2s2: (100 %)
/dev/rdisk2s2: (S,”Repairing volume.”,0)
/dev/rdisk2s2: (S,”Rechecking volume.”,0)
/dev/rdisk2s2: (S,”Checking Journaled HFS Plus volume.”,0)
/dev/rdisk2s2: (S,”Detected a case-sensitive catalog.”,0)
/dev/rdisk2s2: (S,”Checking Extents Overflow file.”,0)
[...]
/dev/rdisk2s2: (85 %)
/dev/rdisk2s2: (S,”Checking Extended Attributes file.”,0)
/dev/rdisk2s2: (S,”Checking multi-linked directories.”,0)
/dev/rdisk2s2: (S,”Checking volume bitmap.”,0)
/dev/rdisk2s2: (S,”Checking volume information.”,0)
/dev/rdisk2s2: (100 %)
/dev/rdisk2s2: (S,”The volume %@ was repaired successfully.”,1)
/dev/rdisk2s2: Backup of rangiroa


Yes, “The volume %@ was repaired successfully.” That took about 4hrs…

 

I then double-clicked on the sparsebundle in the Finder and, ta-da, IT MOUNTED!

I then right-clicked on the Time Machine icon in the Dock, chose “Browse another Time Machine backup…”, pointed it to my repaired image, and the TM browser launched successfully!

I then copied back the repaired sparsebundle on the Time Capsule HD over the LAN, and launched a Time Machine backup… which did find the backup disk and hang there display a “Preparing backup” status for a long time. A bit scared I went and looked in the backupd log to find this message:

May 28 22:40:35 rangiroa /System/Library/CoreServices/backupd[411]: Node requires deep traversal:/ reason:kFSEDBEventFlagMustScanSubDirs|kFSEDBEventFlagReasonEventDBUntrustable|

 

So all it was doing was actually rechecking for file changes because it found out that the database that stores all the file changes notified by Spotlight was “untrustable”, probably because the repair had found a number of orphaned hardlinks and such…

So I decided to let it go and, after about 45 minutes, it started doing the actual backup.

So, now all is back on tracks and working fine.

My conclusion? I hate disk images for storing files. If the container image gets corrupted, you cannot access ANY of your files. That is the reason why I will never use FileVault. At least, with regular Time Machine backups to external HDs, you can access your files manually, but with the sparsebundles… also, it sort of sucks that there is no guarantee of integrity on said sparsebundles. Finally, if you have a problem, you will have to be patient and let the processes take their time, which might be hours.

Oh, by the way, as indicated in the post I linked to, I tried using DiskWarrior, which is THE best disk repair tool out there, and which saved me quite a number of times (I bought it back in the days of the dreaded “The Thing” bug in OS9. But this time, it would crash silently after a few minutes of checking the sparsbundle…)

News
Articles
Blog
All Keywords
From
To
Full View
Daily View
List View
Next
Previous
Printer Friendly
Tip a friend
Share this page