[Top] [All Lists]

Re: defrag xfs

To: Sonny Rao <sonny@xxxxxxxxxxx>
Subject: Re: defrag xfs
From: Stewart Smith <stewart@xxxxxxxxxxxxxxxx>
Date: Fri, 21 Jan 2005 16:46:52 +1100
Cc: Steve Lord <lord@xxxxxxx>, linux-xfs@xxxxxxxxxxx
In-reply-to: <20050121043237.GA28699@xxxxxxxxxxxxxxxxxx>
References: <F62740B0EFCFC74AA6DCF52CD746242D010337FA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <41F07494.1060501@xxxxxxx> <20050121043237.GA28699@xxxxxxxxxxxxxxxxxx>
Sender: linux-xfs-bounce@xxxxxxxxxxx
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 :)

Stewart Smith (stewart@xxxxxxxxxxxxxxxx)

Attachment: signature.asc
Description: This is a digitally signed message part

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