lvm vgscan --mknodes in one session created say /dev/mapper/foo-bar (253,0). If you remove the hard disk containing the physical volume and reboot, lvm vgscan is quite likely to assign (253,0) to a different logical volume in another volume group. If you then reference /dev/mapper/foo-bar, you get whatever random logical volume that happens to have got the same minor device number. device mapper devices should probably be wiped out and re-created during the boot up. Version-Release number of selected component (if applicable): device-mapper-1.00.07-3.1
vgmknodes was intended to clear /dev/mapper, but only 'dmsetup mknodes' actually does this; I'm fixing it.
Err... but what if I were to use device-mapper for purposes other than LVM? If vgmknodes clears /dev/mapper, wouldn't it kill device nodes that I might be using?
'dmsetup mknodes' ensures that /dev/mapper is in sync with the kernel, adding/deleting entries as required. vgmknodes now calls that too. Non-LVM2 entries will be added/deleted from /dev/mapper depending whether or not they're active in the kernel.
Got it. Awesome!
Fixed in release 2.00.09.