Files-11 - Index File: INDEXF.SYS

Index File: INDEXF.SYS

The index file contains the most basic information about a Files-11 volume set.

There are two organizations of INDEXF.SYS, the traditional organization and the organization used on disks with GPT.SYS; with the GUID Partition Table (GPT) structures.

With the traditional organization, block 1 is the boot block, which contains the location of the primary bootstrap image, used to load the VMS operating system. This is always located at logical block 0 on the disk, so that the hardware firmware can read it. This block is always present, even on non-system (non-bootable) volumes.

After the boot block is the primary home block. This contains the volume name, the location of the extents comprising the remainder of the index file, the volume owner's UIC, and the volume protection information. There are normally several additional copies of the home block, known as the secondary home blocks, to allow recovery of the volume if it is lost or damaged.

On disks with GPT.SYS, GPT.SYS contains the equivalent of the boot block (known as the Master Boot Record (MBR)), and there is no primary home block. All home blocks present on a GPT-based disk are alternate home blocks. These structures are not included in INDEXF.SYS, and the blocks of the INDEXF.SYS file are unused.

The rest of the index file is composed of file headers, which describe the extents allocated to the files residing on the volume, and file metadata such as the owner UIC, ACLs and protection information. Each file is described by one or more file headers—more than one can be required when a file has a large number of extents. The file header is a fixed-length block, but contains both fixed– and variable–length sections:

  • The header contains the NUM and SEQ, the protection (security) information, and the location(s) of the rest of the file header.
  • The ident section contains the accounting metadata: the filename, creation and modification times, and the time of the last backup.
  • The map describes which physical disk blocks (extents) map to each virtual block of the file.
  • The access control list contains the ACL information for the file.
  • The reserved area is space at the end of the file header which is not used by the operating system. This can be used by for customer- or vendor-specific information.
  • The last two bytes of the header are a checksum of the previous 255 words, to verify the validity of the header.

If possible, the map and ACL sections of the header are contained completely in the primary header. However, if the ACL is too long, or the file contains too many extents, there will not be enough space in the primary header to store them. In this case, an extension header is allocated to store the overflow information.


The file header begins with 4 offsets (IDOFFSET, MPOFFSET, ACOFFSET and ROFFSET). Since the size of the areas after the fixed-length header may vary (such as the map and ACL areas), the offsets are required to locate these additional areas. Each offset is the number of 16-bit words from the beginning of the file header to the beginning of that area.

If the file requires multiple headers, the extension segment number (SEGNUM) contains the sequence number of this header, beginning at 0 in the first entry in INDEXF.SYS.

STRUCLEV contains the current structure level (in the high byte) and version (in the low byte) of the filesystem; ODS-2 being structure level 2. An increase in the version number indicates a backwards-compatible change that older software may ignore; changes in the structure level itself are incompatible.

W_FID (containing three values: FID_NUM, FID_SEQ and FID_RVN, corresponding to the file, sequence, and relative volume number) contains the ID of this file; EXT_FID (again composed of three values) holds the location of the next extension header, if any. In both of these values, the RVN is specified as 0 to represent the "current" volume (0 is not normally a valid RVN).

FILECHAR contains several flags which affect how the file is handled or organised:

  • NOBACKUP causes this file to be ignored when a backup is run.
  • WRITEBACK enables cached (delayed) writes to the file.
  • READCHECK causes all reads of the file to be done twice, and compared to ensure data integrity.
  • WRITCHECK results in all writes being verified by a subsequent read and compare.
  • CONTIGB causes the OS to attempt to allocate storage for the file in as contiguous a manner as possible.
  • LOCKED is set if the file is deaccess-locked. If set, this indicates that the file was not properly closed after its last use, and the contents may be inconsistent.
  • CONTIG indicates that the file is stored contiguously on disk; that is, each virtual block is mapped to the logical (physical) block, for some constant .
  • BADACL is set if the file has an invalid access control list.
  • SPOOL is set if the file is a spool file, such as an intermediate file used during printing.
  • DIRECTORY is set if the file is a directory.
  • BADBLOCK is set if the file contains bad blocks.
  • MARKDEL is set if the file has been marked for deletion, but is still in use; it will be deleted once closed by the last user.
  • NOCHARGE, if set, causes space used by the file to not be taken from the owner's storage quota.
  • ERASE causes the file's contents to be overwritten when it is deleted.

ACCMODE describes the privilege level at which a process must be running in order to access the file. VMS defines four privilege levels: user, supervisor, exec, and kernel. Each type of access - read, write, execute and delete - is encoded as a 2-bit integer.

FILEPROT contains the discretionary access control information for the file. It is divided into 4 groups of 4 bits each: system, owner, group and world. Bit 0 corresponds to read access, 1 to write, 2 to execute and 3 to delete. Setting a bit denies a particular access to a group; clearing it allows it.

If the file header is an extension header, BACKLINK contains the file ID of the primary header; otherwise, it contains the file ID of the directory file containing the primary entry for the file.

Read more about this topic:  Files-11

Famous quotes containing the word index:

    Exile as a mode of genius no longer exists; in place of Joyce we have the fragments of work appearing in Index on Censorship.
    Nadine Gordimer (b. 1923)