View previous topic :: View next topic |
Author |
Message |
Saundersx Apprentice
Joined: 11 Apr 2005 Posts: 290
|
Posted: Wed Dec 19, 2018 10:13 pm Post subject: Custom initram, new lvm2 with udev not booting |
|
|
The new lvm2-2.02.183 which now incorporates some udev stuff will not work in an initram environment. It basically gives me this endlessly for different drives/partitions
Code: | WARNING: Device /dev/sdXXX not initialized in udev database even after waiting 10000000 microseconds. |
I have tried adding the lvm.conf from the gentoo wiki https://wiki.gentoo.org/wiki/Custom_Initramfs#LVM but it seems to be completely ignored (also added some extra goodies to mine for testing)
Code: | global {
use_lvmetad = 0
}
devices {
obtain_device_list_from_udev = 0
}
activation {
udev_sync = 0
udev_rules = 0
} |
Rolling back to lvm2-2.02.145-r2 fixes it. I would prefer to keep using the new version if possible as it apparently contains a bunch of bugfixes. Any ideas? |
|
Back to top |
|
|
Saundersx Apprentice
Joined: 11 Apr 2005 Posts: 290
|
Posted: Fri Dec 21, 2018 8:27 pm Post subject: |
|
|
I'm getting quite adept at finding issues that seem to affect only me.
In the end I think this is a bug in lvm2 if the page in the Gentoo wiki is correct. The lvm.conf is definitely loaded and subsequently ignored (as "lvm config" shows). In the end the workaround was throwing in a
Code: | USE="-udev" /usr/bin/emerge -1 --quiet-build --quiet-fail --fail-clean --backtrack=0 lvm2 |
into my script. If this isn't fixed by next release I'll file a bug. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54295 Location: 56N 3W
|
Posted: Fri Dec 21, 2018 9:03 pm Post subject: |
|
|
Saundersx,
What use is udev in the initrd?
devtmpfs populates /dev and the initrd all runs as root, so udev setting permissions is not required.
Nothing survives the initrd passing control the the real root filesystem, so /dev permissions don't matter. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Saundersx Apprentice
Joined: 11 Apr 2005 Posts: 290
|
Posted: Fri Dec 21, 2018 10:14 pm Post subject: |
|
|
I'm not following what you mean. No I don't need nor want udev in init. Read the wiki link I posted to see what I'm trying to do. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54295 Location: 56N 3W
|
Posted: Fri Dec 21, 2018 10:42 pm Post subject: |
|
|
Saundersx,
I use usr/gen_init_cpio from the kernel directly. I don't have a lvm.conf but I made my last initrd about a year ago.
My /root/initrd/initramfs_list and the init script may help.
That does root in LVM on top of raid5. / (root) /usr and /var are all separate logical volumes.
Provided devtmpfs gets mounted on /dev, either with the kernel option or an init script line, /dev is populated for you. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Saundersx Apprentice
Joined: 11 Apr 2005 Posts: 290
|
Posted: Sat Dec 22, 2018 4:10 am Post subject: |
|
|
Yeah mines pretty similar, just throw encryption in the mix. I may do what you have in your script down the road if lvm doesn't get fixed. |
|
Back to top |
|
|
brokendreams n00b
Joined: 11 Nov 2018 Posts: 22 Location: clinton,ia US
|
Posted: Mon Dec 31, 2018 5:47 pm Post subject: |
|
|
I dont know exactly where the issue stems from but i dealt with this error too. I didn't see it until udev was upgraded to 240. A downgrade to udev-239 fixed it or so i thought. Once i installed an older version of udisks (1.5x) it came back. So i disabled the udev flag on sys-fs/lvm2 and rebuilt. Error disappeared completely again. So try disabling udev on sys-fs/lvm2. I still have other problems with wirh udev-240 that im tracking down too...most notably no keyboard on the console. So id prob stay away from that udev version as well. |
|
Back to top |
|
|
marcan n00b
Joined: 23 Oct 2006 Posts: 8
|
Posted: Fri Jan 25, 2019 12:39 pm Post subject: |
|
|
Throw this in /etc/lvm/lvm.conf (in your initramfs)
Code: | devices {
multipath_component_detection = 0
md_component_detection = 0
}
|
Yeah, this is horribly non-discoverable. I just spent 45 minutes figuring this out. |
|
Back to top |
|
|
dwarfjay n00b
Joined: 05 Feb 2019 Posts: 1
|
Posted: Tue Feb 05, 2019 12:03 am Post subject: |
|
|
I came across this issue and your advice solve my problem. thank you |
|
Back to top |
|
|
jmbsvicetto Moderator
Joined: 27 Apr 2005 Posts: 4734 Location: Angra do Heroísmo (PT)
|
Posted: Thu Mar 14, 2019 8:50 pm Post subject: |
|
|
marcan wrote: | Throw this in /etc/lvm/lvm.conf (in your initramfs)
Code: | devices {
multipath_component_detection = 0
md_component_detection = 0
}
|
Yeah, this is horribly non-discoverable. I just spent 45 minutes figuring this out. |
Thanks, this had been preventing me from updating my kernel from 4.19.6 on as I had failed to realize the issue was with lvm2. _________________ Jorge.
Your twisted, but hopefully friendly daemon.
AMD64 / x86 / Sparc Gentoo
Help answer || emwrap.sh
|
|
Back to top |
|
|
equus n00b
Joined: 16 Jan 2005 Posts: 9
|
Posted: Wed May 01, 2019 7:13 am Post subject: Works with lvm2-2.02.183 |
|
|
Thanks marcan,
I used your tip to modify my initramfs init script as follows :
Code: |
lvm2_config="
global{
use_lvmetad = 0
}
devices{
multipath_component_detection = 0
md_component_detection = 0
}"
echo "Activating root volume $rootLV..."
/sbin/lvm lvchange --sysinit --config "$lvm2_config" -ay $rootLV || rescue_shell
echo "Creating all partition nodes..."
/sbin/lvm vgscan --config "$lvm2_config" --mknodes || rescue_shell
|
My configuration is lvm/dmcrypt/mdraid. |
|
Back to top |
|
|
|