*BSD News Article 13864


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!olivea!uunet!tinman2!tdphette
From: tdphette@mke.ab.com (Thad Phetteplace x4461)
Newsgroups: comp.os.386bsd.bugs
Subject: Re: Problems with second IDE drive
Message-ID: <1pf8amINNcdc@scarecrow.mke.ab.com>
Date: 1 Apr 93 17:21:26 GMT
References: <1pavcnINN81i@scarecrow.mke.ab.com>
Organization: Allen-Bradley Co.
Lines: 48
NNTP-Posting-Host: tinman.mke.ab.com
X-Newsreader: Tin 1.1 PL4

tdphette@mke.ab.com (Thad Phetteplace x4461) writes:
: I recently installed a QP120AT IDE drive as wd1 on my system.  The
: install went fine.  I disklabeled and newfsed it.  No problems.  I
: then mounted the drive and copied a bunch of data to it.  Happy
: that everything was working I added it to my fstab and went about
: business.  A couple of days later I rebooted and wd1 seems to have
: *gone south*.  Whenever I attempt to access wd1 in any way the 
: system seems to lock up.  Characters I type are still echoed
: to the screen but thats it.

I've tracked my IDE problem to the readdisklabel function in
/sys/ufs/ufs_disksubr.c.  It seems to hang when after entering
the block of code starting with... 

        /* obtain bad sector table if requested and present */
        if (bdp && (lp->d_flags & D_BADSECT)) {
 
If I remember correctly, IDE drives do hardware remapping of bad
sectors.  Therefor the unix bad sector table need not (should not?)
be used.  I have in fact noticed that this block of code is never
entered when reading the disklabel of my primary drive.  As a
temporary hack I commented out the code and recompiled.  I can
now access my second drive with no problems.  Will this come back
to haunt me?  I realize this is not the correct place to fix things,
drives requiring a bad sector table will need to use this code.
I only have IDE drives right now so I think I can get away with it.
If I am corrent in thinking that the bad sector table is not needed,
then the error is somewhere in the values being examined in the *if*
command shown.  Where and why those values are being set incorrectly
are still a mystery to me. 

I will continue to look into this, but I am by no stretch of the
imagination a kernel guru nor do I know much about IDE hardware.
I seem to remember a discussion of this type several months ago.
I unfortunatly didn't follow the thread very closely.  Any help
or advice would be appreciated, even flames telling me I'm an
outright moron who is about to trash his file system. 

(obligitory smiley ommited)

--
Thad Phetteplace
Network Systems Analyst, Allen-Bradley Co.
Phone: (414)382-4461
Email: tdphette@mke.ab.com

The opinions expressed here are entirely my own and not that of my employer.
I am not a slob, I am simply doing an experiment in domestic entropy!