xfs
[Top] [All Lists]

Re: xfs_shrinkfs ?

To: Steve Lord <lord@xxxxxxx>
Subject: Re: xfs_shrinkfs ?
From: Derek Glidden <dglidden@xxxxxxxxxxxxxxx>
Date: Fri, 02 Feb 2001 13:39:15 -0500
Cc: linux-xfs@xxxxxxxxxxx
References: <200102020300.f1230E903798@xxxxxxxxxxxxxxxxxxxx>
Sender: owner-linux-xfs@xxxxxxxxxxx
Steve Lord wrote:
> 
> Martin already answered this, there is unfortunately no such beast. Growing
> the filesystem is easy, you just tag some space on the end and fix up some
> counters, oh and because we do it live it is safe against crashes since we
> journal it.

That makes sense.  I kinda figured the filesystem structure would allow
for something like that, but I hadn't thought about journaling the
action as well.
 
> Shrinking is much harder, you almost certainly want the same journaling
> protection, which means you need to do more than just migrate structures
> around the disk, you need to cope with new ongoing activity. OK, you could
> do the offline version with less work, but you need to find all the inodes,
> directory blocks, data blocks, etc within the allocation groups to be
> removed (we would have to do whole allocation groups I think). Doing this
> would require a complete scan of all inodes in the filesystem to find
> the ones affected. The allocator would need modification to be able to
> prevent new allocations into these areas. Then it is just a matter of
> moving all the files and directories one by one, the files part is easy,
> the directories would be harder, but not impossible. It would not be
> possible to keep inode numbers constant - since these encode a disk
> location.
> 
> Probably about 3 months work for an expert - any volunteers?

Good lord...  I think the amount of extra work it would require to
create such a beast would way way way outweigh the amount of extra work
involved in "backup, shrink volume, recreate filesystem, restore" that
the very, very few people who would want such a thing would have to go
through due to it not existing.

Unless there's some huge unvoiced contingent of people who really want
it, I'd personally rather any experts who thought about putting time
into such a utility would work on the XFS core instead.

Now I'm kind of embarrassed I brought it up...  :)

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
With Microsoft products, failure is not           Derek Glidden
an option - it's a standard component.      http://3dlinux.org/
Choose your life.  Choose your            http://www.tbcpc.org/
future.  Choose Linux.              http://www.illusionary.com/

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