Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Custom initram, new lvm2 with udev not booting
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Saundersx
Apprentice
Apprentice


Joined: 11 Apr 2005
Posts: 244

PostPosted: Wed Dec 19, 2018 10:13 pm    Post subject: Custom initram, new lvm2 with udev not booting Reply with quote

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
View user's profile Send private message
Saundersx
Apprentice
Apprentice


Joined: 11 Apr 2005
Posts: 244

PostPosted: Fri Dec 21, 2018 8:27 pm    Post subject: Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 42564
Location: 56N 3W

PostPosted: Fri Dec 21, 2018 9:03 pm    Post subject: Reply with quote

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
View user's profile Send private message
Saundersx
Apprentice
Apprentice


Joined: 11 Apr 2005
Posts: 244

PostPosted: Fri Dec 21, 2018 10:14 pm    Post subject: Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 42564
Location: 56N 3W

PostPosted: Fri Dec 21, 2018 10:42 pm    Post subject: Reply with quote

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
View user's profile Send private message
Saundersx
Apprentice
Apprentice


Joined: 11 Apr 2005
Posts: 244

PostPosted: Sat Dec 22, 2018 4:10 am    Post subject: Reply with quote

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
View user's profile Send private message
brokendreams
n00b
n00b


Joined: 11 Nov 2018
Posts: 11
Location: clinton,ia US

PostPosted: Mon Dec 31, 2018 5:47 pm    Post subject: Reply with quote

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
View user's profile Send private message
marcan
n00b
n00b


Joined: 23 Oct 2006
Posts: 8

PostPosted: Fri Jan 25, 2019 12:39 pm    Post subject: Reply with quote

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
View user's profile Send private message
dwarfjay
n00b
n00b


Joined: 05 Feb 2019
Posts: 1

PostPosted: Tue Feb 05, 2019 12:03 am    Post subject: Reply with quote

I came across this issue and your advice solve my problem. thank you
Back to top
View user's profile Send private message
jmbsvicetto
Moderator
Moderator


Joined: 27 Apr 2005
Posts: 4734
Location: Angra do Heroísmo (PT)

PostPosted: Thu Mar 14, 2019 8:50 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum