[CentOS] Freeing pv space for snapshots

Fri Jan 5 04:11:44 UTC 2007
Aleksandar Milivojevic <alex at 8-P.ca>

Robert Becker Cope wrote:
> "Paul" <unix at bikesn4x4s.com> wrote:
> 
>> Thanks, and where can I find a version of ext2resize that will work
> 
> You want "resize2fs". Note that I've never used it to shrink a filesystem,
> myself, only to grow one.

I've used it, and it works correctly (and it is available in CentOS
4.4).  It shrinks file system as it should.  The only things Paul should
be careful is to first shrink file system, than logical volume and to
correctly calculate file system size and by how many extents he can
shrink logical volume.  If he shrinks logical volume too much, he might
end up loosing data.  Running fsck in non-destructive mode (fsck -N)
and/or attempting to mount file system read-only after he shrinks
logical volume might be a good idea to test all is OK.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 251 bytes
Desc: OpenPGP digital signature
URL: <http://lists.centos.org/pipermail/centos/attachments/20070104/153796dd/attachment-0005.sig>