[clue] Extending files with fallocate.
David L. Anselmi
anselmi at anselmi.us
Thu Aug 20 11:39:02 MDT 2015
So the way to make big files quickly is like this:
fallocate -l 2G foo
(Makes a 2GB file called foo. Allocates the data blocks but does not write to them. Requires a
file system like ext4.)
If you're then putting data into foo and run out of space (say that foo is loop mounted and contains
a partition table and file systems of its own) you can extend it like this:
fallocate -l 4G foo
That will not touch any of the existing data. (That isn't documented well that I could find so I'm
letting you know.) (It's probably a good idea that foo isn't open when you extend it.)
Dave
More information about the clue
mailing list