[pve-devel] [PATCH container] snapshot creation: only check volumes for fsfreeze
Stoiko Ivanov
s.ivanov at proxmox.com
Mon Nov 23 11:12:29 CET 2020
fix #3161
When considering mountpoints for running 'fsfreeze' before snapshot creation,
commit 8463099d99273561c46398bf02206b4d9d431bc5 did not only consider
volumes created by our storage-stack, but also bindmounts and devmounts
(directly mounting a blockdevice).
This led to PVE::Storage::parse_volume_id failing on those mountpoints.
Since the fsfreeze call is best-effort and only run for specific
storageplugins, we can simply skip non-volume mountpoints, when gathering
the list of volumes to call fsfreeze on.
Tested with a container with a bindmount.
Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
---
Sorry for that - will test my container patches with a more complete container
config from now on :/
src/PVE/LXC/Config.pm | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm
index 9834866..db453f8 100644
--- a/src/PVE/LXC/Config.pm
+++ b/src/PVE/LXC/Config.pm
@@ -139,6 +139,8 @@ sub __snapshot_freeze {
$class->foreach_volume($conf, sub {
my ($ms, $mountpoint) = @_;
+ return if $mountpoint->{type} ne 'volume';
+
if (PVE::Storage::volume_snapshot_needs_fsfreeze($storagecfg, $mountpoint->{volume})) {
push @$freeze_mps, $mountpoint->{mp};
}
--
2.20.1
More information about the pve-devel
mailing list