SQUASH SYSTEMDIRECTORY (Reduce Number of Directory AREAS)

The SQUASH SYSTEMDIRECTORY (Reduce Number of Directory AREAS) command makes a replacement or squashed copy of the SYSTEMDIRECTORY for a disk family. You can use this command to reduce the number of AREAS that the SYSTEMDIRECTORY for the family occupies.

Syntax

Explanation

SQUASH SYSTEMDIRECTORY ON <family name>

Copies records from the current SYSTEMDIRECTORY for the specified family and replaces the current SYSTEMDIRECTORY with the copy.

The SQUASH SYSTEMDIRECTORY command reduces the number of AREAS in the SYSTEMDIRECTORY if there is a large number of AVAILABLE records in the current directory. The DU SYSTEMDIRECTORY ON <family name> command displays how much space is available in the current SYSTEMDIRECTORY. The PD SYSTEMDIRECTORY/<number> ON <family name> command displays how many AREAS there are in the current SYSTEMDIRECTORY.

Example

The following example shows how to squash the SYSTEMDIRECTORY for the disk family named PACK:

SQUASH SYSTEMDIRECTORY ON PACK

Considerations for Use

Restrictions

You cannot use the SQUASH SYSTEMDIRECTORY command on the active halt/load family.

You cannot use the SQUASH SYSTEMDIRECTORY ON <family name> command on a family with a duplicated or triplicate SYSTEMDIRECTORY, or on a disk family that is marked as SHARED. By using the DD − ON <family name> and DD ON <family name>, and the SHARE − <family name> and SHARE <family name> LEVEL <number> commands respectively, you can cancel these features before using the SQUASH SYSTEMDIRECTORY command and restore them after the process is finished.

Avoid using the SQUASH SYSTEMDIRECTORY command when the system is running critical application programs. The process that copies and creates the new SYSTEMDIRECTORY runs at a very high priority. The SQUASH SYSTEMDIRECTORY process uses about twice as much time as a DD process does. After creating the NEW SYSTEMDIRECTORY, the process does a family and catalog rebuild for the family. The process procures the directory lock for the family while it is running. This blocks all access to the SYSTEMDIRECTORY of the family. Any program or command (such as PD or SL) that attempts to use the SYSTEMDIRECTORY must wait for the process to finish. 

Avoid using the SQUASH SYSTEMDIRECTORY command on disk families that are STANDBY halt/load units during times when the system is running critical application programs. The SQUASH SYSTEMDIRECTORY process procures the directory lock for the family while it is running. In the case of a family that is a STANDBY halt/load family, this blocks the system from updating any of the special tables on that family. If there are other STANDBY halt/load families online, the blockage on the family for which the SQUASH SYSTEMDIRECTORY process is running might block the system from updating the tables on some of those other STANDBY halt/load families, too. The tables include the Mirror Information Table, the Configuration Table, the SL Table, and so forth.

Recovery Measures

We recommend that you make a complete backup of the files on the family before using the SQUASH SYSTEMDIRECTORY command. This gives you a method of recovery if software or hardware errors cause the new SYSTEMDIRECTORY command to generate defective records.

Changing the Size of the SYSTEMDIRECTORY for a Disk Family

The following three system commands enable you to change the size of the SYSTEMDIRECTORY for a disk family.

  • EXPAND SYSTEMDIRECTORY/<number> ON <family name> AREAS <number>

    The primary purpose of this command is to preexpand the SYSTEMDIRECTORYs for a given family.

    Preexpanding the SYSTEMDIRECTORYs for a family helps to ensure that the system is not delayed waiting for disk space on the base pack to expand the SYSTEMDIRECTORY while you are adding files to the family.

  • NEW SYSTEMDIRECTORY ON <family name>

    The primary purpose of this command is to change the AREASECTORS value of the SYSTEMDIRECTORY on the indicated family.

    You can change AREASECTORS from the old 600 sector value to 2000 sectors, roughly tripling the total capacity of the directory. For single pack disk families, you can change the value from 2000 sectors to 4000 sectors, roughly doubling the total capacity of the directory.

  • SQUASH SYSTEMDIRECTORY ON <family name>

    The primary purpose of this command is to reduce the size of the SYSTEMDIRECTORY for the family and return unused AREAS to the available disk space pool for use by normal files.

    Use this command for disk families that at one time contained a large number of files but no longer contain or need to contain so many files.

    Note that this function is completely different from the function of the SQUASH <family name> system command, which attempts to reduce the checkerboarding of the available disk space pool.

Performance

The SQUASH SYSTEMDIRECTORY and NEW SYSTEMDIRECTORY commands both use the same algorithm as follows:

  • Make a new copy of the SYSTEMDIRECTORY and, in the process, assign new record numbers to each record (each disk file header) copied from the old directory to the new directory.

  • Adjust the linkages between segments of all segmented disk file headers in the directory (such as the disk file headers for files with more than 2000 AREAS).

  • Execute a family rebuild or catalog rebuild for the family to update the record number information in the FAST or CATALOG.

  • Go through main memory and update the record numbers in the disk file headers for all permanent disk files that are currently open or are in the STRUCTURE HEADER cache.

To make a coherent copy of the directory, the process procures various locks to block all access to the SYSTEMDIRECTORY by programs and system software. This activity blocks the opening and closing of files on the family, the removal of files from the family, the changing of the file name or other attributes of files on the family, and so forth. The locks also block the use of the PD (Print Directory) and other system commands; CANDE FILES and LFILES commands, and MARC commands that reference the family. In some cases, the blockage can extend to uses of the PER PK command either manually or in an ADM display.

Postpone using the SQUASH SYSTEMDIRECTORY and NEW SYSTEMDIRECTORY commands until a time when critical programs are not running. Before using either of these commands, consider using the ADM ST system command on any ODT that is running the automatic display of system status with a the display of disk packs (PER PK). Whenever a SQUASH SYSTEMDIRECTORY or NEW SYSTEMDIRECTORY process is running, avoid issuing any commands that reference disks, such as PER PK (Peripheral Status), PD (Print Directory), MP (Mark Program), and so forth.

The EXPAND SYSTEMDIRECTORY command uses a much simpler algorithm as follows:

  • It searches for available disk space and adds spare AREAS to the SYSTEMDIRECTORY.

  • If it cannot find enough available disk space to reach the number of AREAS that you specified in the command, the system might try performing a special form of the SQUASH <family name> process and then try to find more space.

Using EXPAND SYSTEMDIRECTORY is much less disruptive than SQUASH SYSTEMDIRECTORY and NEW SYSTEMDIRECTORY because it does not need to block all access to the SYSTEMDIRECTORY while it is running. Using the EXPAND SYSTEMDIRECTORY command consumes very little processor or I/O time except in cases where it runs out of available disk space. In such cases, it attempts to move files to make space available.