#1550 PR merged
: Remove unecessary /dev prefix¶
Labels: bug
, fixed / solved / done
schabrolles opened issue at 2017-10-26 14:41:¶
150_save_diskbyid_mappings.sh
creates
/var/lib/rear/recovery/diskbyid_mappings
which look like this:
dm-name-36005076802818058480000000000037b /dev/mapper/36005076802818058480000000000037b
dm-name-36005076802818058480000000000037b_part1 /dev/mapper/36005076802818058480000000000037b_part1
dm-name-36005076802818058480000000000037b_part2 /dev/mapper/36005076802818058480000000000037b_part2
dm-name-system-APPOlv /dev/mapper/system-APPOlv
dm-name-system-root /dev/mapper/system-root
dm-name-system-swap /dev/mapper/system-swap
dm-uuid-LVM-14gcW2jEBtAEVeSWDKsobrD0HkqVM3NGBpdCO7Seomr8qvBfefUUZZ2qGl3c665e /dev/mapper/system-root
dm-uuid-LVM-14gcW2jEBtAEVeSWDKsobrD0HkqVM3NGgL4XzRRtjTHbunSy0oLFtvAhCb50F01z /dev/mapper/system-swap
dm-uuid-LVM-14gcW2jEBtAEVeSWDKsobrD0HkqVM3NGjEZqIdr0yocYNog9hDJO56pgYYtycRjc /dev/mapper/system-APPOlv
dm-uuid-mpath-36005076802818058480000000000037b /dev/mapper/36005076802818058480000000000037b
dm-uuid-part1-mpath-36005076802818058480000000000037b /dev/mapper/36005076802818058480000000000037b_part1
dm-uuid-part2-mpath-36005076802818058480000000000037b /dev/mapper/36005076802818058480000000000037b_part2
lvm2-pvuuid-6SALWb-Tgcz-PY43-RRvC-KcEK-SQu0-sK69EF /dev/mapper/36005076802818058480000000000037b_part2
scsi-36005076802818058480000000000037b /dev/mapper/36005076802818058480000000000037b
scsi-36005076802818058480000000000037b-part1 /dev/mapper/36005076802818058480000000000037b_part1
scsi-36005076802818058480000000000037b-part2 /dev/mapper/36005076802818058480000000000037b_part2
wwn-0x6005076802818058480000000000037b /dev/mapper/36005076802818058480000000000037b
wwn-0x6005076802818058480000000000037b-part1 /dev/mapper/36005076802818058480000000000037b_part1
wwn-0x6005076802818058480000000000037b-part2 /dev/mapper/36005076802818058480000000000037b_part2
target device (2nd field) is already prefixes by /dev
, This mean
get_device_mapping()
function should return "$disk_name"
and not
"/dev/$disk_name"
.
schabrolles commented at 2017-10-26 14:43:¶
@jsmeix, @schlomo if you want to have a quick look before I merge this
one.
I got a client which hit this bug when using LVM with pv based on
/dev/disk/by-id
disk.
gdha commented at 2017-10-26 15:05:¶
@schabrolles is this the first time we come across this problem? Is a bit weird, or perhaps, I did not fully understand the issue here (most likely)
schabrolles commented at 2017-10-27 05:44:¶
@gdha, yes it is the first time we got this issue since the change I
made on 150_save_diskbyid_mappings.sh
(#1450 in Aug 2017) to allow
migration of /dev/disk/by-id
devices.
I change the format of diskbyid_mappings
from
virtio-5288ab32-eb78-48ea-9 vda
to
virtio-5288ab32-eb78-48ea-9 /dev/vda
We don't see it before because this issue only appear when LVM volume
group are defined with /dev/disk/by-id
devices instead of real /dev
or /dev/mapper
devices.
It usually happen with sles11, but I don't see it on my lab (my sles11
is using multipath /dev/mapper
or directly /dev/vda
instead of
/dev/disk/by-id
when I use pvs
or pvdisplay
)
[Export of Github issue for rear/rear.]