mirror of
git://git.proxmox.com/git/pve-storage.git
synced 2025-09-06 13:44:21 +03:00
cleanup: improve error message
This commit is contained in:
@@ -545,10 +545,8 @@ sub storage_migrate {
|
|||||||
|
|
||||||
} elsif ($scfg->{type} eq 'lvmthin' || $scfg->{type} eq 'lvm') {
|
} elsif ($scfg->{type} eq 'lvmthin' || $scfg->{type} eq 'lvm') {
|
||||||
|
|
||||||
if ($tcfg->{type} eq 'lvmthin' || $tcfg->{type} eq 'lvm') {
|
if (($scfg->{type} eq $tcfg->{type}) &&
|
||||||
|
($tcfg->{type} eq 'lvmthin' || $tcfg->{type} eq 'lvm')) {
|
||||||
die "$errstr - pool on target has not same name as source!"
|
|
||||||
if $tcfg->{type} ne $scfg->{type};
|
|
||||||
|
|
||||||
my (undef, $volname) = parse_volname($cfg, $volid);
|
my (undef, $volname) = parse_volname($cfg, $volid);
|
||||||
my $size = volume_size_info($cfg, $volid, 5);
|
my $size = volume_size_info($cfg, $volid, 5);
|
||||||
@@ -573,7 +571,7 @@ sub storage_migrate {
|
|||||||
vdisk_free($cfg, $volid);
|
vdisk_free($cfg, $volid);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
die "$errstr - target type $tcfg->{type} is not valid\n";
|
die "$errstr - migrate from source type '$scfg->{type}' to '$tcfg->{type}' not implemented\n";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
die "$errstr - source type '$scfg->{type}' not implemented\n";
|
die "$errstr - source type '$scfg->{type}' not implemented\n";
|
||||||
|
Reference in New Issue
Block a user