[CentOS] shrink LV with ext3 filesystem

Ross S. W. Walker rwalker at medallion.com
Tue Sep 4 13:31:39 UTC 2007


From: centos-bounces at centos.org 
[mailto:centos-bounces at centos.org] On Behalf Of Thomas Antony
> 
> Luciano Rocha schrieb:
> > On Tue, Sep 04, 2007 at 12:40:24PM +0200, Thomas Antony wrote:
> >>  Hi.
> >>
> >>  I want to make a snapshot from a logical volume and 
> noticed that there must 
> >>  be enough free disk space in the volume group. Actually 
> there is no   free 
> >>  disk space left.
> >>  How do i shrink online /var without losing any data or 
> restore from backup? 
> > 
> > You can't shrink ext2/ext3 filesystems online. You'll have 
> to schedule a
> > downtime.
> > 
> > Another solution is to remove and use a file for swap 
> (swapoff ... &&
> > lvremove ...), or reduce it (swapoff ... && lvreduce ... && 
> mkswap && swapon).
> 
> Hi.
> 
> Is it possible that i log into the server with ssh and umount 
> only /var 
> and then resize the logical volume?

Maybe in single user mode, but /var is needed for multi-user
mode to function.

Remember: if shrinking, shrink filesystem first then LV, if
expanding then expand the LV first then the filesystem.

-Ross

______________________________________________________________________
This e-mail, and any attachments thereto, is intended only for use by
the addressee(s) named herein and may contain legally privileged
and/or confidential information. If you are not the intended recipient
of this e-mail, you are hereby notified that any dissemination,
distribution or copying of this e-mail, and any attachments thereto,
is strictly prohibited. If you have received this e-mail in error,
please immediately notify the sender and permanently delete the
original and any copy or printout thereof.




More information about the CentOS mailing list