> First off, many kudos to the SGI folks et al for the amazing work at
> getting XFS ported and running so quickly and well on Linux! Thanks!
> Now the question: I've got a big XFS LVM volume on my file server and
> I'm just curious if there is a utility that can shrink an XFS
> filesystem, if I decide for whatever reason to shrink the LVM volume the
> filesystem happens to be on. I'm busy backing up the partition right
> now to test this directly, but it'd be nice to hear for certain.
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
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
Probably about 3 months work for an expert - any volunteers?