Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Sep 1998 12:41:11 -0400 (EDT)
From:      John Baldwin <jobaldwi@vt.edu>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Hard disk problems and some questions...
Message-ID:  <XFMail.980916124111.jobaldwi@vt.edu>

next in thread | raw e-mail | index | archive | help
-----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/<raw device> 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=<bad sector>

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 <bad sector> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.980916124111.jobaldwi>