The article http://www.garth.org/archives/2011,08,27,169,fix-time-machine-sparsebundle-nas-b ased-backup-errors.html is very good, gives the points you need to do to be able to run fsck properly and try to repair the volume.
However, some portions of the article are a bit complex to a few people, so, let me try to help you here. In short, this is what you will do.
Mount the volume where your <whatever name it is>.sparsebundle file is. You can use the Finder and just click on it. If the Eject button shows up on the right side of the device and you can see the sparsebundle file, that is all we need.
Start Terminal, then open two windows:
spotlight -> Terminal -> <enter> -> after it opens Command+N
You should have two terminal windows now.
In one, just type this:
tail -f /var/log/fsck_hfs.log
This is what
On the other, you'll do a few commands. Please just type what is in a single line in bold. Italics are results.
sudo sh -
Type in your password when asked.
You MUST be root to do these things. If you don't know what root is, that is the SUPER USER for your Mac, in other words: GOD. For your sake, be VERY careful with any command you do as SU. Most of the "protections" don't work because as you're GOD you're supposed to know what the ffff you're doing.
whoami
root
This is just to confirm you're root. If you do NOT see "root" after, you did something wrong in sudo sh -. Do NOT proceed as things will not work.
chflag -R nouchg <drag your sparsebundle file from finder over the terminal window>
This should help those having issues with the name. In Terminal, some characters must be changed to this and that, some people just type stuff and use tab, others prefer commas, or you can just drag the file. They all work.
If you get this:
chflags: /Volumes/<a lot of your stuff>: No such file or directory
It is bad. The command didn't work and you need to make it work. Just for crying out loud, google a bit about Unixes and get it working, it is **** easy. If you can't, turn it all off and go to a Genius bar.
The past command is kind of the "trick". It removes the restrictions in the sparsebundle files so you can actually run a filesystem check, otherwise, we will run into a few problems, specifically with the image being read only. I'll show some results about it in the next command.
hdiutil attach -nomount -noverify -noautofsck <drag your sparsebundle file from finder over the terminal window>
/dev/disk1 Apple_partition_scheme
/dev/disk1s1 Apple_partition_map
/dev/disk1s2 Apple_HFSX
Now it is when it gets intersting. This command is to "attach" the sparsebundle file to your system. Just to give you some clue, a sparsebundle is basically a LOT of files and directories that when "attached" simulate a physical drive. Once this process is done, the operating system looks at the "disks" and "partitions" inside the image as real devices.
Once you run this hdiutil command, it will automatically trigger a filesystem check.
Remember that other window with the "tail -f /var/log/fsck_hfs.log" command? You should have seen some activity there.
If you get this:
/dev/rdisk1s2: fsck_hfs run at Thu Mar 22 11:45:37 2012
/dev/rdisk1s2: ** /dev/rdisk1s2 (NO WRITE)
/dev/rdisk1s2: Executing fsck_hfs (version diskdev_cmds-540.1~34).
QUICKCHECK ONLY; FILESYSTEM DIRTY
Then you did NOT do the chflags command properly. Detach the image and go back and check what you could have done wrong.
To detach:
hdiutil detach /dev/disk1
"disk1" unmounted.
"disk1" ejected.
Again, this is in my case. If you got anything different when you ran hdiutil attach, then that is what you want to put here.
What we are looking for is something like this:
/dev/rdisk1s2: fsck_hfs run at Thu Mar 22 11:45:37 2012
/dev/rdisk1s2: ** /dev/rdisk1s2
/dev/rdisk1s2: Executing fsck_hfs (version diskdev_cmds-540.1~34).
** Checking Journaled HFS Plus volume.
** Detected a case-sensitive volume.
The volume name is Time Machine Backups
** Checking extents overflow file.
** Checking catalog file.
** Checking multi-linked files.
** Checking catalog hierarchy.
** Checking extended attributes file.
** Checking multi-linked directories.
** Checking volume bitmap.
** Checking volume information.
** The volume Time Machine Backups appears to be OK.
Yay!!!! =D
If you got that, then yes buddy, we fixed the problem. I really wish Apple would switch from HFS to XFS. **** stupid filesystem corrupts so easily... =/
Did you know? FSCK_HFS stands for File System ChecK, and HFS stands for Hierarchical File System, a file system developed by Apple in the 80s.
Anyway, even with everything in order, Time Machine will outsmart us by just skipping any looks on the image. **** you TM! Then is when you need to remove those lines mentioned in the article. In short, find the file com.apple.TimeMachine.MachineID.plist inside your .sparsebundle package. You can use Finder for that. Just right click your sparsebundle file, Show Package Contents and there you have it.
Remove the lines:
<key>RecoveryBackupDeclinedDate</key>
<date>**whatever**</date>
<key>RecoveryBackupDeclinedDate</key>
<date>**whatever**</date>
Find these lines and change the 2 to 0:
<key>VerificationState</key>
<integer>2</integer> --> change to <integer>0</integer>
Now just your Time Machine icon in the menu bar and choose "Back Up Now". Mine started and did yet another "Back Up Verification". This process is important as Time Machine will "fix" some of the changes we did, in this particular case putting back the flags we changed with chflags.
And there we go!!! It worked for me as a charm!
I did this over Wifi without problems, didn't take that unbelievably long, althout it is an N at 5GHz network. If yours is not, you might want to just go with Ethernet as suggested. Ethernet is always better, but sometimes it is a pain in the butt to get a cable going.
I hope you guys can make it work too.
Thanks for the article link and good luck.