Sparse Files > 800 MB are being created erroneously in HP UX
Posted in 1995
Topics: Platform-Specific Issues
Occasionally, the *.idx part of a C-ISAM fileset is being modified such that the OS sees the file as being in excess of 800MB in size. In fact the file is sparse and does not occupy anywhere near that size. However, when using cpio, the archiver runs for a long period of time and the target backup medium can appear as too small. Apparently to apply locking, the C-ISAM function assigns locks to regions outside the real size of a file. The base for these offsets is 0x30000000 plus the record number (of the record to be locked). This base value equates to approx. 800MB I have carried out some tests on HPUX and find that a 'sparse' file is only actually created if the offset (larger than the file size) has been written to. Merely seeking to an offset larger than the file does not change the apparent size of the file. I can't see why the Informix C_ISAM code would NEED to write to this position anyway. If these phantom offsets ARE being written to, is it possible that due to some unexpected error in another system call, the file does not get truncated back to its proper size? I'm thinking here particularly about system calls that are interrupted du to receipt of a signal. The problem cannot be replicated at will, but has occured on 3 different sites all running the specified HP-UX and C-ISAM combination. Has anyone else come across this problem and did you find a fix ? Is it unique to HP-UX as we suspect as we are unable to find any other version of UNIX with this problem.