[mod.computers.vax] Removing a bad block

BMW6957@TAMCHEM.BITNET (Brad Wilson) (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 found the actual adress on the disk in the ERRORLOG (CYL,TRACKS,SECTOR).
> 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

Walter,

I also had this problem a while back (on RM05s).  What I did was create a new
swapfile and reboot (so that the new file would be in use).  If you have the
space to spare, you can just leave the old swapfile around until you are ready
to INIT the pack and restore.  If the block is bad enough that a read always
fails (mine was intermittent), then VMS should have marked the file as
containing bad blocks (use ANALYZE/RMS on the old swapfile to check).  If the
file is marked, VMS will check the blocks allocated to the file when it's
deleted.  Any bad blocks found at deletion time will be automatically added
to BADBLK.SYS (VMS creates a process to do the checking, wait until the
process exits before rebooting).  If the problem is intermittent, VMS may
determine that all the blocks in the file are good and return them to
service.  That's what happened to me, so I used the FDL editor to describe
a small indexed file with exact positioning for one of the areas (and, of
course, the exact position was at the offending logical block) and created
said file.  I then put the file in a safe place where I would be unlikely
to delete it.  Later, when I did a BACKUP and restore on the volume
I ran BAD to add the block to the software bad block list before the
restore.

If anyone has other ideas on how to solve this problem, I'd like to hear
them (I still have RM05s on my system).

Brad Wilson