How can I find out which disk sectors have been remapped?

Mario Wolczko mario%research7.computer-science.manchester.ac.uk at nss.cs.ucl.ac.uk
Thu Feb 23 14:59:41 AEST 1989


A few days ago a good part of 1 cylinder of our Super Eagle became
defective.  The SUN service-person who dealt with the problem added some
sectors to the drive's defect list, and mapped others on to "spare"
sectors.

The entire cylinder came from a client swap area (SunOS 4.0 swap file), so
we didn't lose any data.  However, after the fix, the client ran very
unpredictably, with periods of 10-20 seconds when apparently no useful
work was taking place (the display would freeze).  These coincided with
periods of high load (4-8) on the server.

Thankfully, there was enough free space in the client swap partition for
me to make a new swap file, remove the old one, and create smallish
(256Kb) files until one covered the defective cylinder.  After this, the
client behaved normally again.

That something strange is happening is indicated by the following:
mushroom# cd /export/swap
mushroom# ls -l crud*
-rw------t  1 root       256000 Feb 17 18:07 crud1
-rw------t  1 root       256000 Feb 17 20:09 crud2
mushroom# /bin/time dd bs=8192 if=crud1 of=/dev/null
31+1 records in
31+1 records out
       24.0 real         0.0 user         0.3 sys
mushroom# /bin/time dd bs=8192 if=crud2 of=/dev/null
31+1 records in
31+1 records out
        0.2 real         0.0 user         0.2 sys

Note the enormous amount of real time to read "crud1" (which contains the
defective cylinder) compared to a "normal" file.  It is accompanied by the
noise of a Super Eagle trying to break out of its mounting (flee the nest?
:-) as its heads bounce from one side of the disk to the other.

My question is: how can I find out which sectors have been remapped?
"format" will print out the defect list for me, but I can't find anything
in the manuals about mapping sectors to other areas (appropriate RTFM
welcome).  I shudder to think what the system would be like if, say "ls"
contained one of these sectors...

Mario Wolczko

Dept. of Computer Science    Internet:   mario at ux.cs.man.ac.uk
The University               USENET: mcvax!ukc!man.cs.ux!mario
Manchester M13 9PL           JANET:      mario at uk.ac.man.cs.ux
U.K.                         Tel: +44-61-275 6146  (FAX: 6280)



More information about the Comp.sys.sun mailing list