public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH container] snapshot creation: only check volumes for fsfreeze
@ 2020-11-23 10:12 Stoiko Ivanov
  2020-11-23 10:25 ` Dominic Jäger
  2020-11-23 12:09 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 2 replies; 3+ messages in thread
From: Stoiko Ivanov @ 2020-11-23 10:12 UTC (permalink / raw)
  To: pve-devel

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@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





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-11-23 12:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-23 10:12 [pve-devel] [PATCH container] snapshot creation: only check volumes for fsfreeze Stoiko Ivanov
2020-11-23 10:25 ` Dominic Jäger
2020-11-23 12:09 ` [pve-devel] applied: " Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal