I think it's hard to calculate the additional space for cow format without analysing
raw image. It's better to allocate enough space, and then decrease it after qemu-img
convert.
Please note that while disk moving keeps disk format, disk copying changes format. So when
you copy a thin provisioned disk to iSCSI storage it's being converted to cow. The
issue is that size of converted lv still looks like preallocated. You can decrease it
manually via lvchange, or you can move it to a file based storage and back. Moving disks
keeps disk format, but fixes its size.
Also please consider qcow compat=1.1 as default disk format both for file and block
storages.
On 04/03/16 23:23, "users-bounces(a)ovirt.org on behalf of Nir Soffer"
<users-bounces(a)ovirt.org on behalf of nsoffer(a)redhat.com> wrote:
On Fri, Mar 4, 2016 at 7:07 PM, Nicolás <nicolas(a)devels.es>
wrote:
> Hi,
>
> We're migrating an existing storage (glusterfs) to a new one (iSCSI). All
> disks on glusterfs are thin provisioned, but when migrating to iSCSI the
> following warning is shown:
>
> The following disks will become preallocated, and may consume
> considerably more space on the target: local-disk
>
> Why is that? Is there a way to migrate disks so they are thin provisioned on
> iSCSI as well?
The issue is that we use raw sparse format for thin provisioned disks
on file based
storage. The file system provides the thin provisioning, maintaining holes in
the files.
When we create the destination lv, we use the disk virtual size, so you get
practically a preallocated volume.
I think we can do better - before copying the disk, we can check the actual used
space (e.g. what qemu-img info or stat report), and create the
destination lv using
the used size (plus additional space for qcow format).
I tested this by extending the destination lv manually and then
copying data manually
using qemu-img convert, and it works.
Can you file a bug for this, and explain the use case?
Nir
_______________________________________________
Users mailing list
Users(a)ovirt.org
http://lists.ovirt.org/mailman/listinfo/users