[pve-devel] [PATCH container] Only add actual volumes to volid_list
Fabian Grünbichler
f.gruenbichler at proxmox.com
Thu Feb 4 11:08:05 CET 2016
skip /dev and bind mounts, otherwise stop backups will
fail in parse_volume_id.
---
src/PVE/VZDump/LXC.pm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/PVE/VZDump/LXC.pm b/src/PVE/VZDump/LXC.pm
index dddf17e..fda37c9 100644
--- a/src/PVE/VZDump/LXC.pm
+++ b/src/PVE/VZDump/LXC.pm
@@ -132,6 +132,7 @@ sub prepare {
my ($id_map, $rootuid, $rootgid) = PVE::LXC::parse_id_maps($conf);
$task->{userns_cmd} = PVE::LXC::userns_command($id_map);
+ my $volid_list = [];
PVE::LXC::foreach_mountpoint($conf, sub {
my ($name, $data) = @_;
my $volid = $data->{volume};
@@ -146,8 +147,9 @@ sub prepare {
}
push @$disks, $data;
+ push @$volid_list, $volid
+ if $type eq 'volume';
});
- my $volid_list = [map { $_->{volume} } @$disks];
if ($mode eq 'snapshot') {
if (!PVE::LXC::has_feature('vzdump', $conf, $storage_cfg)) {
@@ -219,6 +221,7 @@ sub snapshot {
if !($conf->{snapshots} && $conf->{snapshots}->{vzdump});
my $disks = $task->{disks};
+ #todo: reevaluate bind/dev mount handling when implementing snapshots for mps
my $volid_list = [map { $_->{volume} } @$disks];
my $rootdir = $default_mount_point;
--
2.1.4
More information about the pve-devel
mailing list