From owner-freebsd-scsi Fri Aug 28 22:14:20 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA11548 for freebsd-scsi-outgoing; Fri, 28 Aug 1998 22:14:20 -0700 (PDT) (envelope-from owner-freebsd-scsi@FreeBSD.ORG) Received: from word.smith.net.au (castles244.castles.com [208.214.165.244]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA11522 for ; Fri, 28 Aug 1998 22:14:11 -0700 (PDT) (envelope-from mike@word.smith.net.au) Received: from word.smith.net.au (localhost [127.0.0.1]) by word.smith.net.au (8.9.1/8.8.8) with ESMTP id WAA00589; Fri, 28 Aug 1998 22:11:09 GMT (envelope-from mike@word.smith.net.au) Message-Id: <199808282211.WAA00589@word.smith.net.au> X-Mailer: exmh version 2.0.2 2/24/98 To: Brian Behlendorf cc: freebsd-scsi@FreeBSD.ORG Subject: Re: medium error In-reply-to: Your message of "Fri, 28 Aug 1998 19:04:01 MST." <19980829020856.14746.qmail@hyperreal.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 28 Aug 1998 22:11:08 +0000 From: Mike Smith Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > > (please include my address in responses, I'm not on -scsi) > > I had a disk go bad on me while installing a new one - unfortunately it had > a few things on it that are worth trying to salvage the disk for (items > that backups didn't save). At this point all I'm getting when I try to > talk to it is "Medium format error - device not configured" errors to the > console, although the SCSI card can identify it properly, even get the > manufacturer & model #. These parameters are usually in nonvolatile memory, not on the disk, although there is often a second firmware component loaded off the disk. > All tools, from disklabel to fdisk, fail to do > anything, causing the above error message. Am I outta luck? Is it beyond > the OS at this point? It looks like the disk is damaged in a fashion that's making it impossible to obtain slice and/or label information. Recovery at this point is problematic, but may not be impossible, depending on how much time and effort you are willing to put into the process, and how lucky you are. To start with, try writing a simple program which just opens the bare device (eg. /dev/sdX). If the open completes OK, then you should be able to improve the program to build an image of the entire disk in a file on another disk. You will have to read the device one block at a time, and note whether you succeed or fail. It's possible that the disk may go offline after a failure, so you may need to further improve the program such that you can reboot and take up where you left off. If you are unable to open the bare device, then you should check with the scsi(8) command as to whether you can read a single block from the drive. This will involve some familiarity with SCSI commands. If this works, then you should build a program as described above, but use raw SCSI commands rather than device I/O to talk to the drive. The chances of this sort of program working are only slightly better than the first. If you are able to recover most of the disk, you will then need to reconstruct the missing blocks as required to recover your data. Needless to say, you should make a backup of the image file before you start. Start by reestablishing the MBR (if the disk had one), and then the partition table(s) in the slices. If you can't remember what the table(s) looked like, search the image file for the filesystem magic numbers to find the beginning of your partition(s). This can be complicated if the top of a filesystem has been damaged; you will have to locate an alternate superblock, work out from that where the base of the filesystem was, reconstruct and then use fsck -b. > Are there any shops in the Bay Area that will > re-seat the platters into a new drive housing for a reasonable fee? Without knowing the FRU out of the vendor-specific data from the SCSI error codes, and having the FRU list for the disk in question, it's difficult to know whether this would be worth the effort. There are a number of such organisations; check your copy of MicroTimes as I'm fairly sure that several of them advertise there regularly. > This was a Seagate 15230N, by the way. Hmm, that's fairly odd. These (Hawk 4) are normally pretty solid; I presume you *were* keeping it cool? 8) -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message