or
xfs Users, Take Care!
Recently, we had a customer ask: Why do many files holding my
data take up vastly more space than their size is? That question
may sound weird to you, but it is for real, and the customer's
observation was correct. For a start, let's make sure we are
using the same terms.
- The size of a file is the number of bytes it will deliver if
it is read sequentially from start to end.
- The space it takes up is the sum of all disk pages which are
used to hold the file's data, or to locate those data pages
("indirect" blocks in Unix/Linux terminology).
Every Unix/Linux admin knows (or at least should know) that a
file may take up less disk space than its size is. This happens
when not all bytes of the file were really written, but the write
pointer was advanced via "seek()", leaving a gap. Disk pages
which are completely contained in such a gap will not be written,
and …
[Read more]