Howettblog®

Linux

Hard Drive Suicide

by on Jan.24, 2009, under Annoyances, Linux

DUSTIN
How now! An external hard drive?
SEAGATE
Clatters to the floor
[Within enclosure] O, I am slain!

Well, it happened something like that…

I was about to attach my external enclosure (containing a Seagate 120GB 2.5″ SATA hard drive) to my other laptop, when the cord came up short and the drive slid off my desk.

To the floor three feet below…

While it was running.

Hard Drives are rated to withstand falls from a few feet, but only when they’re not running. When they are running, however, the heads smash into the platters, spinning at 5,400 RPM.

So I’m running a fsck on the drive, and it finds a bad block (about 2.3 million 4096-byte blocks into the disk). As I went to pull my laptop and hard drive into my lap, and the hard drive slides off the desk again. In the same place, and landing the same way.

By this point, I’ve started to give up. Fsck tells me that there is a bad block in the same place, and I check the SMART statistics: 0 Reallocated Sectors.

I write data to the bad sectors to force them to reallocate. This goes on for quite a while (with the badblocks tool, among other things such as creating as many 10GB files filled with zeroes as I could (I got to 6 files of various sizes before the drive began buzzing) and I get up to about 150 reallocated sectors (Or around 90 as a calibrated hard drive value; for the record, the failure threshold is 36. The drive started at 100.).

I decide to back up the data (only one of the actual files on the drive is corrupt; all the damage is in unallocated space) and delete some things I have elsewhere. 156 reallocated sectors.

After backing up the data I decided that it would be best to do a destructive write test. Writing to bad blocks causes the drive’s firmware to reallocate them on a different section of the physical disk.

By the middle of the test (700,000 4096-byte blocks, starting at the first corrupted region), the drive began buzzing again, and when I finally gave up, it had reallocated about 2,100 sectors, and the calibrated value was down to 44.

At this point, I gave up.

Rest in peace, Seagate. You have been with me since I got my laptop. Thanks for all the fish.

On another note, I’m now in the market for a new 2.5″ SATA drive.

UPDATE: The drive is a lost cause. I’m not writing anything to it, and it’s reallocating sectors on its own.

ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE WHEN_FAILED RAW_VALUE
Reallocated_Sector_Ct 0x0033 018 018 036 Pre-fail FAILING_NOW 3282

Powered-on time: 305 days, 6 hours. Rest in Peace.

7 Comments : more...

If Gentoo Linux were a Car…

by on Dec.16, 2008, under Humor, Linux

  1. You go pick up an engine (in pieces) and body parts from the central warehouse.
  2. You find that your version of sys-car/transmission is too new and you need to get a newer version of sys-car/engine out of storage.
  3. You put together the engine, transmission, and body. You’re pretty psyched, only to find that you have yet to install car-misc/seats.
  4. You install the seats, but find that the latest version of car-misc/seats does not correctly recognize the human body, due to an incompatibility.
  5. You downgrade car-misc/seats and in the process must downgrade sys-apps/steering-wheel for height concerns.
  6. You install the radio separately, which is the easiest part.
  7. You turn the car on and it explodes.

EDIT: Whoa, it looks like I’ve been Reddited! Or whatever the appropriate form of that word is. I want to clarify that I love Gentoo and use it on a daily basis. For all the ~arch dependency hell, it’s still a pretty damn great distribution.

6 Comments more...

Total: ∞ packages (0 good luck, 1 mistake)

by on Nov.16, 2008, under Linux

I’d just like to put this out there for everybody…

  1. Make frequent backups. Maybe every month.
  2. Do not, under ANY circumstances, accidentally try to install Haiku to /dev/sda. Ever.

Now that the advice is out of the way, it’s story time!

Yesterday, I was trying to install Haiku to my 512MB flash drive, which, when I plugged it in, got assigned /dev/sdb. The Haiku build system was, at the time set to write to /dev/sda2 (my 3GiB Haiku partition). I deleted the “2” and went on with my business. I ran jam -q haiku-image to build it.
“Hmm, this is taking a while.”
“dd, wrote 134 MB to /dev/sda”
“/dev/sda?! WHAT?!”
“OH MY GOD!”

It wrote 134 MB of 0x00s to the beginning of my hard drive, clobbering the bootloader, partition table, and the root filesystem of my Linux installation (/dev/sda1).

It also got to the “Populating Image” step, so it was happily chugging along writing a Be File System over my entire hard drive and filling it with Haiku data.
^C!

Programs still ran, not all the files on / were lost, and I was in a state of panic.
One reboot later confirmed the obvious – no more system. Also, no more files in /. The filesystem layout was in memory, and I should have taken the time to recover some of the data before I reformatted.

fsck told me that /usr was trashed.. /usr is like “Program Files” and more for Linux… Random data written in random places on a volume is… bad 😉
/ was definitely a goner…
/home somehow survived, guaranteeing that my 8 years-worth of data would stick around for a while longer!
Fortunately, I had backups from August 15th!
Unfortunately, they were from August 15th. That means 3 months worth of upgrades to do…

Restored / and /usr, some of /var (installed package database only), and went to work upgrading.

500 compiled and installed packages later (the last of which are still going) and Jesus is… Well, for the situation, I have to say he’s done pretty darn well. Kudos, me.

Once this is all done?

BACKUP TIME!

I think I need a NOS.

Leave a Comment : more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Blogroll

A few highly recommended websites...