[pve-devel] [PATCH v2 container 6/6] don't allow automatic restore to dev/bind rootfs
Fabian Grünbichler
f.gruenbichler at proxmox.com
Mon May 30 14:40:24 CEST 2016
we cannot delay the rootfs, but we also don't want
to automatically restore to a device or bind mount
because that might destroy existing data..
only allow this when explicitly requested via -rootfs
---
src/PVE/API2/LXC.pm | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm
index 3a04fa5..9e7bef0 100644
--- a/src/PVE/API2/LXC.pm
+++ b/src/PVE/API2/LXC.pm
@@ -336,6 +336,9 @@ __PACKAGE__->register_method({
$mp_param->{$ms} = PVE::LXC::Config->print_ct_mountpoint($mountpoint, $ms eq 'rootfs');
} else {
my $type = $mountpoint->{type};
+ die "restoring rootfs to $type mount is only possible by specifying -rootfs manually!\n"
+ if ($ms eq 'rootfs');
+
if ($mountpoint->{backup}) {
warn "WARNING - unsupported configuration!\n";
warn "backup was enabled for $type mountpoint $ms ('$mountpoint->{mp}')\n";
--
2.1.4
More information about the pve-devel
mailing list