} else {
# not full means clone instead of copy
die "Linked clone feature for '$volid' is not available\n"
- if !PVE::Storage::volume_has_feature($storecfg, 'clone', $volid, $snapname, $running);
+ if !PVE::Storage::volume_has_feature($storecfg, 'clone', $volid, $snapname, $running, {'valid_target_formats' => ['raw', 'subvol']});
}
$mountpoints->{$opt} = $mp;
my ($class, $feature, $conf, $storecfg, $snapname, $running, $backup_only) = @_;
my $err;
+ my $opts;
+ if ($feature eq 'copy' || $feature eq 'clone') {
+ $opts = {'valid_target_formats' => ['raw', 'subvol']};
+ }
+
$class->foreach_mountpoint($conf, sub {
my ($ms, $mountpoint) = @_;
$err = 1
if !PVE::Storage::volume_has_feature($storecfg, $feature,
$mountpoint->{volume},
- $snapname, $running);
+ $snapname, $running, $opts);
});
return $err ? 0 : 1;