Re: Reserving space in ext2 or ext3 for a big file.



Andre Abrantes wrote:
Hi all.
I have the follow problem, my software need make a file with 4GB
and I need reserve space before the file generation finishs.

I do not know why you would need to do that, but here are two possibilities
for doing it.

1.) Create a partition a little bit larger than you need, and create your
file in there as needed. Do not create any other files in that partition. A
nice side-effect is that the file you create will be pretty much contiguous.

2.) use DD to copy /dev/zero to a file named as you need. Set the block size
and block count to get the number of bytes you need.

I'm testing the quota command for files, but its not works very
well in redhat7.2 for example.

I never used Red Hat Linux 7.2, but I ran RHL 7.3 for several years and
quotas worked just fine, except in the /tmp directory. Trouble there was
that the quota files got deleted on reboot, and perhaps when cron ran tmpwatch.

Exists a command to reserve a space for a file in ext2 or ext3
filesystens?

Not specifically, because, as I said before, there should be no reason to do it.

Thanks for all in advance...

André Abrantes
skype:andre.abrantes
email: andreabrantes@xxxxxxxxx



--
.~. Jean-David Beyer Registered Linux User 85642.
/V\ PGP-Key: 9A2FC99A Registered Machine 241939.
/( )\ Shrewsbury, New Jersey http://counter.li.org
^^-^^ 09:15:01 up 14 days, 21:39, 3 users, load average: 4.18, 4.11, 4.15
.



Relevant Pages