[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

On Sunday 18 March 2012 19.40.21 Ray Van Dolson wrote:
> On Sun, Mar 18, 2012 at 08:04:14PM +0100, Markus Falb wrote:
> > What filesystem? Assuming ext3, this cannot shrunk without unmounting.
> > I believe the following *should* work for ext3
> > 
> > $ umount /home
> > $ e2fsck -f /dev/vg_web/lv_home
> > $ resize2fs /dev/vg_web/lv_home 150g
> > $ lvresize -L 150g /dev/vg_web/lv_home
> > $ mount /home
> > 
> > I am not sure how safe it is. Take care!
> I was under the impression that you needed to unmount the file system
> to shrink it with resize2fs (you can grow it online however).

Which I guess is why Markus wrote "umount /home" above...

I'd like to add that it's probably good paranoia not to size the lv down too 
tightly (should it happen to become smaller than the fs then ooops). That is, 
I'd size the lv down to a comfortable margin above the fs size (and then size 
the fs up to the device size).

I can also add that I've successfully managed to shrink ext3 before but a 
verified backup is probably good advice..


Attachment: signature.asc
Description: This is a digitally signed message part.

CentOS mailing list

[CentOS]     [CentOS Announce]     [CentOS Docs]     [CentOS Virtualization]     [Linux Media]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Xfree86]     [Linux USB]     [Project Hail Cloud Computing]

Powered by Linux Add to Google