[pve-devel] Sparse clone/move over a thin LVM ?
Alexandre DERUMIER
aderumier at odiso.com
Thu Jul 28 07:20:21 CEST 2016
also wolfgang has added his zeroinit filter to qemu-img command some time ago,
so it should work.
push @$cmd, '/usr/bin/qemu-img', 'convert', '-t', 'writeback', '-p', '-n';
push @$cmd, '-s', $snapname if($snapname && $src_format eq "qcow2");
push @$cmd, '-f', $src_format, '-O', $dst_format, $src_path;
if ($is_zero_initialized) {
push @$cmd, "zeroinit:$dst_path";
} else {
push @$cmd, $dst_path;
}
----- Mail original -----
De: "aderumier" <aderumier at odiso.com>
À: "dietmar" <dietmar at proxmox.com>, "pve-devel" <pve-devel at pve.proxmox.com>
Envoyé: Jeudi 28 Juillet 2016 06:52:39
Objet: Re: [pve-devel] Sparse clone/move over a thin LVM ?
>>Why not fix qemu-img instead?
This is strange, I am pretty sure that qemu-img was skipping zero writes
" '-S' indicates the consecutive number of bytes (defaults to 4k) that must\n"
" contain only zeros for qemu-img to create a sparse image during\n"
" conversion. If the number of bytes is 0, the source will not be scanned for\n"
" unallocated or zero sectors, and the destination image will always be\n"
" fully allocated\n"
it should be sparse by default, until we setup "-S 0"
----- Mail original -----
De: "dietmar" <dietmar at proxmox.com>
À: "Gilou" <contact+dev at gilouweb.com>, "pve-devel" <pve-devel at pve.proxmox.com>
Envoyé: Jeudi 28 Juillet 2016 06:20:50
Objet: Re: [pve-devel] Sparse clone/move over a thin LVM ?
> So I tried it by hand using dd conv=sparse, which works fine...
> I'm no expert at this, but could it be that we could move/clone
> sparse/thin disks this way if the destination is indeed a newly created
> LV (case for move/clone) ?
Why not fix qemu-img instead?
_______________________________________________
pve-devel mailing list
pve-devel at pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
_______________________________________________
pve-devel mailing list
pve-devel at pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
More information about the pve-devel
mailing list