From: "Dominic Jäger" <d.jaeger@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH container] snapshot creation: only check volumes for fsfreeze
Date: Mon, 23 Nov 2020 11:25:32 +0100 [thread overview]
Message-ID: <20201123102532.GA2145829@mala.proxmox.com> (raw)
In-Reply-To: <20201123101229.18308-1-s.ivanov@proxmox.com>
Fixes the issue for me.
Tested-by: Dominic Jäger <d.jaeger@proxmox.com>
On Mon, Nov 23, 2020 at 11:12:29AM +0100, Stoiko Ivanov wrote:
> 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
>
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
>
next prev parent reply other threads:[~2020-11-23 10:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-23 10:12 Stoiko Ivanov
2020-11-23 10:25 ` Dominic Jäger [this message]
2020-11-23 12:09 ` [pve-devel] applied: " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201123102532.GA2145829@mala.proxmox.com \
--to=d.jaeger@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox