xfs
[Top] [All Lists]

Re: defrag xfs

To: Stewart Smith <stewart@xxxxxxxxxxxxxxxx>
Subject: Re: defrag xfs
From: Sonny Rao <sonny@xxxxxxxxxxx>
Date: Fri, 21 Jan 2005 00:48:30 -0500
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <1106286413.8580.66.camel@kennedy>
References: <F62740B0EFCFC74AA6DCF52CD746242D010337FA@iu-mssg-mbx05.exchange.iu.edu> <41F07494.1060501@xfs.org> <20050121043237.GA28699@kevlar.burdell.org> <1106286413.8580.66.camel@kennedy>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
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


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