* [Qemu-devel] [Bug 1025244] Re: qcow2 image increasing disk size above the virtual limit
[not found] <20120716123031.26191.29124.malonedeb@chaenomeles.canonical.com>
@ 2012-07-17 13:41 ` Serge Hallyn
2012-12-18 10:18 ` Andy Menzel
` (11 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Serge Hallyn @ 2012-07-17 13:41 UTC (permalink / raw)
To: qemu-devel
@Todor,
Thanks, you might be right. It sounds like it's not a missing feature
but a bug. I'll re-raise the priority.
** Also affects: qemu
Importance: Undecided
Status: New
** Changed in: qemu-kvm (Ubuntu)
Importance: Low => High
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1025244
Title:
qcow2 image increasing disk size above the virtual limit
Status in QEMU:
New
Status in “qemu-kvm” package in Ubuntu:
Triaged
Bug description:
Using qemu/kvm, qcow2 images, ext4 file systems on both guest and host
Host and Guest: Ubuntu server 12.04 64bit
To create an image I did this:
qemu-img create -f qcow2 -o preallocation=metadata ubuntu-pdc-vda.img 10737418240 (not sure about the exact bytes, but around this)
ls -l ubuntu-pdc-vda.img
fallocate -l theSizeInBytesFromAbove ubuntu-pdc-vda.img
The problem is that the image is growing progressively and has
obviously no limit, although I gave it one. The root filesystem's
image is the same case:
qemu-img info ubuntu-pdc-vda.img
image: ubuntu-pdc-vda.img
file format: qcow2
virtual size: 10G (10737418240 bytes)
disk size: 14G
cluster_size: 65536
and for confirmation:
du -sh ubuntu-pdc-vda.img
15G ubuntu-pdc-vda.img
I made a test and saw that when I delete something from the guest, the real size of the image is not decreasing (I read it is normal). OK, but when I write something again, it doesn't use the freed space, but instead grows the image. So for example:
1. The initial physical size of the image is 1GB.
2. I copy 1GB of data in the guest. It's physical size becomes 2GB.
3. I delete this data (1GB). The physical size of the image remains 2GB.
4. I copy another 1GB of data to the guest.
5. The physical size of the image becomes 3GB.
6. And so on with no limit. It doesn't care if the virtual size is less.
Is this normal - the real/physical size of the image to be larger than
the virtual limit???
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1025244/+subscriptions
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Qemu-devel] [Bug 1025244] Re: qcow2 image increasing disk size above the virtual limit
[not found] <20120716123031.26191.29124.malonedeb@chaenomeles.canonical.com>
2012-07-17 13:41 ` [Qemu-devel] [Bug 1025244] Re: qcow2 image increasing disk size above the virtual limit Serge Hallyn
@ 2012-12-18 10:18 ` Andy Menzel
2013-01-02 15:50 ` Stefan Hajnoczi
2012-12-19 17:12 ` Serge Hallyn
` (10 subsequent siblings)
12 siblings, 1 reply; 17+ messages in thread
From: Andy Menzel @ 2012-12-18 10:18 UTC (permalink / raw)
To: qemu-devel
Any solution right now? I have a similar problem like Todor Andreev;
Our daily backup of some virtual machines (qcow2) looks like that:
1. shutdown the VM
2. create a snapshot via: "qemu-img snapshot -c nameofsnapshot..."
3. boot the VM
4. backup the snapshot to another virtual disk via: "qemu-img convert -f qcow2 -O qcow2 -s nameofsnapshot..."
5. DELETE the snapshot from VM via: qemu-img snapshot -d nameofsnapshot...
But the problem is, that our original VM-size growing steadily (although
few changes were made) ?!
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1025244
Title:
qcow2 image increasing disk size above the virtual limit
Status in QEMU:
New
Status in “qemu-kvm” package in Ubuntu:
Triaged
Bug description:
Using qemu/kvm, qcow2 images, ext4 file systems on both guest and host
Host and Guest: Ubuntu server 12.04 64bit
To create an image I did this:
qemu-img create -f qcow2 -o preallocation=metadata ubuntu-pdc-vda.img 10737418240 (not sure about the exact bytes, but around this)
ls -l ubuntu-pdc-vda.img
fallocate -l theSizeInBytesFromAbove ubuntu-pdc-vda.img
The problem is that the image is growing progressively and has
obviously no limit, although I gave it one. The root filesystem's
image is the same case:
qemu-img info ubuntu-pdc-vda.img
image: ubuntu-pdc-vda.img
file format: qcow2
virtual size: 10G (10737418240 bytes)
disk size: 14G
cluster_size: 65536
and for confirmation:
du -sh ubuntu-pdc-vda.img
15G ubuntu-pdc-vda.img
I made a test and saw that when I delete something from the guest, the real size of the image is not decreasing (I read it is normal). OK, but when I write something again, it doesn't use the freed space, but instead grows the image. So for example:
1. The initial physical size of the image is 1GB.
2. I copy 1GB of data in the guest. It's physical size becomes 2GB.
3. I delete this data (1GB). The physical size of the image remains 2GB.
4. I copy another 1GB of data to the guest.
5. The physical size of the image becomes 3GB.
6. And so on with no limit. It doesn't care if the virtual size is less.
Is this normal - the real/physical size of the image to be larger than
the virtual limit???
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1025244/+subscriptions
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] [Bug 1025244] Re: qcow2 image increasing disk size above the virtual limit
2012-12-18 10:18 ` Andy Menzel
@ 2013-01-02 15:50 ` Stefan Hajnoczi
2013-01-02 16:07 ` Eric Blake
0 siblings, 1 reply; 17+ messages in thread
From: Stefan Hajnoczi @ 2013-01-02 15:50 UTC (permalink / raw)
To: qemu-devel
On Tue, Dec 18, 2012 at 10:18:20AM -0000, Andy Menzel wrote:
> Any solution right now? I have a similar problem like Todor Andreev;
> Our daily backup of some virtual machines (qcow2) looks like that:
>
> 1. shutdown the VM
> 2. create a snapshot via: "qemu-img snapshot -c nameofsnapshot..."
> 3. boot the VM
> 4. backup the snapshot to another virtual disk via: "qemu-img convert -f qcow2 -O qcow2 -s nameofsnapshot..."
> 5. DELETE the snapshot from VM via: qemu-img snapshot -d nameofsnapshot...
It's not safe to modify the qcow2 file while the guest is running. This
means Step 5 is not really safe and could result in an inconsistent
image.
This may also be causing the problem: the QEMU process has a variable
with the next free cluster index. Since Step 5 runs as a separate
process it does not update the QEMU process' next free cluster index
variable. QEMU doesn't know that there are now free clusters within the
image file because you updated the file behind QEMU's back - the result
is that it grows the file.
Please try deleting the last backup snapshot between Step 1 and Step 2.
This way you'll free the space while QEMU isn't accessing the image
file. When you boot up the image file again QEMU should reuse the freed
clusters.
Stefan
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1025244
Title:
qcow2 image increasing disk size above the virtual limit
Status in QEMU:
New
Status in “qemu-kvm” package in Ubuntu:
Triaged
Bug description:
Using qemu/kvm, qcow2 images, ext4 file systems on both guest and host
Host and Guest: Ubuntu server 12.04 64bit
To create an image I did this:
qemu-img create -f qcow2 -o preallocation=metadata ubuntu-pdc-vda.img 10737418240 (not sure about the exact bytes, but around this)
ls -l ubuntu-pdc-vda.img
fallocate -l theSizeInBytesFromAbove ubuntu-pdc-vda.img
The problem is that the image is growing progressively and has
obviously no limit, although I gave it one. The root filesystem's
image is the same case:
qemu-img info ubuntu-pdc-vda.img
image: ubuntu-pdc-vda.img
file format: qcow2
virtual size: 10G (10737418240 bytes)
disk size: 14G
cluster_size: 65536
and for confirmation:
du -sh ubuntu-pdc-vda.img
15G ubuntu-pdc-vda.img
I made a test and saw that when I delete something from the guest, the real size of the image is not decreasing (I read it is normal). OK, but when I write something again, it doesn't use the freed space, but instead grows the image. So for example:
1. The initial physical size of the image is 1GB.
2. I copy 1GB of data in the guest. It's physical size becomes 2GB.
3. I delete this data (1GB). The physical size of the image remains 2GB.
4. I copy another 1GB of data to the guest.
5. The physical size of the image becomes 3GB.
6. And so on with no limit. It doesn't care if the virtual size is less.
Is this normal - the real/physical size of the image to be larger than
the virtual limit???
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1025244/+subscriptions
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] [Bug 1025244] Re: qcow2 image increasing disk size above the virtual limit
2013-01-02 15:50 ` Stefan Hajnoczi
@ 2013-01-02 16:07 ` Eric Blake
0 siblings, 0 replies; 17+ messages in thread
From: Eric Blake @ 2013-01-02 16:07 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: Bug 1025244, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1858 bytes --]
On 01/02/2013 08:50 AM, Stefan Hajnoczi wrote:
> On Tue, Dec 18, 2012 at 10:18:20AM -0000, Andy Menzel wrote:
>> Any solution right now? I have a similar problem like Todor Andreev;
>> Our daily backup of some virtual machines (qcow2) looks like that:
>>
>> 1. shutdown the VM
>> 2. create a snapshot via: "qemu-img snapshot -c nameofsnapshot..."
>> 3. boot the VM
>> 4. backup the snapshot to another virtual disk via: "qemu-img convert -f qcow2 -O qcow2 -s nameofsnapshot..."
>> 5. DELETE the snapshot from VM via: qemu-img snapshot -d nameofsnapshot...
>
> It's not safe to modify the qcow2 file while the guest is running. This
> means Step 5 is not really safe and could result in an inconsistent
> image.
>
> This may also be causing the problem: the QEMU process has a variable
> with the next free cluster index. Since Step 5 runs as a separate
> process it does not update the QEMU process' next free cluster index
> variable. QEMU doesn't know that there are now free clusters within the
> image file because you updated the file behind QEMU's back - the result
> is that it grows the file.
>
> Please try deleting the last backup snapshot between Step 1 and Step 2.
> This way you'll free the space while QEMU isn't accessing the image
> file. When you boot up the image file again QEMU should reuse the freed
> clusters.
You might also want to try modifying step 5 to use the HMP delvm monitor
command from within the running qemu rather than going behind qemu's
back with a qemu-img invocation. That's how libvirt deletes internal
snapshots from a running qemu.
Also, there are patches currently under review that are talking about
creating a QMP counterpart to the delvm monitor command.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Qemu-devel] [Bug 1025244] Re: qcow2 image increasing disk size above the virtual limit
[not found] <20120716123031.26191.29124.malonedeb@chaenomeles.canonical.com>
2012-07-17 13:41 ` [Qemu-devel] [Bug 1025244] Re: qcow2 image increasing disk size above the virtual limit Serge Hallyn
2012-12-18 10:18 ` Andy Menzel
@ 2012-12-19 17:12 ` Serge Hallyn
2013-01-11 13:06 ` Andy Menzel
` (9 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Serge Hallyn @ 2012-12-19 17:12 UTC (permalink / raw)
To: qemu-devel
I don't know of any qcow2-based workaround.
Is anyone actively working on fixing the qcow2 code? In particular, the
fact that after removing snapshots, un-used blocks are not reclaimed and
disk size is never reduced?
One possible workaround (the one I would use) would be to use lvm-based
snapshotting instead.
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1025244
Title:
qcow2 image increasing disk size above the virtual limit
Status in QEMU:
New
Status in “qemu-kvm” package in Ubuntu:
Triaged
Bug description:
Using qemu/kvm, qcow2 images, ext4 file systems on both guest and host
Host and Guest: Ubuntu server 12.04 64bit
To create an image I did this:
qemu-img create -f qcow2 -o preallocation=metadata ubuntu-pdc-vda.img 10737418240 (not sure about the exact bytes, but around this)
ls -l ubuntu-pdc-vda.img
fallocate -l theSizeInBytesFromAbove ubuntu-pdc-vda.img
The problem is that the image is growing progressively and has
obviously no limit, although I gave it one. The root filesystem's
image is the same case:
qemu-img info ubuntu-pdc-vda.img
image: ubuntu-pdc-vda.img
file format: qcow2
virtual size: 10G (10737418240 bytes)
disk size: 14G
cluster_size: 65536
and for confirmation:
du -sh ubuntu-pdc-vda.img
15G ubuntu-pdc-vda.img
I made a test and saw that when I delete something from the guest, the real size of the image is not decreasing (I read it is normal). OK, but when I write something again, it doesn't use the freed space, but instead grows the image. So for example:
1. The initial physical size of the image is 1GB.
2. I copy 1GB of data in the guest. It's physical size becomes 2GB.
3. I delete this data (1GB). The physical size of the image remains 2GB.
4. I copy another 1GB of data to the guest.
5. The physical size of the image becomes 3GB.
6. And so on with no limit. It doesn't care if the virtual size is less.
Is this normal - the real/physical size of the image to be larger than
the virtual limit???
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1025244/+subscriptions
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Qemu-devel] [Bug 1025244] Re: qcow2 image increasing disk size above the virtual limit
[not found] <20120716123031.26191.29124.malonedeb@chaenomeles.canonical.com>
` (2 preceding siblings ...)
2012-12-19 17:12 ` Serge Hallyn
@ 2013-01-11 13:06 ` Andy Menzel
2014-12-12 16:37 ` Mario
` (8 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Andy Menzel @ 2013-01-11 13:06 UTC (permalink / raw)
To: qemu-devel
Thanks for your advices. I have no more problems with VM-size since
deleting snapshot in shutdown-mode. I reduced the overlarge qcow2-images
by converting in qcow2 again (that detects unused sectors and omits
this).
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1025244
Title:
qcow2 image increasing disk size above the virtual limit
Status in QEMU:
New
Status in “qemu-kvm” package in Ubuntu:
Triaged
Bug description:
Using qemu/kvm, qcow2 images, ext4 file systems on both guest and host
Host and Guest: Ubuntu server 12.04 64bit
To create an image I did this:
qemu-img create -f qcow2 -o preallocation=metadata ubuntu-pdc-vda.img 10737418240 (not sure about the exact bytes, but around this)
ls -l ubuntu-pdc-vda.img
fallocate -l theSizeInBytesFromAbove ubuntu-pdc-vda.img
The problem is that the image is growing progressively and has
obviously no limit, although I gave it one. The root filesystem's
image is the same case:
qemu-img info ubuntu-pdc-vda.img
image: ubuntu-pdc-vda.img
file format: qcow2
virtual size: 10G (10737418240 bytes)
disk size: 14G
cluster_size: 65536
and for confirmation:
du -sh ubuntu-pdc-vda.img
15G ubuntu-pdc-vda.img
I made a test and saw that when I delete something from the guest, the real size of the image is not decreasing (I read it is normal). OK, but when I write something again, it doesn't use the freed space, but instead grows the image. So for example:
1. The initial physical size of the image is 1GB.
2. I copy 1GB of data in the guest. It's physical size becomes 2GB.
3. I delete this data (1GB). The physical size of the image remains 2GB.
4. I copy another 1GB of data to the guest.
5. The physical size of the image becomes 3GB.
6. And so on with no limit. It doesn't care if the virtual size is less.
Is this normal - the real/physical size of the image to be larger than
the virtual limit???
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1025244/+subscriptions
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Qemu-devel] [Bug 1025244] Re: qcow2 image increasing disk size above the virtual limit
[not found] <20120716123031.26191.29124.malonedeb@chaenomeles.canonical.com>
` (3 preceding siblings ...)
2013-01-11 13:06 ` Andy Menzel
@ 2014-12-12 16:37 ` Mario
2014-12-14 14:01 ` Michael Tokarev
` (7 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Mario @ 2014-12-12 16:37 UTC (permalink / raw)
To: qemu-devel
Is anyone even looking at this? been years and the problem still
persists!
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1025244
Title:
qcow2 image increasing disk size above the virtual limit
Status in QEMU:
New
Status in qemu-kvm package in Ubuntu:
Triaged
Bug description:
Using qemu/kvm, qcow2 images, ext4 file systems on both guest and host
Host and Guest: Ubuntu server 12.04 64bit
To create an image I did this:
qemu-img create -f qcow2 -o preallocation=metadata ubuntu-pdc-vda.img 10737418240 (not sure about the exact bytes, but around this)
ls -l ubuntu-pdc-vda.img
fallocate -l theSizeInBytesFromAbove ubuntu-pdc-vda.img
The problem is that the image is growing progressively and has
obviously no limit, although I gave it one. The root filesystem's
image is the same case:
qemu-img info ubuntu-pdc-vda.img
image: ubuntu-pdc-vda.img
file format: qcow2
virtual size: 10G (10737418240 bytes)
disk size: 14G
cluster_size: 65536
and for confirmation:
du -sh ubuntu-pdc-vda.img
15G ubuntu-pdc-vda.img
I made a test and saw that when I delete something from the guest, the real size of the image is not decreasing (I read it is normal). OK, but when I write something again, it doesn't use the freed space, but instead grows the image. So for example:
1. The initial physical size of the image is 1GB.
2. I copy 1GB of data in the guest. It's physical size becomes 2GB.
3. I delete this data (1GB). The physical size of the image remains 2GB.
4. I copy another 1GB of data to the guest.
5. The physical size of the image becomes 3GB.
6. And so on with no limit. It doesn't care if the virtual size is less.
Is this normal - the real/physical size of the image to be larger than
the virtual limit???
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1025244/+subscriptions
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Qemu-devel] [Bug 1025244] Re: qcow2 image increasing disk size above the virtual limit
[not found] <20120716123031.26191.29124.malonedeb@chaenomeles.canonical.com>
` (4 preceding siblings ...)
2014-12-12 16:37 ` Mario
@ 2014-12-14 14:01 ` Michael Tokarev
2014-12-15 16:38 ` Serge Hallyn
` (6 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Michael Tokarev @ 2014-12-14 14:01 UTC (permalink / raw)
To: qemu-devel
Looking at what? At the lack of problems as comment #14 says?
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1025244
Title:
qcow2 image increasing disk size above the virtual limit
Status in QEMU:
New
Status in qemu-kvm package in Ubuntu:
Triaged
Bug description:
Using qemu/kvm, qcow2 images, ext4 file systems on both guest and host
Host and Guest: Ubuntu server 12.04 64bit
To create an image I did this:
qemu-img create -f qcow2 -o preallocation=metadata ubuntu-pdc-vda.img 10737418240 (not sure about the exact bytes, but around this)
ls -l ubuntu-pdc-vda.img
fallocate -l theSizeInBytesFromAbove ubuntu-pdc-vda.img
The problem is that the image is growing progressively and has
obviously no limit, although I gave it one. The root filesystem's
image is the same case:
qemu-img info ubuntu-pdc-vda.img
image: ubuntu-pdc-vda.img
file format: qcow2
virtual size: 10G (10737418240 bytes)
disk size: 14G
cluster_size: 65536
and for confirmation:
du -sh ubuntu-pdc-vda.img
15G ubuntu-pdc-vda.img
I made a test and saw that when I delete something from the guest, the real size of the image is not decreasing (I read it is normal). OK, but when I write something again, it doesn't use the freed space, but instead grows the image. So for example:
1. The initial physical size of the image is 1GB.
2. I copy 1GB of data in the guest. It's physical size becomes 2GB.
3. I delete this data (1GB). The physical size of the image remains 2GB.
4. I copy another 1GB of data to the guest.
5. The physical size of the image becomes 3GB.
6. And so on with no limit. It doesn't care if the virtual size is less.
Is this normal - the real/physical size of the image to be larger than
the virtual limit???
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1025244/+subscriptions
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Qemu-devel] [Bug 1025244] Re: qcow2 image increasing disk size above the virtual limit
[not found] <20120716123031.26191.29124.malonedeb@chaenomeles.canonical.com>
` (5 preceding siblings ...)
2014-12-14 14:01 ` Michael Tokarev
@ 2014-12-15 16:38 ` Serge Hallyn
2014-12-15 19:40 ` Mario
` (5 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Serge Hallyn @ 2014-12-15 16:38 UTC (permalink / raw)
To: qemu-devel
Changing priority given workarounds.
** Changed in: qemu-kvm (Ubuntu)
Importance: High => Low
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1025244
Title:
qcow2 image increasing disk size above the virtual limit
Status in QEMU:
New
Status in qemu-kvm package in Ubuntu:
Triaged
Bug description:
Using qemu/kvm, qcow2 images, ext4 file systems on both guest and host
Host and Guest: Ubuntu server 12.04 64bit
To create an image I did this:
qemu-img create -f qcow2 -o preallocation=metadata ubuntu-pdc-vda.img 10737418240 (not sure about the exact bytes, but around this)
ls -l ubuntu-pdc-vda.img
fallocate -l theSizeInBytesFromAbove ubuntu-pdc-vda.img
The problem is that the image is growing progressively and has
obviously no limit, although I gave it one. The root filesystem's
image is the same case:
qemu-img info ubuntu-pdc-vda.img
image: ubuntu-pdc-vda.img
file format: qcow2
virtual size: 10G (10737418240 bytes)
disk size: 14G
cluster_size: 65536
and for confirmation:
du -sh ubuntu-pdc-vda.img
15G ubuntu-pdc-vda.img
I made a test and saw that when I delete something from the guest, the real size of the image is not decreasing (I read it is normal). OK, but when I write something again, it doesn't use the freed space, but instead grows the image. So for example:
1. The initial physical size of the image is 1GB.
2. I copy 1GB of data in the guest. It's physical size becomes 2GB.
3. I delete this data (1GB). The physical size of the image remains 2GB.
4. I copy another 1GB of data to the guest.
5. The physical size of the image becomes 3GB.
6. And so on with no limit. It doesn't care if the virtual size is less.
Is this normal - the real/physical size of the image to be larger than
the virtual limit???
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1025244/+subscriptions
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Qemu-devel] [Bug 1025244] Re: qcow2 image increasing disk size above the virtual limit
[not found] <20120716123031.26191.29124.malonedeb@chaenomeles.canonical.com>
` (6 preceding siblings ...)
2014-12-15 16:38 ` Serge Hallyn
@ 2014-12-15 19:40 ` Mario
2014-12-15 20:37 ` Serge Hallyn
2014-12-16 9:23 ` Max Reitz
` (4 subsequent siblings)
12 siblings, 1 reply; 17+ messages in thread
From: Mario @ 2014-12-15 19:40 UTC (permalink / raw)
To: qemu-devel
@michael, so you do that once, after some time the machine keeps
growing, and growing and growing... and you have to redo that every so
often... I have a machine that should be taking up 30 gb yet is taking
600+ GB with 4 snapshots... but yeah... I'll just plug in another 1tb
hard drive so that i can free up the space only for it to happen again
in a near future... Seems a great workaround!
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1025244
Title:
qcow2 image increasing disk size above the virtual limit
Status in QEMU:
New
Status in qemu-kvm package in Ubuntu:
Triaged
Bug description:
Using qemu/kvm, qcow2 images, ext4 file systems on both guest and host
Host and Guest: Ubuntu server 12.04 64bit
To create an image I did this:
qemu-img create -f qcow2 -o preallocation=metadata ubuntu-pdc-vda.img 10737418240 (not sure about the exact bytes, but around this)
ls -l ubuntu-pdc-vda.img
fallocate -l theSizeInBytesFromAbove ubuntu-pdc-vda.img
The problem is that the image is growing progressively and has
obviously no limit, although I gave it one. The root filesystem's
image is the same case:
qemu-img info ubuntu-pdc-vda.img
image: ubuntu-pdc-vda.img
file format: qcow2
virtual size: 10G (10737418240 bytes)
disk size: 14G
cluster_size: 65536
and for confirmation:
du -sh ubuntu-pdc-vda.img
15G ubuntu-pdc-vda.img
I made a test and saw that when I delete something from the guest, the real size of the image is not decreasing (I read it is normal). OK, but when I write something again, it doesn't use the freed space, but instead grows the image. So for example:
1. The initial physical size of the image is 1GB.
2. I copy 1GB of data in the guest. It's physical size becomes 2GB.
3. I delete this data (1GB). The physical size of the image remains 2GB.
4. I copy another 1GB of data to the guest.
5. The physical size of the image becomes 3GB.
6. And so on with no limit. It doesn't care if the virtual size is less.
Is this normal - the real/physical size of the image to be larger than
the virtual limit???
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1025244/+subscriptions
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] [Bug 1025244] Re: qcow2 image increasing disk size above the virtual limit
2014-12-15 19:40 ` Mario
@ 2014-12-15 20:37 ` Serge Hallyn
0 siblings, 0 replies; 17+ messages in thread
From: Serge Hallyn @ 2014-12-15 20:37 UTC (permalink / raw)
To: qemu-devel
For the record, the workaround is deleting old snapshots in shutdown mode
as per comment #14.
Upstream has moved toward external snapshots as the way forward, so while
I don't argue that this is a bug, it seems unlikely to receive a fix from
upstream.
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1025244
Title:
qcow2 image increasing disk size above the virtual limit
Status in QEMU:
New
Status in qemu-kvm package in Ubuntu:
Triaged
Bug description:
Using qemu/kvm, qcow2 images, ext4 file systems on both guest and host
Host and Guest: Ubuntu server 12.04 64bit
To create an image I did this:
qemu-img create -f qcow2 -o preallocation=metadata ubuntu-pdc-vda.img 10737418240 (not sure about the exact bytes, but around this)
ls -l ubuntu-pdc-vda.img
fallocate -l theSizeInBytesFromAbove ubuntu-pdc-vda.img
The problem is that the image is growing progressively and has
obviously no limit, although I gave it one. The root filesystem's
image is the same case:
qemu-img info ubuntu-pdc-vda.img
image: ubuntu-pdc-vda.img
file format: qcow2
virtual size: 10G (10737418240 bytes)
disk size: 14G
cluster_size: 65536
and for confirmation:
du -sh ubuntu-pdc-vda.img
15G ubuntu-pdc-vda.img
I made a test and saw that when I delete something from the guest, the real size of the image is not decreasing (I read it is normal). OK, but when I write something again, it doesn't use the freed space, but instead grows the image. So for example:
1. The initial physical size of the image is 1GB.
2. I copy 1GB of data in the guest. It's physical size becomes 2GB.
3. I delete this data (1GB). The physical size of the image remains 2GB.
4. I copy another 1GB of data to the guest.
5. The physical size of the image becomes 3GB.
6. And so on with no limit. It doesn't care if the virtual size is less.
Is this normal - the real/physical size of the image to be larger than
the virtual limit???
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1025244/+subscriptions
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Qemu-devel] [Bug 1025244] Re: qcow2 image increasing disk size above the virtual limit
[not found] <20120716123031.26191.29124.malonedeb@chaenomeles.canonical.com>
` (7 preceding siblings ...)
2014-12-15 19:40 ` Mario
@ 2014-12-16 9:23 ` Max Reitz
2014-12-16 12:51 ` Mario
` (3 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Max Reitz @ 2014-12-16 9:23 UTC (permalink / raw)
To: qemu-devel
@Mario, in theory an image "that should be taking up 30 GB" with four
snapshots should be taking up at most about 150 GB, of course. Now the
question is what you mean by "should be taking up 30 GB" and by "is
taking 600+ GB".
For the latter, did you query the file length (ls -l) or the actual size
(qemu-img info, "disk size")?
For the former, if you have a virtual disk size of 1 TB and the guest
reports 30 GB are used, that doesn't mean that qemu knows that only 30
GB are used. If you delete a file in the guest, it will report less
space being used; however, qemu doesn't know about that unless the guest
bothers to discard the now unused sectors. If it doesn't (and I don't
see a reason why a guest should discard sectors on an HDD), the guest
will just remove the file metadata but the data will stay there (and may
be overwritten later by the guest when creating new files etc.). qemu
has no idea that that data is now unused, therefore it must treat those
sectors as being in use.
If your image indeed has a virtual disk size of 30 GB, has four
snapshots, is clean (qemu-img check) and does take up 600+ GB of actual
disk space, that should indeed not be happening (unless there's some
case I forgot to consider).
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1025244
Title:
qcow2 image increasing disk size above the virtual limit
Status in QEMU:
New
Status in qemu-kvm package in Ubuntu:
Triaged
Bug description:
Using qemu/kvm, qcow2 images, ext4 file systems on both guest and host
Host and Guest: Ubuntu server 12.04 64bit
To create an image I did this:
qemu-img create -f qcow2 -o preallocation=metadata ubuntu-pdc-vda.img 10737418240 (not sure about the exact bytes, but around this)
ls -l ubuntu-pdc-vda.img
fallocate -l theSizeInBytesFromAbove ubuntu-pdc-vda.img
The problem is that the image is growing progressively and has
obviously no limit, although I gave it one. The root filesystem's
image is the same case:
qemu-img info ubuntu-pdc-vda.img
image: ubuntu-pdc-vda.img
file format: qcow2
virtual size: 10G (10737418240 bytes)
disk size: 14G
cluster_size: 65536
and for confirmation:
du -sh ubuntu-pdc-vda.img
15G ubuntu-pdc-vda.img
I made a test and saw that when I delete something from the guest, the real size of the image is not decreasing (I read it is normal). OK, but when I write something again, it doesn't use the freed space, but instead grows the image. So for example:
1. The initial physical size of the image is 1GB.
2. I copy 1GB of data in the guest. It's physical size becomes 2GB.
3. I delete this data (1GB). The physical size of the image remains 2GB.
4. I copy another 1GB of data to the guest.
5. The physical size of the image becomes 3GB.
6. And so on with no limit. It doesn't care if the virtual size is less.
Is this normal - the real/physical size of the image to be larger than
the virtual limit???
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1025244/+subscriptions
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Qemu-devel] [Bug 1025244] Re: qcow2 image increasing disk size above the virtual limit
[not found] <20120716123031.26191.29124.malonedeb@chaenomeles.canonical.com>
` (8 preceding siblings ...)
2014-12-16 9:23 ` Max Reitz
@ 2014-12-16 12:51 ` Mario
2014-12-17 19:02 ` Serge Hallyn
2018-04-04 17:52 ` Thomas Huth
` (2 subsequent siblings)
12 siblings, 1 reply; 17+ messages in thread
From: Mario @ 2014-12-16 12:51 UTC (permalink / raw)
To: qemu-devel
@serge, what version would I need to upgrade to be able to use the
external snapshots? that sounds like it would solve my problems
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1025244
Title:
qcow2 image increasing disk size above the virtual limit
Status in QEMU:
New
Status in qemu-kvm package in Ubuntu:
Triaged
Bug description:
Using qemu/kvm, qcow2 images, ext4 file systems on both guest and host
Host and Guest: Ubuntu server 12.04 64bit
To create an image I did this:
qemu-img create -f qcow2 -o preallocation=metadata ubuntu-pdc-vda.img 10737418240 (not sure about the exact bytes, but around this)
ls -l ubuntu-pdc-vda.img
fallocate -l theSizeInBytesFromAbove ubuntu-pdc-vda.img
The problem is that the image is growing progressively and has
obviously no limit, although I gave it one. The root filesystem's
image is the same case:
qemu-img info ubuntu-pdc-vda.img
image: ubuntu-pdc-vda.img
file format: qcow2
virtual size: 10G (10737418240 bytes)
disk size: 14G
cluster_size: 65536
and for confirmation:
du -sh ubuntu-pdc-vda.img
15G ubuntu-pdc-vda.img
I made a test and saw that when I delete something from the guest, the real size of the image is not decreasing (I read it is normal). OK, but when I write something again, it doesn't use the freed space, but instead grows the image. So for example:
1. The initial physical size of the image is 1GB.
2. I copy 1GB of data in the guest. It's physical size becomes 2GB.
3. I delete this data (1GB). The physical size of the image remains 2GB.
4. I copy another 1GB of data to the guest.
5. The physical size of the image becomes 3GB.
6. And so on with no limit. It doesn't care if the virtual size is less.
Is this normal - the real/physical size of the image to be larger than
the virtual limit???
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1025244/+subscriptions
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] [Bug 1025244] Re: qcow2 image increasing disk size above the virtual limit
2014-12-16 12:51 ` Mario
@ 2014-12-17 19:02 ` Serge Hallyn
0 siblings, 0 replies; 17+ messages in thread
From: Serge Hallyn @ 2014-12-17 19:02 UTC (permalink / raw)
To: qemu-devel
@Mario,
the external snapshots have apparently been around a long time. The
ability to create external snapshots from running vms is newer, but
it appears to exist evn in qemu-kvm 1.0. So all versions in Debian
and Ubuntu should support them.
http://wiki.qemu.org/Features/Snapshots#Snapshot_command_flow
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1025244
Title:
qcow2 image increasing disk size above the virtual limit
Status in QEMU:
New
Status in qemu-kvm package in Ubuntu:
Triaged
Bug description:
Using qemu/kvm, qcow2 images, ext4 file systems on both guest and host
Host and Guest: Ubuntu server 12.04 64bit
To create an image I did this:
qemu-img create -f qcow2 -o preallocation=metadata ubuntu-pdc-vda.img 10737418240 (not sure about the exact bytes, but around this)
ls -l ubuntu-pdc-vda.img
fallocate -l theSizeInBytesFromAbove ubuntu-pdc-vda.img
The problem is that the image is growing progressively and has
obviously no limit, although I gave it one. The root filesystem's
image is the same case:
qemu-img info ubuntu-pdc-vda.img
image: ubuntu-pdc-vda.img
file format: qcow2
virtual size: 10G (10737418240 bytes)
disk size: 14G
cluster_size: 65536
and for confirmation:
du -sh ubuntu-pdc-vda.img
15G ubuntu-pdc-vda.img
I made a test and saw that when I delete something from the guest, the real size of the image is not decreasing (I read it is normal). OK, but when I write something again, it doesn't use the freed space, but instead grows the image. So for example:
1. The initial physical size of the image is 1GB.
2. I copy 1GB of data in the guest. It's physical size becomes 2GB.
3. I delete this data (1GB). The physical size of the image remains 2GB.
4. I copy another 1GB of data to the guest.
5. The physical size of the image becomes 3GB.
6. And so on with no limit. It doesn't care if the virtual size is less.
Is this normal - the real/physical size of the image to be larger than
the virtual limit???
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1025244/+subscriptions
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Qemu-devel] [Bug 1025244] Re: qcow2 image increasing disk size above the virtual limit
[not found] <20120716123031.26191.29124.malonedeb@chaenomeles.canonical.com>
` (9 preceding siblings ...)
2014-12-16 12:51 ` Mario
@ 2018-04-04 17:52 ` Thomas Huth
2018-06-04 4:17 ` Launchpad Bug Tracker
2018-06-04 4:17 ` Launchpad Bug Tracker
12 siblings, 0 replies; 17+ messages in thread
From: Thomas Huth @ 2018-04-04 17:52 UTC (permalink / raw)
To: qemu-devel
Looking through old bug tickets... is there anything left to do here? Or
should we rather close this ticket nowadays?
** Changed in: qemu
Status: New => Incomplete
** Changed in: qemu-kvm (Ubuntu)
Status: Triaged => Incomplete
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1025244
Title:
qcow2 image increasing disk size above the virtual limit
Status in QEMU:
Incomplete
Status in qemu-kvm package in Ubuntu:
Incomplete
Bug description:
Using qemu/kvm, qcow2 images, ext4 file systems on both guest and host
Host and Guest: Ubuntu server 12.04 64bit
To create an image I did this:
qemu-img create -f qcow2 -o preallocation=metadata ubuntu-pdc-vda.img 10737418240 (not sure about the exact bytes, but around this)
ls -l ubuntu-pdc-vda.img
fallocate -l theSizeInBytesFromAbove ubuntu-pdc-vda.img
The problem is that the image is growing progressively and has
obviously no limit, although I gave it one. The root filesystem's
image is the same case:
qemu-img info ubuntu-pdc-vda.img
image: ubuntu-pdc-vda.img
file format: qcow2
virtual size: 10G (10737418240 bytes)
disk size: 14G
cluster_size: 65536
and for confirmation:
du -sh ubuntu-pdc-vda.img
15G ubuntu-pdc-vda.img
I made a test and saw that when I delete something from the guest, the real size of the image is not decreasing (I read it is normal). OK, but when I write something again, it doesn't use the freed space, but instead grows the image. So for example:
1. The initial physical size of the image is 1GB.
2. I copy 1GB of data in the guest. It's physical size becomes 2GB.
3. I delete this data (1GB). The physical size of the image remains 2GB.
4. I copy another 1GB of data to the guest.
5. The physical size of the image becomes 3GB.
6. And so on with no limit. It doesn't care if the virtual size is less.
Is this normal - the real/physical size of the image to be larger than
the virtual limit???
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1025244/+subscriptions
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Qemu-devel] [Bug 1025244] Re: qcow2 image increasing disk size above the virtual limit
[not found] <20120716123031.26191.29124.malonedeb@chaenomeles.canonical.com>
` (10 preceding siblings ...)
2018-04-04 17:52 ` Thomas Huth
@ 2018-06-04 4:17 ` Launchpad Bug Tracker
2018-06-04 4:17 ` Launchpad Bug Tracker
12 siblings, 0 replies; 17+ messages in thread
From: Launchpad Bug Tracker @ 2018-06-04 4:17 UTC (permalink / raw)
To: qemu-devel
[Expired for qemu-kvm (Ubuntu) because there has been no activity for 60
days.]
** Changed in: qemu-kvm (Ubuntu)
Status: Incomplete => Expired
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1025244
Title:
qcow2 image increasing disk size above the virtual limit
Status in QEMU:
Expired
Status in qemu-kvm package in Ubuntu:
Expired
Bug description:
Using qemu/kvm, qcow2 images, ext4 file systems on both guest and host
Host and Guest: Ubuntu server 12.04 64bit
To create an image I did this:
qemu-img create -f qcow2 -o preallocation=metadata ubuntu-pdc-vda.img 10737418240 (not sure about the exact bytes, but around this)
ls -l ubuntu-pdc-vda.img
fallocate -l theSizeInBytesFromAbove ubuntu-pdc-vda.img
The problem is that the image is growing progressively and has
obviously no limit, although I gave it one. The root filesystem's
image is the same case:
qemu-img info ubuntu-pdc-vda.img
image: ubuntu-pdc-vda.img
file format: qcow2
virtual size: 10G (10737418240 bytes)
disk size: 14G
cluster_size: 65536
and for confirmation:
du -sh ubuntu-pdc-vda.img
15G ubuntu-pdc-vda.img
I made a test and saw that when I delete something from the guest, the real size of the image is not decreasing (I read it is normal). OK, but when I write something again, it doesn't use the freed space, but instead grows the image. So for example:
1. The initial physical size of the image is 1GB.
2. I copy 1GB of data in the guest. It's physical size becomes 2GB.
3. I delete this data (1GB). The physical size of the image remains 2GB.
4. I copy another 1GB of data to the guest.
5. The physical size of the image becomes 3GB.
6. And so on with no limit. It doesn't care if the virtual size is less.
Is this normal - the real/physical size of the image to be larger than
the virtual limit???
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1025244/+subscriptions
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Qemu-devel] [Bug 1025244] Re: qcow2 image increasing disk size above the virtual limit
[not found] <20120716123031.26191.29124.malonedeb@chaenomeles.canonical.com>
` (11 preceding siblings ...)
2018-06-04 4:17 ` Launchpad Bug Tracker
@ 2018-06-04 4:17 ` Launchpad Bug Tracker
12 siblings, 0 replies; 17+ messages in thread
From: Launchpad Bug Tracker @ 2018-06-04 4:17 UTC (permalink / raw)
To: qemu-devel
[Expired for QEMU because there has been no activity for 60 days.]
** Changed in: qemu
Status: Incomplete => Expired
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1025244
Title:
qcow2 image increasing disk size above the virtual limit
Status in QEMU:
Expired
Status in qemu-kvm package in Ubuntu:
Expired
Bug description:
Using qemu/kvm, qcow2 images, ext4 file systems on both guest and host
Host and Guest: Ubuntu server 12.04 64bit
To create an image I did this:
qemu-img create -f qcow2 -o preallocation=metadata ubuntu-pdc-vda.img 10737418240 (not sure about the exact bytes, but around this)
ls -l ubuntu-pdc-vda.img
fallocate -l theSizeInBytesFromAbove ubuntu-pdc-vda.img
The problem is that the image is growing progressively and has
obviously no limit, although I gave it one. The root filesystem's
image is the same case:
qemu-img info ubuntu-pdc-vda.img
image: ubuntu-pdc-vda.img
file format: qcow2
virtual size: 10G (10737418240 bytes)
disk size: 14G
cluster_size: 65536
and for confirmation:
du -sh ubuntu-pdc-vda.img
15G ubuntu-pdc-vda.img
I made a test and saw that when I delete something from the guest, the real size of the image is not decreasing (I read it is normal). OK, but when I write something again, it doesn't use the freed space, but instead grows the image. So for example:
1. The initial physical size of the image is 1GB.
2. I copy 1GB of data in the guest. It's physical size becomes 2GB.
3. I delete this data (1GB). The physical size of the image remains 2GB.
4. I copy another 1GB of data to the guest.
5. The physical size of the image becomes 3GB.
6. And so on with no limit. It doesn't care if the virtual size is less.
Is this normal - the real/physical size of the image to be larger than
the virtual limit???
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1025244/+subscriptions
^ permalink raw reply [flat|nested] 17+ messages in thread