[comp.unix.i386] sparing bad blocks

bt455s10@uhccux.uhcc.hawaii.edu (Carl "Art" McIntosh) (11/27/89)

How does one map out bad sectors under ISC 2.02 ? 
I have tried to map out a new bad sector reported
by a console message giving the absolute sector,
the drive and controller numbers.  According to
the man page mkpart(1M) the -A option should do
the trick, however mkpart -A 266867 disk0 yields
the message V_REMOUNT failed and informs me a
reboot or remount or the device is required. 
after rebooting the system, the /etc/partitions
file does not list the new bad sector, furthermore
mkpart -t vpa disk0 does not show sector 266867
as having been remapped.  Anyone know how this
supposedly simple procedure is done ?

-- 
ARPA: manapua!pilikia!root@trout.nosc.mil
UUCP: {uunet,ucbvax,dcdwest}!ucsd!nosc!manapua!pilikia!root

jgd@rsiatl.UUCP (John G. De Armond) (11/27/89)

In article <5556@uhccux.uhcc.hawaii.edu> bt455s10@uhccux.uhcc.hawaii.edu (Carl "Art" McIntosh) writes:
>How does one map out bad sectors under ISC 2.02 ? 
>I have tried to map out a new bad sector reported
>by a console message giving the absolute sector,
>the drive and controller numbers.  According to
>the man page mkpart(1M) the -A option should do
>the trick, however mkpart -A 266867 disk0 yields
>the message V_REMOUNT failed and informs me a
>reboot or remount or the device is required. 
>after rebooting the system, the /etc/partitions
>file does not list the new bad sector, furthermore
>mkpart -t vpa disk0 does not show sector 266867
>as having been remapped.  Anyone know how this
>supposedly simple procedure is done ?


God, this is deja vu, having been working with  large drive containing 
hundreds of bad sectors. :-)

What you did worked, the problem is a matter of interpretation.  The
/etc/partitions file is a read-only prototype file for mkpart.  It is 
NOT updated by mkpart.  To view the Volume Table of Contents (VTOC),
invoke mkpart with the command:

mkpart -tvpa disk1

This makes mkpart print out statistics on the drive.  I've found it
invaluable to make a hardcopy of this table for when the volume 
gets wiped out.  You don't have to rediscover the bad sectors all
over again.

You should be aware of a terrible problem with mkpart that makes it
extremely dangerous.  If /etc/partitions gets altered or corrupted
and you invoke mkpart - even for a read-only status request as above -
it will without your permission try to force the drive VTOC to agree
with /etc/partitions.  Usually this results in a trashed volume.
I learned this the hard way when I moved a large drive off the root
and installed a small, fast drive for the root partition.  When 
I restored the root partition from tape, the previous /etc/partitions
file got written out.  After restoring the /usr and other partitions
to the large drive, I used the -tvpa option to print out 
statistics on the new configuration.  Voila! Trashed root partition.
I've changed permissions on /etc/partitions to read-only, root AND
keep a checksum handy to use before invoking mkpart.

Next, a question for the interactive types.  Why does the -V or -v 
option with an Adaptec 1542 SCSI controller not work?   I can hear
the drive retry several times on each bad sector but the program 
never reports one.  When a bad sector is encountered in operation,
I hear only one retry before the kernal reports a problem.  I
had to collect bad sector information by dd'ing from /dev/dsk/0s1 etc
and logging the kernal messages.  What a bitch!

One more comment.  If your drive/controller  has a low level bad sector
mapping facility, USE IT.  The Interactive facility seems very fragile.
I took the drive in question out of service and repeatedly assaulted it
with the Adaptec firmware mapping program (HINT:  reprogram the typmatic
action on the keyboard for about 1 character per second and sit a 
large ball-pein hammer on the "Y" key :-).  I let the program run
until it would run for 24 hours without finding an additional bad sector.
When I put the drive back in service, it was like a whole different 
drive.  Where before it would grow a bad sector or 2 a day, it has been
up for about 3 weeks with nary a peep.

Hint to Adaptec:  PLEASE give me a verify mode where I don't have to 
hit the damn 'Y' key for every bad sector.  A batch mode would be fine.

John

-- 
John De Armond, WD4OQC                     | Manual? ... What manual ?!? 
Radiation Systems, Inc.     Atlanta, GA    | This is Unix, My son, You 
emory!rsiatl!jgd          **I am the NRA** | just GOTTA Know!!! 

akcs.larry@nstar.UUCP (Larry Snyder) (11/27/89)

>How does one map out bad sectors under ISC 2.02 ? 
>I have tried to map out a new bad sector reported

Before I purchased ISC I was warned about adding additional bad sectors
to the root device. 

jlg@odicon.UUCP (John L. Grzesiak) (12/03/89)

> 
> Next, a question for the interactive types.  Why does the -V or -v 
> option with an Adaptec 1542 SCSI controller not work?   I can hear
> the drive retry several times on each bad sector but the program 
> never reports one.  When a bad sector is encountered in operation,
> I hear only one retry before the kernal reports a problem.  I
> had to collect bad sector information by dd'ing from /dev/dsk/0s1 etc
> and logging the kernal messages.  What a bitch!
> 

I may be wrong here , but I beleive the HA-154x remaps sectors to
 spares transparently. So , if this is the case , the OS won't
 get to see bad sectors.



	*-----------------------------------------------------------------*
	* John Grzesiak @ Omega Dynamics :  Specializing in UNIX/XENIX    *
	* Meriden Ct USA                 :    Consulting . . .            *
        * jlg@odicon or spock!odicon!jlg : gaboon!odicon!jlg              *
	*-----------------------------------------------------------------*