From: Dietmar Maurer <dietmar@proxmox.com>
To: Proxmox Backup Server development discussion
<pbs-devel@lists.proxmox.com>,
Stefan Reiter <s.reiter@proxmox.com>
Subject: [pbs-devel] applied: [PATCH v2 proxmox-backup 2/2] fix #3515: file-restore-daemon: allow LVs/PVs with dash in name
Date: Tue, 13 Jul 2021 12:08:54 +0200 [thread overview]
Message-ID: <284ff0be-267c-a073-36db-de022b994043@proxmox.com> (raw)
In-Reply-To: <20210713092321.597180-2-s.reiter@proxmox.com>
applied
On 7/13/21 11:23 AM, Stefan Reiter wrote:
> LVM replaces any dashes '-' in an LV or PV name with two '--' for the
> created device node in /dev/mapper/ to distinguish the seperating
> character between the PV and LV name.
>
> Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
> ---
>
> v2: replace in VG name too of course... as usual realized that right after
> sending v1
>
> src/bin/proxmox_restore_daemon/disk.rs | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/src/bin/proxmox_restore_daemon/disk.rs b/src/bin/proxmox_restore_daemon/disk.rs
> index 1bcfc798..57ca8d7c 100644
> --- a/src/bin/proxmox_restore_daemon/disk.rs
> +++ b/src/bin/proxmox_restore_daemon/disk.rs
> @@ -308,7 +308,11 @@ impl Filesystems {
> let mntpath = format!("/mnt/lvm/{}/{}", &data.vg_name, &data.lv_name);
> create_dir_all(&mntpath)?;
>
> - let mapper_path = format!("/dev/mapper/{}-{}", &data.vg_name, &data.lv_name);
> + let mapper_path = format!(
> + "/dev/mapper/{}-{}",
> + &data.vg_name.replace('-', "--"),
> + &data.lv_name.replace('-', "--")
> + );
> self.try_mount(&mapper_path, &mntpath)?;
>
> let mp = PathBuf::from(mntpath);
next prev parent reply other threads:[~2021-07-13 10:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-13 9:23 [pbs-devel] [PATCH v2 proxmox-backup 1/2] file-restore: increase lock timeout on QEMU map Stefan Reiter
2021-07-13 9:23 ` [pbs-devel] [PATCH v2 proxmox-backup 2/2] fix #3515: file-restore-daemon: allow LVs/PVs with dash in name Stefan Reiter
2021-07-13 10:08 ` Dietmar Maurer [this message]
2021-07-13 10:08 ` [pbs-devel] applied: [PATCH v2 proxmox-backup 1/2] file-restore: increase lock timeout on QEMU map Dietmar Maurer
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=284ff0be-267c-a073-36db-de022b994043@proxmox.com \
--to=dietmar@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
--cc=s.reiter@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