From owner-freebsd-questions Wed Sep 16 09:40:25 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA09865 for freebsd-questions-outgoing; Wed, 16 Sep 1998 09:40:25 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from quackerjack.cc.vt.edu (quackerjack.cc.vt.edu [198.82.160.250]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA09721 for ; Wed, 16 Sep 1998 09:40:07 -0700 (PDT) (envelope-from jobaldwi@vt.edu) Received: from sable.cc.vt.edu (sable.cc.vt.edu [128.173.16.30]) by quackerjack.cc.vt.edu (8.8.8/8.8.8) with ESMTP id MAA05648 for ; Wed, 16 Sep 1998 12:46:44 -0400 (EDT) Received: from john.baldwinfamily.org (jobaldwi.campus.vt.edu [198.82.67.63]) by sable.cc.vt.edu (8.8.8/8.8.8) with ESMTP id MAA19560 for ; Wed, 16 Sep 1998 12:39:42 -0400 (EDT) Message-ID: X-Mailer: XFMail 1.3 [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Date: Wed, 16 Sep 1998 12:41:11 -0400 (EDT) Reply-To: jobaldwi@vt.edu Organization: Virginia Tech From: John Baldwin To: freebsd-questions@FreeBSD.ORG Subject: Hard disk problems and some questions... Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG -----BEGIN PGP SIGNED MESSAGE----- Hi all, I've been having some hard drive problems, and here they are: 1) I just installed a UDMA IDE drive in a AMD 486/100 based PC with a VLB I/O card. It seems to work perfectly fine as long as no standard IDE drives are hooked up to the same IDE controller that it is on. However, with 32-bit access and multi-block 16 turned on, the performance of the hard drive is a bit low. I use the following ultra simple command to gauge all of my storage devices against each other: dd if=/dev/ of=/dev/null bs=1m count=500 With this test, the UDMA drive only gets about 2 Meg/sec. On my other machine (which is pentium based) my UDMA drive gets about 12 Meg/sec with all the options turned on and 2 Meg/sec with them turned off, so it seems that it is not using the 32-bit and multi-block options even though they do appear in my dmesg. Could it be that my controller card only supports PIO mode 0 or something? My BIOS reports it as using mode 4, and I thought that BSD wouldn't rely on that anyway. My aforementioned Pentium machine had been having several weird problems until I moved my second hard drive (an EIDE drive) onto a separate IDE bus than my UDMA drive. Now they seem to coexist happily and I even managed to bump my bus speed back up to 75 (I had been using 66 MHz as a "band-aid" when I first had problems.) However, My EIDE drive is starting to die (hopefully I didn't accelerate its death by running it on the same bus with the UDMA drive) with a couple of bad sectors. When I reformatted the drive recently, I put bad144 on it and during the format, bad144 found 1 bad sector. While trying to use the dd benchmark test above I ran into another bad sector. I tried running 'bad144 - -s -v' on the drive, but it did not find the bad sector so I manually added the bad sector via 'bad144 -a'. Since dd was finding errors that bad144 didn't, I wanted to use dd to read the entire disk so that I could mark any other bad sectors. So, I tried: dd if=/dev/rwd2 of=/dev/null bs=512 count=1048576 seek= thinking that dd would use a call to lseek(2) to skip to the sector directly after the bad sector and then scan the next 512 meg. Apparently, the wd driver doesn't implement the lseek() call or the man page for dd is wrong, because instead of seeking, dd attempted to read the first blocks and just discard them. Needless to say, dd dies with an I/O error at the first bad sector and I can't test the rest of the disk. One reason I want to test the rest of the disk is that I believe my main superblock has gone bad. If I run fsck on the drive I get the following: ** /dev/rwd2s1e BAD SUPER BLOCK: VALUES IN SUPER BLOCK DISAGREE WITH THOSE IN FIRST ALTERNATE /dev/rwd2s1e: LABELED AS A 4.2BSD FILE SYSTEM, BUT BLOCK SIZE IS 0 If I execute the following: fsck -b 32 /dev/rwd2s1e Then everything checks out ok and it asks me if I wish to update the standard superblock, to which I say yes. If I run fsck w/o the '-b 32' I again get the same error. I even tried running 'sync' to try to force the write to the superblock to be completed, but fsck still claims that I have an invalid superblock. Once I run the fsck with the '-b 32' the drive will mount fine and I get no other errors at all with the drive. Hope I've provided enough info. Thanks for any suggestions or hints. - --- John Baldwin - -- jobaldwi@vt.edu -- jbaldwin@freedomnet.com -- ---- http://www.freedomnet.com/~jbaldwin/ ---- "I waited for the Lord on high/I waited and He heard my cry." - Petra -----BEGIN PGP SIGNATURE----- Version: 2.6.2 iQB1AwUBNf/oMYjYza302vYpAQHMlgL/aKQXqrK13u+4+dTfQLI7tTgY+CYAJYBs 4vt74k0aW1xuV8LsLsI1b6QGLGtFIWn617V+qqLiaXnk+J/koi9IfmhdQAknbmFP CtaVmYuCf9HS7tgViSJPN7XiWnundueR =XB49 -----END PGP SIGNATURE----- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message