[Info-vax] VMS and bad blocks, was: Re: analyze/disk errors

Simon Clubley clubley at remove_me.eisner.decus.org-Earth.UFP
Fri Dec 6 13:34:13 EST 2013


On 2013-12-06, Johnny Billquist <bqt at softjar.se> wrote:
> On 2013-12-05 21:39, David Froble wrote:
>> abrsvc wrote:
>>> The documentation is correct, EXCEPT that badblk.sys is a reserved
>>> file that has a particular file id that cannot be changed.  The
>>> documentation should have specified that these files won't work this
>>> way.  "The badblk.sys file contains a list of suspected bad blocks on
>>> the volume that have not yet been turned over to the bad block file."
>>> (From VMS File System Internals by Kirby McCoy page 59).
>>>

I finally went and looked at this, because it didn't tie up with what
I remembered from when I wrote my ODS-2 reader.

The reference on page 59 is to BADLOG.SYS, _not_ BADBLK.SYS.

>>> So, in this case the documentation was correct, but incomplete.
>>
>> Now that is interesting.  Always something more to learn.
>>
>> I've been aware that the file system needed some way to avoid multiple
>> attempts to use a block that has been determined as "bad", and the
>> mechanism provided was the bad block file/list, so that the block would
>> be "in use" and not free for re-use.
>>
>> I wasn't aware there was an intermediate step.
>
> I'm not sure it's correct either. There are no other bad block file, as 
> far as I know. BADBLK.SYS is *it*. That is where bad blocks are placed. 
> Suspected or confirmed makes no difference. They are placed in 
> BADBLK.SYS, and thus, no other file can grab them. Problem solved. No 
> files will have bad blocks (except for BADBLK.SYS, where pretty much all 
> blocks are bad, by definition).
>

You are correct. From the detailed description on page 76 (any typos mine):

|The bad block file has file ID 3,3. It is listed in the MFD as BADBLK.SYS;1.
|The bad block file is simply a file containing all the known blocks on the
|volume that cannot reliably store data. This file has the record format of
|512-byte fixed-length records with no carriage control.
|
|On disks containing a bad block descriptor, the last track of the volume
|comprises the first several clusters of the bad block file. This rule
|ensures that the bad block data is available to software in a file-structured
|manner and is preserved when the volume is initialized again.

Simon.

-- 
Simon Clubley, clubley at remove_me.eisner.decus.org-Earth.UFP
Microsoft: Bringing you 1980s technology to a 21st century world



More information about the Info-vax mailing list