Re: XFS shrink (step 0)

Ruben Porras
2007-06-28T10:38:58Z

David Chinner wrote:
> No, there isn't anything currently in existence to do this.
>
> It's not difficult, though. What you need to do is count the number of
> used blocks in the AGs that will be truncated off, and check whether
> there is enough free space in the remaining AGs to hold all the
> blocks that we are going to move.
>
> I think this could be done we a single loop across the perag
> array or with a simple xfs_db wrapper and some shell/awk/perl
> magic.
>
Do you mind that is it ok to depend on shell/awk/perl? I'll do it in C
looping through the perag array.

--
Rubén Porras
LinWorks GmbH