hard disk problems
Gene H. Olson
gene at zeno.MN.ORG
Fri Aug 12 01:25:20 AEST 1988
In article <15324 at apple.Apple.COM> comdesign!ivucsb!todd at pyramid.com writes:
>Recently, I've been getting the following in my /usr/adm/unix.log:
>
>HDERR ST:51 EF:10 CL:FF80 CH:FF01 SN:FF00 SC:FF02 SDH:FF25 DMACNT:FFFF DCRREG:95 MCRREG:9100 Tue Aug 2 02:00:38 1988
>
>drv:0 part:2 blk:19552 rpts:1 Tue Aug 2 02:00:39 1988
>
>HDERR ST:51 EF:10 CL:FF80 CH:FF01 SN:FF00 SC:FF02 SDH:FF25 DMACNT:FFFF DCRREG:95 MCRREG:9B00 Tue Aug 9 02:01:22 1988
>
>drv:0 part:2 blk:19552 rpts:1 Tue Aug 9 02:01:22 1988
You have `bad block' there. For some reason the diagnostics do not
find all of them. On my system I had two of them that I had to fix
using the technique below:
1) Shut down your system. (init s) and boot up the diagnostic.
2) When the diagnostic menu comes up, type `s4test'. The system
will respond `expert>'. Then type `6,12'. The system will
respond giving you the sizes of partitions 0, 1, 2. On my
system (multiuser option) these sizes are 64, 5000, rest-of-disk.
Also note the number of heads on your disk; mine has 8. Now
type `U' to return to the regular menu.
3) Computation time. The messages in unix.log reference the same
block, and if you are smart, you will check it both ways to make
sure you have selected the right block before attempting to spare it.
First look at the Hex messages above:
CL: FF80 CH: FF01 SN: FF00 SDH: FF25
In all these numbers, only the lower byte is significant. CL is
cyclinder low (80 hex = 128 decimal) and CH is cylinder high
(01 hex = 1 decimal). That makes the cyclinder number 256*1 + 128
= 384. SDH gives the head (only lower nibble = 5 decimal). The
sector number (SN = 0).
I find it works best to spare blocks using the partition 0 block
offset. On standard ST506 drives (UNIX-PC) there are 17 sectors
per block. Each sector is 512 bytes. 16 Sectors are used to be
8 1K blocks in the filesystem. The 17th block is reserved to
spare out bad blocks. (A nice arrangement since it usually avoids
a seek when accessing bad blocks). So there are 8 blocks per
track (this is a magic clue!). Now we can figure out the
partition 0 block number as follows:
CH * 256 * (# heads = 8) * (# blocks/track = 8) = 16384
CL * 1 * (# heads = 8) * (# blocks/track = 8) = 8192
SDH * (# blocks/track = 8) = 40
SN / (# sectors/block = 2) = 0
----------------------------------------------------------
Partition 0 block number = 24616
This is the block you want to spare out. You should get the same
answer using:
Size of partition 0 (first cylinder) = 64
Size of partition 1 (swap area) = 5000
Reported (partition #2) block number = 19552
-----------------------------------------------
Partition 0 block number = 24616
4) Select the menu item that spares bad blocks. You will be allowed
spare out blocks 3 ways, by sector, by bit on track, and by block.
Select the `block' option. Spare block #24616. You can spare
just the first, or both the first and second sectors in that
block. You might as well spare both of them.
Gene H. Olson
amdahl!bungia!gene
More information about the Comp.sys.att
mailing list