[pbs-devel] applied: [PATCH v2 proxmox-backup 2/2] fix #3515: file-restore-daemon: allow LVs/PVs with dash in name
Dietmar Maurer
dietmar at proxmox.com
Tue Jul 13 12:08:54 CEST 2021
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 at 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);
More information about the pbs-devel
mailing list