From mboxrd@z Thu Jan 1 00:00:00 1970 From: Philipp Hahn Subject: Re: qcow2 eating up space when formattng Centos Date: Fri, 28 Oct 2011 07:47:55 +0200 Message-ID: <201110280748.00007.hahn@univention.de> References: <201110240917.18718.hahn@univention.de> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart3300936.lD2Ms5ltzn"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: day knight Return-path: Received: from mail.univention.de ([82.198.197.8]:1970 "EHLO mail.univention.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753028Ab1J1FsN (ORCPT ); Fri, 28 Oct 2011 01:48:13 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: --nextPart3300936.lD2Ms5ltzn Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello Anonnymous, cc:kvm On Friday 28 October 2011 04:48:57 day knight wrote: > I am using ext3 and your explaination makes sense. May I also ask if > the qcow image automatically adjusts to the size or is it ever > expanding image? That depends: Originally Qcow2 only expands, since Qemu/kvm doesn't know=20 what's inside your image file, that is if and what file systems it contains= =20 and how they're structured. Because of that it can't know which blocks are= =20 free and which are still used. Since qemu/kvm-0.15 there is TRIM support (which originally was developed f= or=20 flash-storage media), which =E2=80=94 I think =E2=80=94 is also supported f= or Qcow2. If your=20 Guest-OS supports TRIM, it can tell the underlaying storage media =E2=80=94= Qcow2 =E2=80=94=20 that blocks are now unused, which Qemu/kvm can then free. > I mean lets say I have 100 Gig and write 20 Gig on=20 > qcow ext3 image and then delete 10 Gig data. Would it show up as > 120Gig or 110 once the deletion is done Sincerely Philipp =2D-=20 Philipp Hahn Open Source Software Engineer hahn@univention.de Univention GmbH Linux for Your Business fon: +49 421 22 232- 0 Mary-Somerville-Str.1 D-28359 Bremen fax: +49 421 22 232-99 http://www.univention.de/ --nextPart3300936.lD2Ms5ltzn Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEABECAAYFAk6qQgwACgkQYPlgoZpUDjmS0gCgh3qUnY5J37004ovhh49rxHMN 2jUAoLHMVTCnkHFYqLZjXgP2DS3X8Jz8 =92gp -----END PGP SIGNATURE----- --nextPart3300936.lD2Ms5ltzn--