From owner-freebsd-questions Tue Feb 16 23:24:18 1999 Delivered-To: freebsd-questions@freebsd.org Received: from panzer.plutotech.com (panzer.plutotech.com [206.168.67.125]) by hub.freebsd.org (Postfix) with ESMTP id 91CD210EE7; Tue, 16 Feb 1999 23:24:14 -0800 (PST) (envelope-from ken@panzer.plutotech.com) Received: (from ken@localhost) by panzer.plutotech.com (8.9.2/8.8.5) id AAA67341; Wed, 17 Feb 1999 00:24:10 -0700 (MST) From: "Kenneth D. Merry" Message-Id: <199902170724.AAA67341@panzer.plutotech.com> Subject: Re: trouble with a seagate ST39140N 1206 In-Reply-To: from Khang Trang at "Feb 17, 1999 1:59:52 am" To: khang@hero.clerk.leon.fl.us (Khang Trang) Date: Wed, 17 Feb 1999 00:24:10 -0700 (MST) Cc: freebsd-scsi@FreeBSD.ORG, freebsd-questions@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL43 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Khang Trang wrote... > > help! > > i'm having some problems with an adaptec 2940 and two seagate ST39140N > 1206 drives running on a ppro200 with fbsd 3.0-release. > > history: > the machine was formerly a redhat 5.1 linux machine and the two seagate > drives were formatted ext2fs. switched to fbsd 3.0 ... formatted the 8 gig > ibm ide drive and installed fbsd 3.0. fbsd loads up and runs great. > > everything worked great. i was able to mount_ext2fs the two scsi seagate > drives, but then the system got rebooted a few times (without my > knowledge) and the seagate drives got corrupt (superblock was missing). > tried fsck -b with an alternate superblock to no avail. i figured might > as well format and setup the hds as fbsd drives so i do: > > camcontrol cmd -v -n da -u 0 -c "4 0 0 0 0 0" > > following the examples from a post to the fbsd mail archives. Well, there's just one problem with that... > when i ran camcontrol it gave some sort of error saying could not send > command or soemthing to that extent. no biggie i figured. What probably happened is that the command timed out. Low-level formatting generally takes a long time to complete. (up to a couple of hours) Here's how to specify a timeout in seconds: camcontrol cmd -v -t 10800 -n da -u 0 -c "4 0 0 0 0 0" That sets the timeout to 3 hours. It's generally *not* a good idea to low-level format a drive as your first resort. The things you're trying below are much better. It's much better to just to disklabel the disk, newfs it, etc. > look through > the fbsd handbook and found: > > dd if=/dev/zero of=/dev/foo bs=1K count=1 > disklabel etc etc etc > > tried that but got this error message: > > dd: /dev/rda0: Input/output error > > checking dmesg there are these errors: > > (da0:ahc0:0:0:0): READ(06). CDB: 8 0 0 0 1 0 > (da0:ahc0:0:0:0): MEDIUM ERROR asc:31,0 > (da0:ahc0:0:0:0): Medium format corrupted > da0: error reading primary partition table reading fsbn 0 > > now i can't fdisk, fsck, disklabel, or anything on that drive. What has most likely happened is that since the format was stopped when it was only partially completed, the disk has more or less lost its brain. > camcontrol devlist shows the following: > at scbus0 target 0 lun 0 (pass0,da0) > at scbus0 target 1 lun 0 (pass1,cd0) > at scbus0 target 3 lun 0 (pass2,cd1) > at scbus0 target 4 lun 0 (pass3,da1) > > HELP! > i'm not worried about losing the data (ha! that's probably already done) > but from what i've managed to find out from teh mail archives i'm under > the impression that i'm screwed. i haven't tried looking at the firmware > in the scsi controller (suggested to me) or a low level format (can > someone tell me how in fbsd 3.0?). any help would be appreciated. as > long as teh drives aren't now paperweigths i'm happy. > > would it help if i took the drives out, put them in a dos machine and > format them, then put them back in and mount_msdos them? i'm considering > this route if it works. > > if you need more info please email me back. (btw the machine is up > and running with fbsd 3.0 just don't have the two drives mounted which i > really really would like to do. so PLEASE DON'T TELL ME THE DRIVES ARE > PAPERWEIGHTS AND I SHOULD BUY NEW ONES :(.) I don't think they're paperweights at all. The "Medium format corrupted" errors can generally be fixed by low-level formatting the disk. This is one of the few instances where low-level formatting is actually the right thing to do. As I mentioned above, here's how to low-level format da0: camcontrol cmd -v -t 10800 -n da -u 0 -c "4 0 0 0 0 0" I think 3 hours should be enough, but I haven't low-level formatted a drive in a couple of years. If you don't think 3 hours will be enough, you can increase the timeout. (If you get a timeout type error, you'll know to increase the timeout.) Good luck, Ken -- Kenneth Merry ken@plutotech.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message