The concept of growing archives found its inception from the fact that mounting large quantities of image files with CarvFS at the same time, especially when using the ewf module, resulted in large memory consumption on the system. As a result the idea arose that a copy of the EWF file could be appended (sparsely) to the source file of an already mounted raw image. Currently CarvFS when used with the 'raw' module on a single file, will support the growing of an archive in the following way:
- Make sure the archive file is mounted in CarvFS.
- Request a lock on the file.
- Add a large sparse section to the archive file of the size of the new block of image data minus one block.
- Add a single block of all zero to the end of the archive file.
- Release the lock on the file.
- Copy the non zero blocks into the previously sparse section of the archive.
- Do a stat on the CarvFS.crv file under the CarvFS mountpoint that maps to the archive file.
The above functionality can be found in libcarvpathrepository. This library still needs to be migrated to the CMake build system and currently is not yet available other than on explicit request.