[SOLVED] CURRENT: LVM/CRYPTSETUP duplicate devices in /dev/mapper again.
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
CURRENT: LVM/CRYPTSETUP duplicate devices in /dev/mapper again.
We had this problem a while back but it went away with whatever updates lvm/cryptsetup have been through, but it's back again as of the latest update.
Instead of symlinks to the /dev/dm-* devices, lvm and cryptsetup are both creating duplicate device nodes under /dev/mapper for already existing devices.
e.g.
Code:
gazl@slack:~$ ls -l /dev/mapper
total 0
crw------- 1 root root 10, 61 Jan 23 16:48 control
brw-rw-r-- 1 root disk 253, 0 Jan 23 16:48 lukssda5
brw-rw-r-- 1 root disk 253, 9 Jan 23 16:48 rootvg-lvhome
brw-rw-r-- 1 root disk 253, 10 Jan 23 16:48 rootvg-lvlocal
brw-rw-r-- 1 root disk 253, 6 Jan 23 16:48 rootvg-lvroot
brw-rw-r-- 1 root disk 253, 8 Jan 23 16:48 rootvg-lvtmp
brw-rw-r-- 1 root disk 253, 7 Jan 23 16:48 rootvg-lvvar
brw-rw-r-- 1 root disk 253, 4 Jan 23 16:48 vgsys14-lvhome
brw-rw-r-- 1 root disk 253, 1 Jan 23 16:48 vgsys14-lvroot
brw-rw-r-- 1 root disk 253, 2 Jan 23 16:48 vgsys14-lvswap01
brw-rw-r-- 1 root disk 253, 5 Jan 23 16:48 vgsys14-lvtmp
brw-rw-r-- 1 root disk 253, 3 Jan 23 16:48 vgsys14-lvvar
gazl@slack:~$ ls -l /dev/dm-*
brw-rw---- 1 root disk 253, 0 Jan 23 16:48 /dev/dm-0
brw-rw---- 1 root disk 253, 1 Jan 23 16:48 /dev/dm-1
brw-rw---- 1 root disk 253, 10 Jan 23 16:48 /dev/dm-10
brw-rw---- 1 root disk 253, 2 Jan 23 16:48 /dev/dm-2
brw-rw---- 1 root disk 253, 3 Jan 23 16:48 /dev/dm-3
brw-rw---- 1 root disk 253, 4 Jan 23 16:48 /dev/dm-4
brw-rw---- 1 root disk 253, 5 Jan 23 16:48 /dev/dm-5
brw-rw---- 1 root disk 253, 6 Jan 23 16:48 /dev/dm-6
brw-rw---- 1 root disk 253, 7 Jan 23 16:48 /dev/dm-7
brw-rw---- 1 root disk 253, 8 Jan 23 16:48 /dev/dm-8
brw-rw---- 1 root disk 253, 9 Jan 23 16:48 /dev/dm-9
Tried reverting latest udev, doesn't seem to be the issue.
Tried reverting lvm to 79-1 but it's still the same.
It looks like this might date back a little further than the latest set of updates and I just hadn't noticed.
I don't have any packages going any further back that this so I can't test any older ones.
It's a big WTF moment, right? It happened to me, too ...
So what's the problem? In fact, /dev filesystem is started early into initrd and moved to real /dev. If the initrd utilities are not the same as into system, is going right into these duplicate devices, some times.
My advice is to use udev option in the initrd and regenerate it, if you upgrade your sensitive packages, into the system (LVM, cryptsetup, mdadm).
I'd already rebuilt my initrd, so the versions should all have been in sync, but on your suggestion I've added the -u option to the mkinitrd command (although I was under the impression that the initrd already used udev/devtmpfs by defaut?) and the luks entry under /dev/mapper is now back to a symlink but it didn't change the devices for the lvm logical volumes. Also, I now get a bunch of "semop failed for cookie" messages during the cryptsetup unlock which is a little worrying.
I'd already rebuilt my initrd, so the versions should all have been in sync, but on your suggestion I've added the -u option to the mkinitrd command (although I was under the impression that the initrd already used udev/devtmpfs by defaut?) and the luks entry under /dev/mapper is now back to a symlink but it didn't change the devices for the lvm logical volumes. Also, I now get a bunch of "semop failed for cookie" messages during the cryptsetup unlock which is a little worrying.
Won't help (lvm is also affected so cryptsetup is just a victim), This looks to be a device-mapper/udev interaction type scenario to me. Perhaps going back to udev-164 might sort it. I'll investigate a little more when I have the time.
Just got to the bottom of this. Turned out to be a sneaky one...
udevd is being killed by the initrd's init script before it's finished processing all the lvm events.
Potential fix mailed to Pat.
Still getting the semop failed message from cryptsetup, but it doesn't appear to be fatal and I think it's unrelated.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.