Time Capsule errors

May 4th, 2008

All of a sudden I started getting errors when backing up to my Time Capsule. Time Machine was only able to to mount the backup drive in read-only mode. Apparently it had got corrupted. No beuno! While I could have followed the recommended approach to format the drive (!) and start again, I didn’t really want to lose my backup history.

First of all I tried good ol’ Disk Utility, but that was unable to repair the disk. It did give me a valuable clue however with this cryptic message:

“Invalid siblings link”

Since this is just a file system, in this case HFS I figured there must be some command line utility to run that could have a go at fixing the problem. Enter “fsck_hfs“, which works in a very similar manner to it’s Linux cousin e2fsck. The only tricky part was figuring out what the path to the drive was, but luckily you can get that from Disk Utility by selecting the drive and choosing Info. In my case, /dev/disk2s2. Putting this all together I typed this into a terminal window as root:

fsck_hfs -r /dev/disk2s2

and waited. And waited and waited! A good 20 hours later fsck_hfs finally announced it had successfully repaired the drive. Whew! Worth the wait I guess.

Technorati Tags Technorati Tags: ,


12 Responses to “Time Capsule errors”

  1. B. Jefferson Le Blanc on May 24, 2008 3:14 pm

    Though I haven’t been having problems with Time Machine (I’m using a separate hard drive in my Mac Pro rather then a Time Capsule) I ran Disk Warrior on it for routine maintenance. It turned up some errors, but none it couldn’t fix. In any event, it only took about 5 minutes to run. Presumably, if Disk Utility can see and address your Time Capsule, Disk Warrior could do so as well. It offers far more robust repair options then Disk Utility.

    Reply

    Luckyspin reply on May 26th, 2008 1:27 am:

    Yeah, I tried running DIsk Warrior over the disk too before hand. It did fix some errors but apparently it wasn’t fixing the “Invalid Siblings link” problem. Every time I ran TC it would fail again. I’m beginning to wonder if the problem is running multiple computers all backing up to TC. I have three currently. When I was only doing backups with one, I didn’t have a problem.

    Reply

  2. Walter Szeliga on May 27, 2008 7:39 pm

    I’ve only been backing up on machine and ended up with this problem. We’ll see if this works (waiting for Disk Utility to fail for the second time). I’ve repaired “Invalid Sibling Link”’s before with fsck and friends. There seems to be no clue on the Apple Discussion boards about this as a solution to the “Read-Only” Time Capsule problem, I wonder why.

    Reply

    Luckyspin reply on May 28th, 2008 1:39 am:

    Good question. There appears to be a lot of confusion about a lot of things related to TC currently. Unfortunately, I don’t think it’s overall that stable. I guess even Apple make mistakes too!

    Reply

  3. obscurity on June 16, 2008 5:59 pm

    Ok – I give up. I can’t get disk utility to recognize the TC unless its in the middle of a backup. When I look, I get

    admin% mount
    /dev/disk0s2 on / (hfs, local, journaled)
    devfs on /dev (devfs, local)
    fdesc on /dev (fdesc, union)
    map -hosts on /net (autofs, automounted)
    map auto_home on /home (autofs, automounted)
    afp_0TSQUm1enNH100nKdP0Pyetl-1.2e000011 on /Volumes/Data (afpfs, nodev, nosuid, mounted by admin)

    Did you do something special to get it to recognize the mount? It seems that disk utility, data rescue, etc won’t recognize an AFP fs, it needs the HFS fs to work.

    Reply

    Luckyspin reply on June 16th, 2008 7:00 pm:

    No, I don’t think so. Have you checked in Disk Utility though? Looking at mine now I see the .sparsebundle mounted, but it doesn’t show up in my “mount” output. I’m definitely not backing up right now, although the last backup was successful.

    If that doesn’t work, you could try navigating to your .sparsebundle file in Finder and mounting it from there.

    Reply

  4. obscurity on June 17, 2008 4:33 am

    Found a way to trick it. I started a backup, then I navigated to the backup drive doing a
    `cd /Volumes/Backup of `

    And cancelled the backup. Since the device was in use by the terminal, it wasn’t able to automatically unmount. Now, I have a HFS device mounted, so I can run diskutility

    (or actually in my case “Data Rescue 2″ – trying to recover files lost when I needed to reformat the drive)

    My problem – a bit more tricky than the one you described – was that the TC couldn’t actually mount its internal harddrive. When I pulled the syslog for the TC, I saw the following error:

    Jun 16 20:55:11 Severity:4 Volume dk2 on Disk wd0 () needs repair (256).
    Jun 16 20:55:11 Severity:4 Volume dk2 on Disk wd0 () failed to mount (256).

    Meaning the TC couldn’t even mount its own HD, much less share it. Since TC doesn’t have a built-in fsck utility, the only answer is to reformat the drive, and move along.

    Reply

  5. tunesmith on June 24, 2008 10:01 am

    Grr… I feel like I need to do this, but it’s not letting me. Disk Utility will sometimes verify, sometimes not (I think it has to do with whether it’s in the middle of a backup), but it won’t ever repair. And when I do the above command, I get the following output:

    sh-3.2# fsck_hfs -r /dev/disk2s2
    ** /dev/rdisk2s2
    ** Verifying volume when it is mounted with write access.
    ** Checking Journaled HFS Plus volume.
    ** Detected a case-sensitive catalog.
    ** Checking Extents Overflow file.
    ** Checking Catalog file.
    ** Cannot repair volume when it is mounted with write access.
    ** The volume Backup of () could not be repaired.

    I try unmounting it from the finder and then it of course can’t find the disk. I haven’t found how to mount it read-only.

    Reply

  6. RFry on September 7, 2008 2:37 am

    I’ve just found this thread as I searched the internet in desparation – I don’t know whether I’m comforted or not to find that so many people seem to have the same problem with my Time Capsule/Time Machine.

    It had been backing up perfectly until about 5 days ago, and then it returned the message about the disk being read-only. I can’t get any of my previous backups either and it can take 2 hours for the disk to mount, then all that’s there is what’s on the computer now.

    I don’t mind if I can’t get any previous back-ups as I burn finished projects onto DVD (as I use the computer for work and can’t risk losing them), but Disk Utility says it can’t repair the disk, but don’t know how to erase it and start again. Sometimes it mounts, but more often than not, it doesn’t appear.

    I tried your fsck_hfs trick, but this is what the computer replied with in the terminal window:
    Last login: Sat Sep 6 11:55:47 on ttys000
    rebecca-frys-imac:~ REBECCA$ fsck_hfs -r/volumes/Rebecca Fry’s Time Capsule-1/Rebecca Fry’s imac_001ec21452c1.sparsebundle
    fsck_hfs: illegal option — /
    usage: fsck_hfs [-c [size] dfl m [mode] npqruy] special-device
    c size = cache size (ex. 512m, 1g)
    d = output debugging info
    f = force fsck even if clean (preen only)
    l = live fsck (lock down and test-only)
    m arg = octal mode used when creating lost+found directory
    n = assume a no response
    p = just fix normal inconsistencies
    q = quick check returns clean, dirty, or failure
    r = rebuild catalog btree
    u = usage
    y = assume a yes response
    rebecca-frys-imac:~ REBECCA$

    Interestingly, when I clicked info in Disk Utility, the Name for the disk is given as: UNATTACHED DISK IMAGE and type of disk as: UNATTACHED DISK IMAGE.

    I’ve done all the usual Time Capsule troubleshooting. i.e. turning it off and on again. Pressing the reset button and setting it up again in Time Machine Preferences, but none of these make any difference.

    As I say, all I want to do is eraze and reformat the disk to get it backing up properly, but each time it goes to back up, it returns a FAILED response (after hours of preparing).

    Can anybody help?

    Reply

    Luckyspin reply on September 22nd, 2008 10:06 pm:

    You are getting the illegal option response because there should be a space after your -r and before the /volumes. Try that and see if that helps =)

    Reply

  7. Jed on November 19, 2008 1:48 am

    Thanks very much for posting this! Very useful.

    Small nitpicky question: you wrote that your Time Capsule was mounted on /dev/disk2s2, and then you wrote that you ran fsck_hfs on /dev/disk0s2.

    Was that 0 just a typo? I would have expected that you would use the same number as the mount point, but the stuff in /dev has always been kinda mysterious to me, even on non-Mac UNIX systems; so I don’t know if there’s some reason to change the device number when running fsck_hfs.

    …Unrelatedly, here’s a bigger and more complicated question, which you may not know the answer to but I figured it couldn’t hurt to ask: can anyone reading this thread explain the different modes or states that a sparsebundle (like a TC backup drive) can be mounted in? And/or the best methods for reaching those states/modes?

    For example:

    * fsck_hfs won’t run if the disk is mounted “with write access”, but I have no idea how to intentionally mount a disk without write access. (Last night, when I ran fsck_hfs for the first time, the OS had mounted the disk read-only due to problems with the disk. So that worked fine, but it left me unsure how to manually mount the disk read-only.)

    * When I look at Disk Utility, sometimes the disk doesn’t show up at all, and sometimes it just appears as “disk 1″, and sometimes it has the full “Backup of Foo” name that I expect.

    * When the disk is in certain (unmounted?) states, running the mount command on the command line shows me the disk apparently mounted using AFP, with a long string that starts with “afp_0TSQU” where it would normally say /dev/disk1s2 (or whatever).

    * If I try to run fsck_hfs -r on the UNIX path to the mounted disk (like /Volumes/MyDiskName), it ominously tells me “/Volumes/Backup of Foo/ is not a character device” and adds “CONTINUE? [yn] n”. I was too scared of that to continue, so I said n.

    * When I try to mount the sparsebundle directly from the Finder by double-clicking it, I get a progress box telling me it’s checking the disk. That box stays up for hours. (This has always been true, even long before the current disk problem began.) Eventually I get tired of waiting and click Skip, and the disk mounts, but skipping the check every time seems like it can’t be a good idea.

    * In Disk Utility, I can either unmount or eject the disk; those commands do two different things, apparently.

    So I’m trying to figure out what the various states are, and what causes a transition from one state to another, and what states are required for various repair-related actions by various tools. Anyone happen to know?

    thanks,

    –jed

    Reply

    Luckyspin reply on November 19th, 2008 11:17 pm:

    Jed,

    Well spotted! I have fixed the typo. As to the rest of the questions you posed I must confess I don’t really have any better insight as to the different states. I presume you can mount a file system read only by using the “mount” command line program, but I haven’t actually done that on a Mac. I used to use it extensively on Linux though.

    Reply

Comments RSS

Leave a Reply

Name (required)

Email (required)

Website

Speak your mind

Spam protection by WP Captcha-Free