replica: get_syncable_disks: skip disks with replica=0
This commit is contained in:
@ -381,6 +381,7 @@ sub get_syncable_guestdisks {
|
|||||||
my $warnings = 0;
|
my $warnings = 0;
|
||||||
my $func = sub {
|
my $func = sub {
|
||||||
my ($id, $volume) = @_;
|
my ($id, $volume) = @_;
|
||||||
|
return if !defined($volume->{replica}) || !$volume->{replica};
|
||||||
|
|
||||||
my $volname;
|
my $volname;
|
||||||
if ($vm_type eq 'qemu') {
|
if ($vm_type eq 'qemu') {
|
||||||
@ -392,9 +393,7 @@ sub get_syncable_guestdisks {
|
|||||||
if( PVE::Storage::volume_has_feature($cfg, 'replicate', $volname , undef, $running)) {
|
if( PVE::Storage::volume_has_feature($cfg, 'replicate', $volname , undef, $running)) {
|
||||||
$syncable_disks->{$volname} = 1;
|
$syncable_disks->{$volname} = 1;
|
||||||
} else {
|
} else {
|
||||||
warn "Can't sync Volume: $volname\n"
|
warn "Can't sync Volume: $volname\n" if !$noerr;
|
||||||
if !$noerr &&
|
|
||||||
(!defined($volume->{replica}) || $volume->{replica});
|
|
||||||
$warnings = 1;
|
$warnings = 1;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user