mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-05-29 13:52:02 +00:00
fix #3324: clone disk: use larger blocksize for EFI disk
Moving to Ceph is very slow when bs=1. Instead, use a larger block size in combination with the (currently) PVE-specific osize option to specify the desired output size. Suggested-by: Dietmar Maurer <dietmar@proxmox.com> Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
This commit is contained in:
parent
483c9676f8
commit
fdfdc80ece
@ -6991,7 +6991,11 @@ sub clone_disk {
|
|||||||
# that is given by the OVMF_VARS.fd
|
# that is given by the OVMF_VARS.fd
|
||||||
my $src_path = PVE::Storage::path($storecfg, $drive->{file});
|
my $src_path = PVE::Storage::path($storecfg, $drive->{file});
|
||||||
my $dst_path = PVE::Storage::path($storecfg, $newvolid);
|
my $dst_path = PVE::Storage::path($storecfg, $newvolid);
|
||||||
run_command(['qemu-img', 'dd', '-n', '-O', $dst_format, "bs=1", "count=$size",
|
|
||||||
|
# better for Ceph if block size is not too small, see bug #3324
|
||||||
|
my $bs = 1024*1024;
|
||||||
|
|
||||||
|
run_command(['qemu-img', 'dd', '-n', '-O', $dst_format, "bs=$bs", "osize=$size",
|
||||||
"if=$src_path", "of=$dst_path"]);
|
"if=$src_path", "of=$dst_path"]);
|
||||||
} else {
|
} else {
|
||||||
qemu_img_convert($drive->{file}, $newvolid, $size, $snapname, $sparseinit);
|
qemu_img_convert($drive->{file}, $newvolid, $size, $snapname, $sparseinit);
|
||||||
|
Loading…
Reference in New Issue
Block a user