since we need the volume ID of the volume/drive/mp, which is
only available after parsing, this needs to be done in the
subclasses.
__snapshot_delete_vol_snapshot() gets a new parameter, and
pushes the volid to this array if it should be added as
unused.
return if $snapname eq 'vzdump' && $vs ne 'rootfs' && !$volume->{backup};
if (!$drivehash || $drivehash->{$vs}) {
return if $snapname eq 'vzdump' && $vs ne 'rootfs' && !$volume->{backup};
if (!$drivehash || $drivehash->{$vs}) {
- eval { $class->__snapshot_delete_vol_snapshot($vmid, $vs, $volume, $snapname); };
+ eval { $class->__snapshot_delete_vol_snapshot($vmid, $vs, $volume, $snapname, $unused); };
if (my $err = $@) {
die $err if !$force;
warn $err;
if (my $err = $@) {
die $err if !$force;
warn $err;
# save changes (remove mp from snapshot)
$class->lock_config($vmid, $updatefn, $vs) if !$force;
# save changes (remove mp from snapshot)
$class->lock_config($vmid, $updatefn, $vs) if !$force;
- push @$unused, $volume->{volume};