fix for storage migrate

remove the sparse parameter from dd.
This destroy the lvm volume.

also remove the free_disk this will later be done.
This commit is contained in:
Wolfgang Link
2016-06-08 13:42:53 +02:00
committed by Dietmar Maurer
parent 84252f6772
commit e83f7b4095

View File

@ -558,15 +558,17 @@ sub storage_migrate {
$target_volname, int($size/1024)]); $target_volname, int($size/1024)]);
eval { eval {
run_command([["dd", "if=$src"], if ($tcfg->{type} eq 'lvmthin') {
["/usr/bin/ssh", "root\@${target_host}", "-C", run_command([["dd", "if=$src"],["/usr/bin/ssh", "root\@${target_host}", "-C",
"dd", 'conv=sparse', "of=$dst"]]); "dd", 'conv=sparse', "of=$dst"]]);
} else {
run_command([["dd", "if=$src"],["/usr/bin/ssh", "root\@${target_host}", "-C",
"dd", "of=$dst"]]);
}
}; };
if (my $err = $@) { if (my $err = $@) {
run_command(['/usr/bin/ssh', "root\@${target_host}", run_command(['/usr/bin/ssh', "root\@${target_host}",
'pvesm', 'free', $target_volid]); 'pvesm', 'free', $target_volid]);
} else {
vdisk_free($cfg, $volid);
} }
} else { } else {
die "$errstr - migrate from source type '$scfg->{type}' to '$tcfg->{type}' not implemented\n"; die "$errstr - migrate from source type '$scfg->{type}' to '$tcfg->{type}' not implemented\n";