Corrupted Time Machine backup on a ReadyNAS

May 26, 2012 in Debugging

Tags:

A week or so ago I hit the quota limit for the Time Machine allotment on my ReadyNAS. Two machines back up to that volume, one was okay, but on the other I would get this every time OSX tried to start a backup...


The backup disk image "/Volumes/ReadyNAS/ arisu.sparsebundle" could not be accessed (error -1)

Found a couple sites that listed similar problems, but my actual solution needed to combine a couple of those.

Several sites recommended first trying to mount the image by hand:

hdiutil attach -nomount -readwrite " arisu.sparsebundle"

Note that for some reason, my bundle file has a non-printable white space as the first character in the file name. It’s not a space, but copy/pasting the filename in Terminal seemed to let me access it so I didn’t sweat it too much.

Anyway, the hdiutil command would only return:

hdiutil: attach failed - not recognized

One site recommended sudo‘ing to root and running this command:

chflags -R nouchg "/Volumes/ReadyNAS/ arisu.sparsebundle"

But hdiutil still returned the same error. I eventually found another post that had some crazy talk about connecting to a Win7 machine and copying files from another working bundle. Inside the madness was the key (and unlike the post said, it’s quite easy to cd into the sparsebundle from the Terminal on OSX and do what needed to be done.

There are two “Info” files inside the sparsebundle,Info.plist and Info.bckup. Looking on the commandline showed that my Info.plist file was empty, but the backup file wasn’t. The thought of copying a .plist file from another working bundle seemed a little bit much for me, but restoring the .bckup was the perfect solution. Running the hdiutil command now successfully mounted the drive. I could then run fsck on it to make sure everything was good on the disk:

fsck_hfs -rf /dev/disk6s2

Replace disk6s2 with what is returned from the hdiutil command.

About

Welcome to Nick's blog. I don't post things all that often, but maybe there's something interesting here...

Categories