[elbe-devel] Disk space leaks from the initvm

Torben Hohn torben.hohn at linutronix.de
Fri Mar 17 16:55:00 CET 2017


On Fri, Mar 17, 2017 at 03:30:04PM +0000, Lukasz Walewski wrote:
> >-----Ursprüngliche Nachricht-----
> >Von: John Ogness [mailto:john.ogness at linutronix.de]
> >Gesendet: Freitag, 17. März 2017 13:36
> >An: elbe-devel at linutronix.de
> >Cc: Lukasz Walewski
> >Betreff: Re: [elbe-devel] Disk space leaks from the initvm
> >
> >On 2017-03-17, Lukasz Walewski <lwalewski at s-can.at> wrote:
> >> Is the default partition size of the initvm (the 80 GBs) configurable,
> >> e.g. at 'elbe initvm create' time? I would like to keep the image file
> >> far smaller, especially that it tends to leak anyways.
> >
> >You probably created the initvm using:
> >
> >$ elbe initvm create --directory=/some/directory
> >
> >This will use the default XML file specifying the initvm. That file is
> >elbepack/init/default-init.xml of the elbe installation. In that file
> >you will find:
> >
> ><size>80G</size>
> >
> >within the initvm section. The "elbe initvm create" command can take an
> >XML file as an argument. Then that file will be used instead of the
> >default XML file. For example:
> >
> >$ elbe initvm create --directory=/some/directory myinitvm.xml
> >
> >I recommend copying the default XML file, modifying it, and using the
> >modified version to create your initvm.
> 
> That worked wonderfully! Thanks!
> 
> I can also confirm now, that the image file does not grow beyond the VM's partition size. Sorry for rising the false 'leakage' alarm but it really looked that way ;)
> 

Well, we could still consider this a leakage.
The virtio-scsi drivers seem to support trim now.
And we might be able to give back freed blocks to host filesystem.

We might want to investigate this.

https://chrisirwin.ca/posts/discard-with-kvm/
http://dustymabe.com/2013/06/11/recover-space-from-vm-disk-images-by-using-discardfstrim/

-- 
Mit freundlichen Grüßen
Torben Hohn

Linutronix GmbH

Standort: Bremen

Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99

Firmensitz / Registered Office: D-88690 Uhldingen, Bahnhofstr. 3
Registergericht / Local District Court: Amtsgericht Freiburg i. Br.; HRB
Nr. / Trade register no.: 700 806

Geschäftsführer / Managing Directors: Heinz Egger, Thomas Gleixner

Eine Bitte von uns: Sollten Sie diese E-Mail irrtümlich erhalten haben,
benachrichtigen Sie uns in diesem Falle bitte sobald wie es Ihnen
möglich ist, durch Antwort-Mail. Vielen Dank!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.linutronix.de/pipermail/elbe-devel/attachments/20170317/80712534/attachment.sig>


More information about the elbe-devel mailing list