mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-05-01 04:51:50 +00:00
get_replicatable_volumes: fix CDROM and local file/device handling
This commit is contained in:
parent
6f249d9400
commit
4ab3bcc82a
@ -71,6 +71,13 @@ sub get_replicatable_volumes {
|
||||
my $test_volid = sub {
|
||||
my ($volid, $attr) = @_;
|
||||
|
||||
if ($volid =~ m|^/|) {
|
||||
return if !$attr->{replicate};
|
||||
die "unable to replicate local file/device '$volid'\n";
|
||||
}
|
||||
|
||||
return if $attr->{cdrom};
|
||||
|
||||
my ($storeid, $volname) = PVE::Storage::parse_volume_id($volid, $noerr);
|
||||
return if !$storeid;
|
||||
|
||||
@ -80,8 +87,6 @@ sub get_replicatable_volumes {
|
||||
my ($path, $owner, $vtype) = PVE::Storage::path($storecfg, $volid);
|
||||
return if !$owner || ($owner != $vmid);
|
||||
|
||||
return if $attr->{cdrom};
|
||||
|
||||
die "unable to replicate volume '$volid', type '$vtype'\n" if $vtype ne 'images';
|
||||
|
||||
return if !$cleanup && !$attr->{replicate};
|
||||
|
Loading…
Reference in New Issue
Block a user