The term “hiperfile”, as used below, indicates a file residing on a PFA pubset and possessing the valid performance attribute HIGH or VERY-HIGH, or a file residing on a PFA pubset that possesses the cache attribute CACHED-FILES=*ALL.
When a hiperfile is closed (CLOSE processing), all of the file blocks written by the application which have not yet been saved on the appropriate disks of the pubset by the cache handler or a cache controller are written explicitly to disk.
If an error occurs during this save operation because a disk device being addressed is defective, CLOSE processing returns the following error code:
|
|
However, the data is still readable, the cache is not cleared, and the data still in the cache can be transferred to the disk without outside intervention once the disk has been repaired. The file can normally be opened again and processed even though data in the cache could not be written back to the disk. Such files can be displayed with the command: SHOW-FILE-ATTRIBUTES ...,STATUS=*PAR(CACHE-NOT-SAVED=*YES).
The operating system flags a file which does not have a consistent image on disk due to the fact that a cache is being used as a “file with data in the cache”. These files (hiperfiles) can be displayed with the following command:
SHOW-FILE-ATTRIBUTES ..., STATUS=*PAR(CACHED=*YES)
This list includes files that are currently being cached (including those with read-only cache) and which are currently open.
The user can exploit the fact that blocks which could not be written to disk successfully can still be read in cache in the following ways:
A file can be reopened at any time. A file can be “rescued” by writing it to a different volume with the COPY-FILE command. In order to do this, a destination file must be created with an explicit CREATE-FILE command before the COPY-FILE command is executed.
A DELETE-FILE command can be used to logically delete such a file. This invalidates any data belonging to the file which is still located in the cache.
If, even after servicing by a service technician, it is not possible to save the data remaining in the cache to disk, the cache can be destroyed without saving the data by means of the FORCE-DESTROY-CACHE command.
The hiperfiles of the pubset which have been flagged as being a “file with data in the cache” are marked in the catalog during the next IMPORT-PUBSET in such a way that they can no longer be opened (owing to possible data inconsistency). A prerequisite for this is, however, that the file has been assigned the performance attribute DISK-WRITE=*IMMEDIATE. The user can list the set of hiperfiles which can no longer be opened due to possible data inconsistency with the following command:
SHOW-FILE-ATTRIBUTES STATUS=*PAR(OPEN-ALLOWED=*NO)
These files should be deleted. A REPAIR-DISK-FILES command (only possible with the TSOS privilege) resets the OPEN-ALLOWED=NO attribute and it is again possible to open the file, but it is impossible to obtain information about data consistency. If a disk defect cannot be eliminated, the entire pubset may have to be reinitialized.