[PVE-User] Shrink qemu raw image...
Gilberto Nunes
gilberto.nunes32 at gmail.com
Mon Jun 22 15:18:55 CEST 2015
>> What about:
>>
>> vgs
>> sfdisk -l <your disk path>
This result in a empty partition table...
It sounds like I lost all partitions inside the guest
2015-06-22 10:14 GMT-03:00 Eneko Lacunza <elacunza at binovo.es>:
>
> What about:
>
> vgs
> sfdisk -l <your disk path>
>
> El 22/06/15 a las 15:05, Gilberto Nunes escribió:
>
> Ok guys...
>
> All those steps I already perform...
> I can shrink fs+partition+lvm inside the guest... Everything is ok!
> But, when I perform this:
>
> qemu-img resize vm.raw -3100G
>
> the guest crash!
>
> The raw image, on Proxmox fs has 3,9 TB...
> Inside the guest, I have this:
>
> df -h
> Filesystem Size Used Avail Use% Mounted on
> /dev/mapper/vg_bancosiscobra-lv_root
> 50G 4,7G 43G 11% /
> tmpfs 939M 0 939M 0% /dev/shm
> /dev/sda2 485M 67M 393M 15% /boot
> /dev/mapper/vg_bancosiscobra-lv_home
> 640G 540G 68G 89% /home
>
> With the qemu-img resize command showing above, I managed to shrink raw
> image to 800GB, more than sufficient to boot the machine...
> But no way! I get error inside the guest...
>
> My next shot will be this tutorial:
>
> http://dnaeon.github.io/resizing-a-kvm-disk-image-on-lvm-the-easy-way/
>
> 2015-06-22 9:57 GMT-03:00 Yannis Milios <yannis.milios at gmail.com>:
>
>> First try to shrink fs+partition+lvm inside guest vm with gparted as
>> Lindsay suggested.
>>
>> Reboot the VM to check if resize completed successfully.
>> Check actual fs+partition+lvm sizes inside VM and verify their total size.
>>
>> Shutdown VM and try to resize raw disk so that the total size is bigger
>> at least some MB than the actual size.
>>
>> For example if actual size is 1Tb resize it to 1.2-1.3 Tb just to be safe.
>>
>> Try booting the VM again.
>> On 22 Jun 2015 13:37, "Gilberto Nunes" <gilberto.nunes32 at gmail.com>
>> wrote:
>>
>>> So, inside the VM I managed to reduce the LVM and the Filesystem...
>>> But, when I try to use qemu-img resize, perhaps I mistake something,
>>> because the crash down in kernel panic, 'cause not found and partitions,
>>> even the LVM!
>>>
>>> Are you sure that gparted live iso is safe???
>>>
>>> Thanks
>>>
>>> 2015-06-22 9:25 GMT-03:00 Lindsay Mathieson <lindsay.mathieson at gmail.com
>>> >:
>>>
>>>> Use the GPartEd Live ISO (http://gparted.org/download.php) to resize
>>>> the LVM *and* the partiton, then qemu-img to shrink it.
>>>>
>>>>
>>>>
>>>> On 22 June 2015 at 21:50, Gilberto Nunes <gilberto.nunes32 at gmail.com>
>>>> wrote:
>>>>
>>>>> Hi guys
>>>>>
>>>>> I was able to reduce LVM and root/home partition inside a certain VM,
>>>>> runnning on Proxmox.
>>>>> The VM has raw image.
>>>>> This image was 4 TB of size..
>>>>> But, when I try using command:
>>>>>
>>>>> qemu-img resize vm.raw -XXXXG
>>>>>
>>>>> The VM get crash! No partition remain....
>>>>>
>>>>> So I thought use virt-resize to make this operation....
>>>>> I can use perhaps, other host, with virt-manager and other virt tools
>>>>> installed, shrink the raw image with virt-resize and get use the resulting
>>>>> image to new VM on Proxmox...
>>>>>
>>>>> Or, maybe you guys, has another solution...??
>>>>>
>>>>> Thanks
>>>>>
>>>>> --
>>>>>
>>>>> Gilberto Ferreira
>>>>> +55 (47) 9676-7530 <%2B55%20%2847%29%209676-7530>
>>>>> Skype: gilberto.nunes36
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> pve-user mailing list
>>>>> pve-user at pve.proxmox.com
>>>>> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Lindsay
>>>>
>>>> _______________________________________________
>>>> pve-user mailing list
>>>> pve-user at pve.proxmox.com
>>>> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user
>>>>
>>>>
>>>
>>>
>>> --
>>>
>>> Gilberto Ferreira
>>> +55 (47) 9676-7530 <%2B55%20%2847%29%209676-7530>
>>> Skype: gilberto.nunes36
>>>
>>>
>>> _______________________________________________
>>> pve-user mailing list
>>> pve-user at pve.proxmox.com
>>> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user
>>>
>>>
>
>
> --
>
> Gilberto Ferreira
> +55 (47) 9676-7530
> Skype: gilberto.nunes36
>
>
>
> _______________________________________________
> pve-user mailing listpve-user at pve.proxmox.comhttp://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user
>
>
>
> --
> Zuzendari Teknikoa / Director Técnico
> Binovo IT Human Project, S.L.
> Telf. 943575997
> 943493611
> Astigarraga bidea 2, planta 6 dcha., ofi. 3-2; 20180 Oiartzun (Gipuzkoa)www.binovo.es
>
>
> _______________________________________________
> pve-user mailing list
> pve-user at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user
>
>
--
Gilberto Ferreira
+55 (47) 9676-7530
Skype: gilberto.nunes36
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.proxmox.com/pipermail/pve-user/attachments/20150622/597324b5/attachment.htm>
More information about the pve-user
mailing list