[SGVLUG] drive recovery

John E. Kreznar jek at ininx.com
Mon Jun 20 00:56:08 PDT 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

In a posting purporting to be from yoshio <ak209 at lafn.org> but lacking
a digital signature, it is written:

> I have a WD400BB IDE hard drive (40 gig) that's not recognized by the
> BIOS, it doesn't seem to even spin up.  It was running Ubuntu 10.04,
> I upgraded grub-pc and grub-common, rebooted, then the drive
> suddenly was not recognized by BIOS.  I tried two different computers,
> so it's not the IDE data cable or power connector that's the problem.
> I don't have another drive of the same kind to swap controller boards.
> What else can I try?

Way back in 1996 I had a 4 GB Quantum SCSI drive that was becoming
increasingly reluctant to spin up.  (I should have taken that as an
imperative to back up the drive, but I procrastinated.)  Finally the
day came when it wouldn't spin up at all.  (Fast forward: I finally
found a guy with Campbell Technical Inc up north who was willing to
loan me a more modern electronics card for the same mechanical drive,
and with that it finally spun up again.  However, the new electronics
imposed a lower maximum cylinder count than had the old, so I lost a
little data anyway.)

Trying to get that baby to spin again was a big adventure that
consumed me for many days.  I could hear and feel the motor hum when
power was applied, but it wouldn't get off top dead center.  Some
highlights that I remember were to remove the drive from the case so
that I could hold it in my hand and jerk it on the rotation axis while
it was trying to start, hoping that inertia would break it loose, and
removing a seal from the disk chamber so I could touch the disk itself
with a narrow tool and try to move it that way.

But the highlight that might interest you most is the software and
scripting that I used to enable numerous repeated spin-up attempts
without cycling power to the whole computer.  I saved record of the
whole adventure in a directory here called "spinquantum".  Reviewing
it now, I see that I wrote C programs and scripts.  Here are some
fragments just to give an idea what it is.  If you want more detail,
just say.  One C program called spinbaby is commented at the beginning
as follows

   /* spinbaby.c to spin up a recalcitrant Quantum Empire.  jek 96 Dec 1 */
   /* Borrow heavily from the good work of: */
   /* hdparm.c - Command line interface to get/set hard disk parameters */
   /*          - by Mark S. Lord (c) 1994-1996 -- freely distributable */

and another called inquire is commented

   /* Inquire identity of a scsi device.   Adapted 96 Dec 2 by jek from: */
   /* The Linux SCSI programming HOWTO
     Heiko Eißfeldt heiko at colossus.escape.de
     v1.5, 7 May 1996 */

and contains my code

   int Kickit ( void )
   {
    static unsigned char cmdblk [6] = {
	       START_STOP, /* command */
			1, /* lun/reserved/immediate */
			0, /* reserved */
			0, /* reserved */
			1, /* Start */
			0};/* control */

    memcpy( cmd + SCSI_OFF, cmdblk, sizeof(cmdblk) );

    if (handle_SCSI_cmd(sizeof(cmdblk), 0, cmd,
			      0, NULL)) {
	fprintf (stderr, "Kick unit failed\n");
	exit(2);
    }
   }

which I invoked repeatedly from script "kick-it":

   #!/bin/sh
   until ./inquire
   do
	   sleep 30
   done


- -- 
 John E. Kreznar jek at ininx.com 9F1148454619A5F08550 705961A47CC541AFEF13

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8+ <http://mailcrypt.sourceforge.net/>

iEYEARECAAYFAk3+/RMACgkQYaR8xUGv7xOyZQCfcV/D1dMHMSXzoAf+waqIYrOq
HlMAnApmOlLCJnhwv2Rr1wzmuOlbpzJk
=59N4
-----END PGP SIGNATURE-----



More information about the SGVLUG mailing list