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 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? 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 Can anyone help to understand if am I right by following these step? Une messagerie gratuite, garantie à vie et des services en plus, ça vous tente ? Je crée ma boîte mail www.laposte.net _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
Does anybody read me?> Message du 31/01/13 18:40 > De : "Stéphane GAUDICHE" > A : xen-users@lists.xen.org > Copie à : > Objet : [Xen-users] Xen LVM reducing HVM MS Windows guest disk > > 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 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? 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 Can anyone help to understand if am I right by following these step? Une messagerie gratuite, garantie à vie et des services en plus, ça vous tente ? Je crée ma boîte mail www.laposte.net _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
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 onlyWhy 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 100GWhy 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@lists.xen.org http://lists.xen.org/xen-users
> Message du 05/02/13 13:47 > De : "Ian Campbell" > A : "Stéphane GAUDICHE" > Copie à : "xen-users@lists.xen.org" > Objet : 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?Just to be large! ;) in case of...> > > 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."the first 50GB" is a good news "you should be able to safely reduce" doesn''t sound very good for me.> 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.That''s why I make it larger than less.> 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.Quite evidente for me, non-sense if not.> > 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?Just to be large! ;) in case of...> > > 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. > >I think it''s a part of my problem Linux people don''t deal with Windows trouble, no mix happen cause it is no such transparent in W case. :( -- Stéphane Une messagerie gratuite, garantie à vie et des services en plus, ça vous tente ? Je crée ma boîte mail www.laposte.net _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users