> 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... :)
No question should be embarrassing. This is one of those features which you
really have to design in from day one. As you point out, it is now one of
those things where the cost of implementing it probably outweighs the
amount of gain to the people who might use it.
Now that ext2 to xfs converter though ..... ;-)