Re: [User Question] How to create a backup of an LVM based maschine without wasting space

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

 



On 10/12/2012 10:43 PM, Stefan Hajnoczi wrote:
>>
>> the VM is called mailer and I used this command: qemu-img convert -f raw -c
>> -O qcow2 /dev/vmdisks/mailer ./vmachines/mailer.qcow2
>>
>> Im on the /mnt dir because it's a seperate HDD with the folder vmachines.
>>
>> Thats the output of qemu-img info:
>>
>> image: ./vmachines/mailer.qcow2
>> file format: qcow2
>> virtual size: 5.0G (5368709120 bytes)
>> disk size: 4.1G
>> cluster_size: 65536
>>
>> I checked the info of the fs inside the guest. The / partition is 4,7GB big
>> and 1,2GB are used. The fs is ext3.
> 
> I wonder if you see better results without the -c option.

Since the image is on a logical volume, it may not have been cleared
prior to use by the guest; or the guest is busy enough that it has
overwritten all the blocks in the image.

You can try a manual trim by creating a large file in the guest
consisting of all zeros, then deleting it:

  dd < /dev/zero < /zeroes
  rm zeroes

Afterwards you'll get a much smaller qcow image.  Of course this
requires working within the guest, and there is the risk of disrupting
the guest by reaching the ENOSPC condition.

-- 
error compiling committee.c: too many arguments to function
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux