[mod.computers.vax] Invalid directory files / SWAPFILE problem

JCV@CERNVM.BITNET.UUCP (12/08/86)

Date: 6 December 1986, 16:30:29 GVA
From: Jan C. Vorbrueggen        +49 228 73 2996      JCV      at CERNVM
To:   INFO-VAX at SRI-KL.ARPA
Subject: Re: Invalid directory files / SWAPFILE problem

First, how to get rid of an invalid directory file:
The trick is to do a SET FILE/NODIRECTORY <filename>. This will clear the
bit in the file header marking it as a directory file. Now, delete it and
do an ANALYZE/DISK/REPAIR on the volume the file was on. The files which
were in that directory will be reported lost and are entered into the
[SYSLOST] directory by VERIFY.

Second, about swapfiles:
The following applies to the following files:
 -  the primary pagefile
 -  the primary swapfile (if it exists)
 -  the dump file (if it exists)

These files are opened during boot in a special way (before the XQP,
which does all file handling, is loaded). Because the file system (i.e.,
XQP) does not know of these files, it won't stop you from deleting them.
Once you have done that, the space they occupied on the disk is released
and will be used later on (depending on the activity on that volume).
However, the paging/swapping logic of VMS will still use these files
and will overwrite anything that was in a user file occupying the same
disk blocks when it actually does a page or swap I/O. This of course
depends very much on load on the system, etc.

You usually get away with deleting such a file because most systems
don't use their system disk for user data, or such a job is done during
a development period when there are no other users on the system (and
a reboot will follow soon).

The correct way to do away with such a file is:
 -  If you want to modify its size (shrink it, extension in place is
    allowed, although the new space is only available on reboot), create
    a new version of the desired size and reboot, then delete the old
    version. If you don't have enough space, create a minimum size file
    (VMS will boot with around 4600 blocks of page and 1000 blocks of
    swap file with STARTUP_P1="MIN") and then make the desired changes.
 -  If you want to get rid of it (most often the dump file), rename the
    file (e.g., to SYSDUMP.OLD) and reboot. Now you can safely delete it.

The above is not true for any secondary page/swap files, because they are
opened as any other file and thus cannot be deleted while open. Again, if
you want an installed page/swapfile not to be used at the next boot
(because, e.g., it is installed in SYSTARTUP via an F$SEARCH), either
rename it or delete after a minimum boot, which won't install it in the
first place.