[CentOS] Re: Freeing pv space for snapshots

Fri Jan 5 16:51:31 UTC 2007
Scott Silva <ssilva at sgvwater.com>

Paul spake the following on 1/5/2007 4:50 AM:
> On Fri, January 5, 2007 7:26 am, Paul wrote:
>> On Thu, January 4, 2007 11:11 pm, Aleksandar Milivojevic wrote:
>>> 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.
>> Thanks all.  And can I use it when the system is online?  I would think
>> that would be the only way I could do it, cause I can't get to the ext3 fs
>> of the LV unless its online.
> 
> OK, guess I answered my own questions:
> 
> # resize2fs -p /dev/VolGroup00/LogVol00 30G
> resize2fs 1.35 (28-Feb-2004)
> /dev/VolGroup00/LogVol00 is mounted; can't resize a mounted filesystem!
> 
> But how do I mount it when booted up on CD when it's burried somewhere in
> the LVM on hda2?
How about the CentOS live CD?



-- 

MailScanner is like deodorant...
You hope everybody uses it, and
you notice quickly if they don't!!!!