fix #3515: file-restore-daemon: allow LVs/PVs with dash in name
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>
This commit is contained in:
parent
66501529a2
commit
d9822cd3cb
@ -308,7 +308,11 @@ impl Filesystems {
|
|||||||
let mntpath = format!("/mnt/lvm/{}/{}", &data.vg_name, &data.lv_name);
|
let mntpath = format!("/mnt/lvm/{}/{}", &data.vg_name, &data.lv_name);
|
||||||
create_dir_all(&mntpath)?;
|
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)?;
|
self.try_mount(&mapper_path, &mntpath)?;
|
||||||
|
|
||||||
let mp = PathBuf::from(mntpath);
|
let mp = PathBuf::from(mntpath);
|
||||||
|
Loading…
Reference in New Issue
Block a user