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



On Mar 5, 11:41 am, Dan Espen <dan...@xxxxxxxxxxxxxxxxxxxxxxxxx>
wrote:
"Andre Abrantes" <andreabran...@xxxxxxxxx> writes:
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'm testing the quota command for files, but its not works very
well in redhat7.2 for example.
Exists a command to reserve a space for a file in ext2 or ext3
filesystens?

I don't think there is any utility to reserve space.

Writing your own should be simple enough.
All you need is the current output of df plus the
sum of whats currently reserved.

You should probaby use a database to store the reserved space
numbers to allow locking during updates and associate the
space with a PID so that each update can check if the PID(s)
with the reserve is still active.

Ok, but now I will explain with another sample, I have a program which
generates every day approx. 100 Gbyte of data
stored in 20 directories. I want to write this data automatically
(parallel, through a
backup script) to a backup disc which I replace when it is full.
The problem is that the individual backup processes do not know about
each other.
The backup programs check in the beginning if there is enough disc
space and start
writing to the disc. After some time the discs gets full with many
incomplete
directories.
How can I avoid this? Is there a way of allocating disc space in the
beginning (before startign the backup)
and then writing to this allocated disc space?

Thanks again for all.
André

.



Relevant Pages

  • Re: Reserving space in ext2 or ext3 for a big file.
    ... I don't think there is any utility to reserve space. ... Writing your own should be simple enough. ... backup script) to a backup disc which I replace when it is full. ... The backup programs check in the beginning if there is enough disc ...
    (comp.os.linux.misc)
  • Re: DEAD MAXTOR! HELP!
    ... only one copy of the data, and thus no backup. ... And if you plan to destroy one copy, ... of work because his hard disk crashed. ... "reserve space" at all. ...
    (comp.sys.ibm.pc.hardware.storage)
  • Backup Wizard Error
    ... While trying to configure the backup in Server Management, ... I do not have the option to choose to reserve space for deleted items and to ...
    (microsoft.public.windows.server.sbs)
  • SBS2003 Backup Wizard Problem
    ... While trying to configure the backup in Server Management, ... I do not have the option to choose to reserve space for deleted items and to ...
    (microsoft.public.windows.server.sbs)