On Fri, Jan 21, 2005 at 04:46:52PM +1100, Stewart Smith wrote:
> On Thu, 2005-01-20 at 23:32 -0500, Sonny Rao wrote:
> > Does this mean that it is possible to write a utility to shrink XFS
> > volumes?
>
> Yes - it's possible. Just nobody has done it yet. The guys with more XFS
> knowledge than me could provide more pointers. But as I understand it,
> you basically want to do the following:
>
> disable allocation in the last ag
> find all inodes that have space allocated in that ag (requires looking
> at all inodes)
> 'defrag' them (i.e. into all but last ag)
> check that the last ag really has no used blocks
> change the size of the last ag on disk (or remove it)
> re-enable allocating into the last ag
>
>
> so it's as "simple" as that :)
Interesting, since xfs_fsr already works online, I assume the only
remaining kernel function requirement is to allow locking off
allocation to a particular AG while the extents and metadata are moved
off? Then I assume there's some bookkeeping to get rid of refs to
that AG, which I guess might be fairly difficult ?
Sonny
|