Clears superblock status_flags field, removes metadata cache image, prints EOA and EOF, or sets EOA of a file
h5clear [OPTIONS] file
h5clear is a command line tool that performs the following for the specified file:
Clear the status_flags field in the specified file’s superblock.
With the implementation of file locking, the library uses the status_flags field in the superblock to mark a file as in writing or SWMR writing mode when a file is opened. The library will clear this field when the file closes.
However, a situation may occur where an open file is closed without going through the normal library file closing procedure, and this field will not be cleared as a result. An example would be if an application program crashed. This situation will prevent a user from opening the file.
The tool will open the supplied HDF5 file in Read-Write (R/W) mode and clear the status_flags field in the superblock. The user can then open the file.
Remove the metadata cache image in the specified file.
The tool will open the supplied HDF5 file in Read-Write (R/W) mode, check to see if it contains a cache image, and then close it. If the file does not contain a cache image, the tool will generate a warning message to that effect.
Print the file’s EOA and EOF.
The tool will open the supplied HDF5 file in Read-only mode and print the file’s stored EOA (end-of-file address) in the superblock and the EOF (actual end-of-file). This option cannot be combined with the --status, --image and --increment options because the file is opened in Read-Write mode for these three options.
Set the specified file’s EOA.
The tool will open the supplied HDF5 file in Read-Write (R/W) mode, and set the file’s EOA to the maximum of EOA and EOF plus C. If C is not supplied, the tool will use 1M as the default increment.
This option helps to repair a crashed file where the stored EOA in the superblock is different from the actual EOF. The file’s EOA and EOF will be the same after applying this option to the file.
Options and Parameters:
Print a usage message and exit
Print version number and exit
Clear thestatus_flagsfield in the file's superblock
Remove the metadata cache image from the file
Print the file’s EOA and EOF
Set the file’s EOA to the maximum of (EOA, EOF) + C for the file
C is >= 0; C is optional and will default to 1M when not set
An error occurred
Add two options: --increment and –filesize
-m,--imageoption added to remove the metadata cache image