#305 Issue closed: different name of the same device.

Labels: enhancement, bug

pavoldomin opened issue at 2013-09-25 13:18:

Hi,

We receive following error during the restore attempt:

No code has been generated to restore device pv:/dev/disk/by-id/cciss-3600508b1001fffffa004f7b3f209000b-part2

The cause is the mismatch of device name in disklayout.conf - the lvmdev and part definition refer to the different names of the same device.

disk /dev/cciss/c0d0 72833679360 msdos
part /dev/cciss/c0d0 205599744 32256 primary boot /dev/cciss/c0d0p1
part /dev/cciss/c0d0 72620997120 205632000 primary lvm /dev/cciss/c0d0p2
lvmdev /dev/vg00 /dev/disk/by-id/cciss-3600508b1001fffffa004f7b3f209000b-part2 7fWwOV-nd4W-G0oA-0SE8-Oy89-NGpH-qHRoN3 141837885

This issue was observed on SLES11 SP3, after we specified

preferred_names = [ "^/dev/disk/by-id/" ]

in lvm.conf.

We can reproduce it with recent 1.15 as well as 1.14 version.

The easy workaround is to edit disklayout.conf manually before the restore.

gdha commented at 2013-09-26 11:35:

@pavoldomin Would be nice to see the logging of a debug session with savelayout... and perhaps the ls -l of the /dev links from the cciss stuff.
@jhoekx do you have am idea if there is an easy way to get around?

jhoekx commented at 2013-09-26 12:19:

There is no easy way around. The get_device_name function should be taught to convert by-id names to the format used for the partitions. We should make sure we call that function when writing the lvmdev line to disklayout.conf.

gdha commented at 2013-09-27 10:05:

@pavoldomin could you attach the log file made by rear -vD savelayout as a gist?

gdha commented at 2013-09-27 11:40:

@pavoldomin could you also paste the content of the file /var/lib/rear/recovery/diskbyid_mappings ?

pavoldomin commented at 2013-10-02 18:11:

Hi, sorry for latency.
/dev/disk/by-id listing, diskbyid_mappings content and logfile are here
https://gist.github.com/pavoldomin/28f883bc35f40ee9e03a

gdha commented at 2013-10-04 11:42:

@pavoldomin Please try out rear-1.15-4.git201310041248.noarch.rpm (download it from http://download.opensuse.org/repositories/Archiving:/Backup:/Rear:/Snapshot/ )

gdha commented at 2013-10-23 06:00:

@pavoldomin Did you get the chance to try it out already?

pavoldomin commented at 2013-11-12 14:28:

Fixed; tested with 1.15-git201310211300


[Export of Github issue for rear/rear.]