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

Re: [Xen-users] Xen LVM reducing HVM MS Windows guest disk



On Thu, 2013-01-31 at 17:36 +0000, StÃphane GAUDICHE wrote:
> Hello list,
> 
> I run xen 4.0 on a debian squeeze host with local lvm2 storage
> I've got HVM VMs (Microsoft Windows) with 2 drives (c: [OS] & D:
> [Data]), file system: NTFS
> I want to reduce the size of the D: drive of my HVMs.
> 
> By reading several articles and howtos across web,
> 1- I backup datas first outside the XenHost
> 2- then from MSWindows guest-OS, I managed to live-reduce the
> partition's size on the D: drive (from 150G to 50G) with the embedded
> tool "diskpart": "shrink" operator, it worked just fine.
> 3- I power off the HVM.
> Now, from xen point of view, i got a Logical Volume called
> data_HVM_microsoft.img of (steal) 150G.
> 4- I was expecting to do an "lvreduce" to reduce the logical volume
> (the box) to 100G only

Why 100GB if you are reducing to 50GB?

> but what happen to the filesystem (contenant in the box),which is seen
> as a D: drive from the HVM with a small 50G NTFS partition from now)
> Do I care about it?

If you have reduced the filesystem within the guest to 50GB then only
the first 50GB of the device will be used, so you should be able to
safely reduce the LV. You'd want to be damned sure that you had indeed
reduced the filesystem to 50GB and not e.g. 50.1GB though, or else you
will end up truncating it.

Note that resizing the filesystem in the guest will have no impact on
the size of the underlying virtual device, nor will it affect the size
of the LVM volume backing the device. I'm not sure if you were expecting
that it would.

> I note that the logical volume were seen as Block-device from xen host
> file-system (not sure, but i guess it quite nomal due to LVM).
> then
> 5-check lv
> 6-power on HVM
> 7-extend D: drive to 100G

Why reduce to 50GB and then increase to 100GB?

> Can anyone help to understand if am I right by following these step?

Well, they sound OK to me from a Xen POV. I'm not so familiar with the
Windows side of things.

Perhaps you can experiment by taking an LVM snapshot of the device,
which would avoid the risk of trashing the device until you know what
the right procedure is.

Ian.


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users

 


Rackspace

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