[mod.computers.vax] How to get rid of bad blocks on a disk

XBR1Y013@DDATHD21.BITNET (H. HONAL) (01/22/87)

On one of our (not very reliable) RP07 disks we do have bad blocks.
One of the bad blocks was located in a swap file - this resulted in several
crashes during the past days (INSWAP READ ERROR).
We have located the defective block by running BACKUP against that file

 BACKUP device:[directory]swapfile.sys NL:DUMMY /SAV /IGNORE=INTERLOCK

with this method we found the actual adress on the disk in the ERRORLOG
(CYL , TRACKS, SECTOR no. )  and  BACKUP told us the relative Block in the
dataset.
Now the question: how can we get rid of this defective block running the
BAD utility? In the manual BAD BLOCK LOCATOR Utility Ref.Manual on page BAD-2
it is mentioned that BAD /NOEXCERCISE/BAD_BLOCK=.... will update the DBBF
(detected bad block file) and:
"after BAD locates and records the bad blocks, you issue the DCL command
 INITIALIZE to change the volume from unstructured format to Files-11
 format and allocate the faulty blocks to a special file on the volume called
 [000000]BADBLK.SYS. In this way, users are protected from accessing them
 for their files..."

Well - INIT destroys your data (all 516 Megabytes of user data....)
Any help or hint is appreciated.

Walter Reichenbaecher
Techn.University of Darmstadt, West Germany

Bitnet Adress:  XBR1Y013 @ DDATHD21
ARPAnet:        XBR1Y013%DDATHD21.BITNET@WISCVM.WISC.EDU
--------------------------------------------------------

"Thomas_W._Taylor.WBST147"@XEROX.COM.UUCP (01/27/87)

If VMS has detected a bad block in a file (via a read virtual block) it
will mark the file as having suspected bad blocks in the header.  The
suspected bad blocks are entered into [000000]BADLOG.SYS.  You can do a
$Directory/full to determine if the bit is set.  When the file is
deleted a detached process running BAD is run against the area allocated
for the file to determine if the blocks are really bad.  If they are
they are added to BADBLK.SYS.  Note that they are not entered into the
MDBSF, so they will be lost at the next INIT. 

If you suspect that a disk contains bad blocks you should be able to
write a program to do a read VIRTUAL block of all suspected blocks
(those on a disk or in a particular file).  If VMS thinks the blocks are
bad the above scenario would be followed.  I have not done this but it
seems doable.  Good luck.

			twt