xfs
[Top] [All Lists]

Re: Possible to preallocate files that always begin/end on stripe unit/w

To: Green Guy <greentech3000@xxxxxxxxx>
Subject: Re: Possible to preallocate files that always begin/end on stripe unit/width?
From: Nathan Scott <nathans@xxxxxxxxxx>
Date: Sat, 4 Sep 2010 07:19:51 +1000 (EST)
Cc: xfs@xxxxxxxxxxx
In-reply-to: <AANLkTi=NhOdoX0VU7fyvYpgM+mbN8b3vC7QrkKrcnDk=@xxxxxxxxxxxxxx>
----- "Green Guy" <greentech3000@xxxxxxxxx> wrote:

> ... 
> I know that XFS metadata such as the log, AG info, etc also need to be
> accounted for, but I am not sure the best way to determine how much
> space they will take.
> 
> ...
> How can I determine the correct file size and preallocate them in a
> way where they always begin/end on stripe unit/width taking the
> filesystem overhead into account?
> Note: the log needs to stay on the same fs.
> 

There's no way to make a guaranteed aligned/sized allocation, but you
can ask for a "best effort" by using the sizing information returned
from the XFS_IOC_FSGEOMETRY syscall (via xfsctl).

cheers.

-- 
Nathan

<Prev in Thread] Current Thread [Next in Thread>