Re: LVM

[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..

/Peter

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

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux