Skip to content
Features

On death and dying: reconciling yourself to hard drive failure

If it hasn't happened to you, it will — catastrophic hard drive failure. This …

Benjamin Lauderdale – | 0
Story text

Introduction

With apologies to Dr. Elisabeth Kubler-Ross

The failure of a hard drive is a nasty business, especially if you don’t have a verbatim copy of your drive backed up elsewhere. Even if your critical data is backed up elsewhere, it is still a pain to set up a system again. I recently went through a drive failure that was gradual rather than sudden, and still barely escaped without losing some of my most critical files. I am currently studying outside of the US, so I only had partial backups and when things started going south I had what I gradually realized was a race against the clock to save as much as I could. Of course, I made a few mistakes along the way…

A bit of background will help. I have a 13-month-old (12-month warranty), 1Ghz 12″ Powerbook with 768Mb memory and a stock 4200rpm, 80GB drive that I got built-to-order. The first six months of use were my senior year of college, a lot of time in use, but not very hard drive intensive. The last seven months I have been doing data analysis and running my computer about 12 hours a day, and even with a decent chunk of memory, the drive has been taking a beating. Because I am abroad, I only have a 20GB portable drive, an original 5GB iPod and CD-RWs for backups. Thus was the situation on January 31, 2005 when I woke up.

Denial

Monday morning, I had just finished two major projects at the end of the previous week and was starting two new ones in earnest. I booted up, checked my e-mail, replied to a couple e-mails from my boss. I then logged into World of Warcraft to see if I had won an auction for a two-handed sword (I hadn’t), placed a new bid for another item, and quit. I then went to make some tea and some breakfast. I brought the food back to my desk and my computer was sitting there, partially quit. The mouse moves, but I can’t force quit anything, which is pretty rare in my experience under Panther. So I hit restart.

The computer reaches the grey screen with an Apple and a spinning wheel and sits there. After a few minutes, I look up from my darjeeling and bread with marmalade (I am not actually British) and the book I am reading, Robert Alter’s new translation of the Pentateuch, in which I have just started Exodus (really). I see my computer not booting.

Uh oh, this is very bad.

I power it off and decide to let it contemplate whatever is bothering it for a while. Yes, I realize this is crazy. I turn on the computer, it boots properly and everything seems fine. Crazy like a fox.

I immediately start checking my backups. I have not done a backup of my academic work, photos and e-mail for about two weeks, but my keychain and addresses are on daily backup to my .Mac account. I am very crunched for space on my 20GB external (as well as on my internal), so I delete the old backup on my external. This was nearly a catastrophic mistake.

I begin to backup my critical non-replaceable files onto the drive, my music excluded because it won’t fit. The good stuff is on my iPod anyway. I log into iChat and send the following message to one of my college roommates, “So, I just had among the scariest moments of my entire computing career.”

I should mention that my former roommate and I bonded our freshman year over our mutual Mac use. Of the 28 people on our floor there were just three mac users, and the two of us were the only ones who were remotely passionate about it. When he had “The Great Boot Sector Corruption of 2000” and couldn’t get his computer to boot even off a CD, he came over to discuss the issue. I whimsically suggested that he try my OS X Public Preview CD. Inexplicably, it worked (this is likely to be the only productive use of OS X Public Preview ever recorded). He lost everything, but was finally able to reformat his hard drive and start afresh.

He responds “oh?” I begin typing out the beginning of an explanation, and my computer crashes. Hard.

The backup is about one-third done.

Anger

Now I am really annoyed at myself for deleting the backup, but I have no clue what is going on. I reboot, set up another backup. It starts out fine, slows down to a halt, and the computer seizes up. About half done this time. Things are looking really bad. The hard drive is clicking in a threatening manner.

I reboot furiously and do it by hand, copying the Documents, Pictures, and Library folders from my user folder to the backup. E-mail is in Library, along with all my preferences, so this is everything irreplaceable. I don’t have room for much else. Inexplicably I forget about the productivity applications on my drive, for which I don’t have CDs with me, and instead backup World of Warcraft, which I got while home for Christmas (thanks mom!) and copy that over, filling up the available space.

Depression

