Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Apr 2019 19:12:58 -0700
From:      Marcel Moolenaar <marcel@xcllnt.net>
To:        "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>
Cc:        Marcel Moolenaar <marcel@xcllnt.net>, FreeBSD virtualization mailing list <freebsd-virtualization@freebsd.org>
Subject:   Re: bhyve, sparse disk image and trim support?
Message-ID:  <B334C1BB-A6C1-4E44-A96A-88C5DCE49BEC@xcllnt.net>
In-Reply-To: <21E25588-ADC0-4101-B122-5782D9A94AC4@lists.zabbadoz.net>
References:  <21E25588-ADC0-4101-B122-5782D9A94AC4@lists.zabbadoz.net>

next in thread | previous in thread | raw e-mail | index | archive | help


> On Apr 21, 2019, at 10:01 AM, Bjoern A. Zeeb =
<bzeeb-lists@lists.zabbadoz.net> wrote:
>=20
> Hi,
>=20
> I have been wondering about this with other (commercial) =
virtualisation solutions in the past.  If running on a =E2=80=9Cdisk =
image=E2=80=9D ideally I=E2=80=99d love that image to be a sparse file =
and ideally I=E2=80=99d love for bhyve/underlying virtualisation for the =
disk to understand TRIM so in case one deletes huge junks inside the VM =
the disk image can actually shrink again.
>=20
> Examples might be: you do a buildworld or an OS update in the guest =
and then want to delete the obj tree or temporary files after that.  Now =
the disk image on the host has been bloated up, and could massively =
shrink again saving space on the host.
>=20
> Do we support this?  Has anyone worked on this?  How do people deal =
with these problems?

I started libvdsk a (long) time back: see =
https://svnweb.freebsd.org/base/user/marcel/libvdsk/
I moved it to github to make collaboration easier: see =
https://github.com/xcllnt/libvdsk
The latest code is in GitHub.

I mostly didn't work on it, but recently spent a bit of time on it. With =
raw disk support
integrated into the bundled bhyve, the next obvious step is to add =
support for qcow or vmdk
or vhd. Someone has the beginnings of qcow support, so maybe that can be =
integrated soonish
Into libvdsk.

I was thinking that a sparse file could be created for raw disk images =
in the context of TRIM,
but didn=E2=80=99t yet worry about it. It could be useful in general, =
not just raw disk images so I
wanted to get off the ground with something like vmdk first...

JFYI,

--=20
Marcel Moolenaar
marcel@xcllnt.net






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B334C1BB-A6C1-4E44-A96A-88C5DCE49BEC>