Shrink an online and mounted filesystem

Latest response

Hi folks,

 

We are currently using Veritas Storage Foundation for our Oracle database servers (storage is currently on EMC SAN).  One of the features that we love is the ability to shrink a filesystem while it is online and mounted, rather than having to unmount it.  This allows us to effectively manage disk space, because people often ask for a ton of disk space and end up using very little.

 

Veritas software is very expensive and we would love to use EXT4 or another free or cheaper filesystem, but we would not want to give up the online shrink ability.  Obviously EXT3 and EXT4 have allowed for expanding an online mounted filesystem for a long time now - can you please allow shrinking too?

 

Thanks,

Kevin

Responses

I agree this would be nice to have. In AIX we have a chfs command

chfs -a size=(+ -) ###  /fielsystem in M,G or K etc.

In RHEL you have to allocate the space manually to the logical volume then do a resize2fs command. With the chfs command as long as the space is there on the vg you can just increase the fs with one command.

 

No need to take the fs onffline to shrink or increase it.

Just FYI, BTRFS (still in development/experimental phase) can do online shrinks.

 

A word of warning on ext* offline shrinks; doing this repeatedly can lead to fairly suboptimal data/metadata layout as the data gets shuffled around.

 

Thinly-provisioned storage may also be a solution.

 

There's no plan upstream right now for online shrink in ext4, but the request does come up occasionally, so it's something I think we'll keep an eye on.