I am now somewhat depressed. You would think I would feel relief: the worst possible outcome has been averted and my stupid deletion of the old backup has not come back to bite me. My boss won’t kill me, I will have the archive of simultaneously mean and flirty emails my ex-girlfriend and I sent each other before we got together, and I won’t lose the photographic record of my collegiate hair loss. It occurs to me that with all the data analysis I do and my generally heavy drive use, I may have caused some file system problems. Yet I feel gloomy.

I load up Disk Utility to run a repair.

At the bottom of the application window panel for my internal drive ? helpfully written in red ? is the message “S.M.A.R.T. Status: Failing.” Suddenly everything makes sense, the weirdness is being caused by hardware, rather than software failure, thus letting my computer rest between reboots earlier actually was somewhat reasonable. This is really bad though, because who knows how much more time I have to rescue my applications and music.

The hard drive has been getting louder over the day and more grindy, not what you want to hear. I decide I better just bite the bullet and buy a new drive, so I shut down and walk down the street to the electronics store near my apartment. One of the benefits of living in the middle of a large European city, there is usually whatever you need within walking distance. The downside is that everything is priced as it would be in the U.S. but the currency is worth four-thirds as much. At least I am not in the UK.

I purchase a replacement drive, also 80GB, but 5400rpm. I realize as I am doing this that high speed laptop drives are probably more likely to fail than the regular 4200rpm models, but I am a glutton for punishment and I figure I might as well get a speed boost out of this. The alternative is a slow 100GB, but the 80GB is much less expensive ? just ?154 ? which is pretty cheap when you consider the 16 percent VAT (which you always do). I also pick up some tools to install the drive internally.

Bargaining

I get home, pop the 20GB drive with my life’s work out of the external case (perhaps “pop” is too flippant a description, I gingerly remove it and put it in a anti-static bag) and swap in the new drive. I boot up by CD and try to do a bitwise copy of the old drive to the new drive to save everything. This goes along merrily for about an hour as I make something to eat. At the end, it gives me a cryptic error message, but seems to have done the copy. According to Disk Utilities, there are something like 343,572 files on the old drive and 343,573 files on the new one, taking up the same amount of space. Sounds good. I set the new drive as the startup device and restart.

After a few minutes at staring at the grey apple and the spinning spokes, I realize that this didn’t work. I try booting off the old drive.

No good.

Booting again off the CD, I run a check of the directory structure of the two drives and they are totally shot. The utility won’t even try to fix them and I sit there watching a thousand “orphaned inode” messages fly by.

I try running fsck from the command line in single user mode (which strangely will boot just fine off either drive) with the same lack of results. Note: if you want a *nix person to take the Mac seriously, show them single-user mode (Cmd-S at startup). There is nothing sweeter than white block lettering on a black screen on a Powerbook. Except when it’s telling you your directory structure is hosed.


An unhappy barrage of I/O errors

Somewhere in here, the old drive starts refusing to mount. I can still read it, but I can’t mount it, which means all my future monkeying with it will have to be from the command line. Since the new drive will neither repair nor boot, I wipe it and do a clean system install from CD. Arguably I should not have done this, since at least the drive had a mangled version of my files on a good mechanism, as opposed to the mangled files on a mangled mechanism that my old drive apparently had become.

Having created a clean system, I attempted to copy files off the old drive from the terminal, having booted off the external. As I mentioned, it was no longer possible to mount the old drive, but I could read its directory structure if I manually mounted it as read-only on the command line

mount_hfs -o rdonly dev/disk0s9 /Volumes/RiverStyx

I tried doing a few copies and got a few files off successfully, but the directories seem well and truly shot. I could get some individual files, but as the snapshot above shows, cp -r wasn’t doing much. Since most Mac apps under OS X are really just bundles of files, I wasn’t going to be able to save my apps this way and saving my music collection was a pretty hopeless endeavor.

When I realize I really want to listen to some song I have lost, I am sure I will try to fish it out, but my options for recovery are very limited it seems. At last check, the drive makes a steady grinding noise and it sounds like the heads are flailing about aimlessly.

At this point I hit a wall. I needed to either swap the new drive into the laptop or to connect both the new drive and 20gb backup drive externally to recover my main files onto the new system disk. I didn’t have a second external case, so I looked up the instructions for opening a 12″ Powerbook.

