From: moeller@gwdgv1.dnet.gwdg.de ("GWDGV1::MOELLER")
Newsgroups: comp.os.vms
Subject: RE: HEADERFULL messages when copying 2xRA81 to 1xRF72.
Date: 4 Sep 92 16:57:01 GMT
Distribution: world
Organization: The Internet

Brian System Manager <SYSTEM%CLUSTER.POLY-NORTH-LONDON.AC.UK@IB.RL.AC.UK>
writes:

> Problems once again! We (We? I mean muggins here) are in the middle of
> swapping our old CI based 8000 cluster with RA81 disks for a new 4500 (x4)
> RF72 LAVC VMS 5.5-1 cluster. I've got a problem copying some disks with
> HEADERFULL messages (detailed below), and basically need to know how to
> locate the headers used / headers free values on a disk volume.
>[...]

When you see HEADERFUL while creating files on a disk, this usually
means that the index file's (INDEXF.SYS) file header is full.
INDEXF.SYS is (essentially) used to hold the file headers -
at least one block per regular file.
Opposed to normal files, INDEXF.SYS can have only a single file
header, which is sufficient to describe some 40-odd extents.

INDEXF.SYS starts with a single extent whose size is dependent
on the method of initializing the disk; by some old decision,
it gets extended in pieces of 1000 blocks (hard coded),
which limits its total capacity to *about*
	40000 + <size of initial extent>
file headers.

A disk can be initialized either by INIT or by BACKUP/IMAGE.
INIT chooses for the initial extent of INDEXF.SYS the value
of the /HEADERS qualifier which, according to HELP, has a default
of 16 (!). This is obviously inadequate for a large disk,
so one should *always*
	$ INIT /HEADERS=<expected number of files>

BACKUP/IMAGE restores the "used" part of the saved disk's INDEXF.SYS
as a single extent (maybe except for pathological cases like bad blocks).
So after a save/restore cycle you're guaranteed room for extension
by another 40k headers. I *think* that /NOINIT cannot be used
to change this behaviour.

> Question : How can I find out how many file headers I have USED/FREE on a
>            disk?

I think there's no tool in VMS to give you an exact answer.
Why not simply estimate the number of USED file headers as
somewhere between "used" size of INDEXF.SYS (upper bound) and
the number of files on the disk (exact number available from
the last line of a BACKUP/IMAGE listing).
A lower bound to the number of FREE headers can then be had
as index file capacity (given above) minus USED headers.

Given today's disk sizes, overallocating some thousand
blocks to the index file by always initializing with a
generous number of /HEADERS shouldn't matter anymore!

NB. By "used" size I mean the output of DIRECTORY/SIZE,
    as opposed to /SIZE=ALLOC.
    Note that INIT/HEADERS only affects the "allocated" size
    of INDEXF.SYS, the "used" size will grow when files are created.

NB. To find the size of the extents currently allocated to INDEXF.SYS,
    use $ DUMP/HEAD/BLOCK=COUNT=0 [000000]INDEXF.SYS

PS. Someday in the past, I picked up a program HEADERCNT.MAR which will
    tell you the number of currently unused headers in INDEXF.SYS .
    I would use it only if there was a *big* discrepancy between the
    number of blocks allocated to INDEXF.SYS and the number of files
    on the disk.

Wolfgang J. Moeller, GWDG, D-3400 Goettingen, F.R.Germany | Disclaimer ...
PSI%(0262)45050352008::MOELLER      Phone: +49 551 201516 | No claim intended!
Internet: moeller@gwdgv1.dnet.gwdg.de   | This space intentionally left blank.

Newsgroups: comp.os.vms