Storage glossary · JSON corpus · llms.txt · hesela.com

sparse-file · shipping

Sparse file

A file with unallocated ranges that read as zeros, allowing its logical size to exceed its allocated storage.

On Linux, seeking past EOF alone does not extend a file; writing there leaves a zero-reading gap. SEEK_DATA and SEEK_HOLE are not exact physical allocation maps because filesystems may conservatively report every offset as data. Linux st_blocks counts 512-byte units; st_blksize is a preferred I/O size, not that count's unit.

Relations

related
file-storage, hole-punching, file-preallocation, thin-provisioning, file-extent, unwritten-extent

Advantages

Limitations

Citations

  1. Linux man-pages: lseek(2), holes and SEEK_DATA/SEEK_HOLE (accessed 2026-10-12)
  2. Linux man-pages: inode(7), file size and allocated blocks (accessed 2026-10-12)
  3. LVM2: lvmthin(7), physical allocation, discards and pool exhaustion (accessed 2026-10-12)
  4. Sparse files, preallocation and thin-pool capacity (accessed 2026-10-13)

JSON: /data/terms/sparse-file.json