How to generate a large file allocating space

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I want to generate or extend a large file in an ext4 filesystem allocating
space (i.e. not creating a sparse file) but not actually writing any data.
I realise that this will result in the file containing the contents of
whatever was there on the disk before, which is a possible security problem
in some circumstances, but it isn't a problem here.

Ideally what I'd like is a "make unsparse" bit of code. I'm happy for this
to use the libraries, and work on an unmounted fs (indeed that is probably
better).

Supplementary question: can I assume that if a non-sparse file is on disk
and never opened, and never unlinked, then the sectors used to to store
that file's data will never change irrespective of other operations on the
ext4 filesystem? IE nothing is shuffling where ext4 files are stored.

--
Alex Bligh

_______________________________________________
Ext3-users mailing list
Ext3-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/ext3-users


[Index of Archives]         [Linux RAID]     [Kernel Development]     [Red Hat Install]     [Video 4 Linux]     [Postgresql]     [Fedora]     [Gimp]     [Yosemite News]

  Powered by Linux