This was somewhat reminiscent of when I recently had the opportunity to peek into an first-year medical school anatomy lab: there were bits and pieces lying everywhere and it was pretty gross looking. More to the point, Apple in its efforts to discourage just what I was about to attempt, had included two strategically placed hex screws. Tiny metric hex screws.

Fortunately, I was in Europe and thus their security by obscurity was foiled. But I needed to go back to the store and buy the right hex key, which would have to wait for the morning when the stores opened again. Just before I went to bed, I sent an message to my old roommate, “So, I just had the two scariest moments of my entire computing career…”

Acceptance

In the morning, I went back to the store, got an additional external case (Firewire/USB2, slim and brushed metal) and the hex tool I was missing. Lacking a printer, I carefully copied down the instructions for disassembling my computer by hand onto a pad and paper. I also drew lines on a pad of paper to separate out areas to keep the roughly 30 screws, 3 pieces of aluminum shielding foil, and various bits of metal organized as I took them out. I then made some tea, cleared half my desk, arranged the tools in front of me, and dug in.

Unlike the time I upgraded the memory on a Powerbook 145 in my youth, I didn’t lose any blood to the computer. Thankfully Apple no longer equips the internals of its laptops with spiky metal projections (or at least not so many) ? mostly because there is no space. If you imagine the bottom half of the laptop as a six-sided box, I had to remove at least two screws on each of five faces.

I had to remove the battery, three screws in the battery bay, the memory card and a screw and weird little piece of metal in the memory bay, three pieces of sticky aluminum shielding, three little cables of mysterious origin (seemingly to the trackpad, the power button, and the microphone), F1, F2, F11, F12, more hidden screws, the entire keyboard, and finally the top aluminum face of the case (11 screws). There it was, the hard drive, the bane of my existence, with just two screws and a cable holding it down. 45 minutes.


A sight no PowerBook owner ever wants to see

I stripped the last screw on the drive holding bracket. I was so angry at myself that I wanted to fling the drive and bracket at the wall. I looked at the ceiling. Looked at the floor. Drank some darjeeling. Recalled all the other screws I have stripped and wondered why I always do this. Fortunately, by spinning the holding bracket I was able to work the screw loose enough to get the screwdriver to grip what was left of the head.

Reassembly was a relative breeze and I had the whole thing back together in another 15 minutes. I swapped the 20GB drive into the old external case. I couldn’t put it in the new case because it had a screw on it with a different size hex that blocked it from going in the new case. Whatever.

I booted up the computer, everything was fine. I installed my old Documents, Pictures, and Library folders, logged out and in, and everything was back to the way my computer had been before this mess, except that I was out some key productivity applications and a lot of music, all of which were replaceable with CDs a mere 4,000 miles away.

Conclusion

There are two big things that jumped out at me as I dealt with this problem while going through the five stages of grief. The first was that all my intuition built up over the years of dealing with software problems kept leading me astray. Had I realized that the problem was hardware, I would not have made the repeated, failed copies initially that ate into the brief lifetime the drive had remaining. I would have had the replacement drive earlier and I would have saved everything.

Then, had I thought about it more, I would have realized that the bitwise copy might not work because the failing mechanism might be mangling the data itself, and therefore the copy would be junk too. At that point I probably couldn’t have done much else, but I wasted a lot of time and possibly the last chance to copy some more files while the drive was still mountable.

The second thing is that I was really, really lucky. I got the data off the drive narrowly before its directory structure went to merry hell. It was great that Disk Utility told me that the drive mechanism was failing and it was great that the drive had the logic to report that, but why didn’t it tell me this at startup during those repeated restarts. Or better yet, at the first hint of trouble? Could I have known this was going to happen a few days ago and saved everything? Maybe, but I will never know. The important thing is that I can still play World of Warcraft.

You may be suspicious of my motivations. Was this just another encouragement to backup, which we all know we are supposed to do regularly but still only do on occasion? No, of course not, this was about personal catharsis. Any lessons you may glean from the tale are gravy.

That said, you might want to remember not to delete your most recent backup at the first sign of trouble.

Revision History

Date Version Changes
February 14, 2005 1.0 Release
0 Comments

Comments are closed.