Tech Support > Operating Systems > Linux / Variants > sparse files
sparse files
Posted by enjoylife_95135 on February 17th, 2004


Thanks to all for responding to my thread:

http://www.foorum.com/news/redirect/... .misc&level=3

I googled, and the documentation on sparse files is...sparse (sorry

Anyway, I created some large files and then made them sparse, but I
noticed that the algorithm for the disk blocks consumed by the sparse
file is FS dependent. So..a 40M sparse file on one FS took up 2 512K
blocks, on another, it took up 8 512K blocks.

Is this expected behaviour, or am I doing something strange?

Thanks!
Enjoying life in 95135

Posted by Pascal Bourguignon on February 17th, 2004


enjoylife_95135@hotmail.com (enjoylife_95135) writes:


Indeed, it may depend on the allocation block of each file system. If
you create two files on two different file system and in each write
only one byte at offset 1GB, you may have allocated 4 KB on one file
system and 16 KB on the other. In addition, the indirect pointer
blocks allocated to referer your data block may also have different
size on different file systems.

You should not be concerned with this. Just keep writting and reading
bytes and be happy!

--
__Pascal_Bourguignon__ http://www.informatimago.com/
There is no worse tyranny than to force a man to pay for what he doesn't
want merely because you think it would be good for him.--Robert Heinlein
http://www.theadvocates.org/


Similar Posts