From: Avi Kivity <avi@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Lukas Laukamp <lukas@laukamp.me>, kvm@vger.kernel.org
Subject: Re: [User Question] How to create a backup of an LVM based maschine without wasting space
Date: Thu, 18 Oct 2012 14:57:41 +0200 [thread overview]
Message-ID: <507FFCC5.5050508@redhat.com> (raw)
In-Reply-To: <CAJSP0QVO2TxNxf4JQZ70sSMyLvchQL+h6AKBDoZRr1a-OxkcRg@mail.gmail.com>
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
prev parent reply other threads:[~2012-10-18 12:57 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-12 6:52 [User Question] How to create a backup of an LVM based maschine without wasting space Lukas Laukamp
2012-10-12 8:42 ` Stefan Hajnoczi
[not found] ` <5077DB9F.6050809@laukamp.me>
2012-10-12 9:17 ` Lukas Laukamp
2012-10-12 10:11 ` Stefan Hajnoczi
2012-10-12 10:16 ` Lukas Laukamp
2012-10-12 10:47 ` Stefan Hajnoczi
2012-10-12 10:50 ` Lukas Laukamp
2012-10-12 11:36 ` Stefan Hajnoczi
2012-10-12 11:51 ` Lukas Laukamp
2012-10-12 12:59 ` Stefan Hajnoczi
2012-10-12 13:02 ` Lukas Laukamp
2012-10-12 14:25 ` Stefan Hajnoczi
2012-10-12 14:36 ` Javier Guerra Giraldez
2012-10-12 15:51 ` Lukas Laukamp
2012-10-12 19:18 ` Stefan Hajnoczi
2012-10-12 18:14 ` Lukas Laukamp
2012-10-12 19:13 ` Stefan Hajnoczi
2012-10-12 19:26 ` Lukas Laukamp
2012-10-12 20:43 ` Stefan Hajnoczi
2012-10-12 20:56 ` Lukas Laukamp
2012-10-12 21:53 ` Javier Guerra Giraldez
2012-10-13 10:28 ` Lukas Laukamp
2012-10-13 22:25 ` Lukas Laukamp
2012-10-15 3:06 ` Javier Guerra Giraldez
2012-10-15 6:17 ` Lukas Laukamp
2012-10-18 12:57 ` Avi Kivity [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=507FFCC5.5050508@redhat.com \
--to=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=lukas@laukamp.me \
--cc=stefanha@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.