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

Re: [Xen-users] what's correct way of shrinking LVM based domU?



Rudi Ahlers wrote:
Hi all

I want to shrink one of my LVM based domU's, but don't quite know how to do it.

I have searched the Wiki & HOWTO's, and they all show you how expand / enlarge a LVM based domU, but not shrinking it.

It's the opposite, literally, of growing.
So, I stopped (destroyed) the domU, and then resized it as follows: lvresize /dev/data/cpanel1 -L10GB (It was 100GB), but when I a started it up again, I got some errors about the the disk being corrupt, and then a kernel panic.

Looks like you missed out a vital step: you shrunk the logical volume without first shrinking the file system within it. Note that while you can often grow a file system while it is on-line you almost always need the file system off-line in order to shrink it.

In this case, you need to shrink the file system, logical volume (if any), physical volume (if any) and partition in the guest OS _before_ you shrink the logical volume that contains them all in dom0. Of course, you can do all this from dom0 because the file system(s) contain in the logical volume are all off-line.

jch

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.