New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(#2037955) improve lvm module #22
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The feature of managing lvm snapshots has no known recent usage. It is unknown if it works. The lvm developers do not wish to maintain or support it. (cherry picked from commit 1549d5e) Resolves: #2037955
Remove support for modifying use_lvmetad and locking_type settings in lvm.conf for lvm versions 2.2.*. Recent lvm versions (2.3.*) do not include lvmetad or locking_type. This cleanup simplifies code maintenance. To use the lvm module with older versions (2.2), a user would need to ensure that lvmetad settings are disabled in the initrd's lvm.conf rather than relying on the lvm dracut mode to modify their lvm.conf. (cherry picked from commit f6f393f) Resolves: #2037955
This udev rule runs pvscan to autoactivate VGs, which dracut does not want to do, and previously disabled by editing the rule file and commenting out lines. This also stops /dev/disk/by-id/lvm-pv-uuid-* symlinks from being created in the initrd. (cherry picked from commit 50e7466) Resolves: #2037955
The --partial option will activate a linear (or other) LV without segments for missing devices, which is unlikely to be useful. The intention was to activate raid LVs in a useful form while missing devices, which is specified with the option --activationmode degraded. (cherry picked from commit 97543cc) Resolves: #2037955
Drop checking for options that have been available for at least ten years. This simplifies code maintenance. Add the new --nohints option (when available) to disable the use of hints which is not useful during startup. (cherry picked from commit c0a54f2) Resolves: #2037955
Previously, the lvm device filter generated by dracut would not be used if any lvm.conf file existed in the initrd. Change this so that the generated filter will be used when the included lvm.conf has no filter set. (cherry picked from commit 7ffc5e3) Resolves: #2037955
Change the command listing LVs from lvscan to lvs, and list only the LV names that are being activated. Before attempting to activate an LV, check that that LV name appears in the lvs command output. This avoids wasting time running an lvchange command that we know will fail. (cherry picked from commit 1af4674) Resolves: #2037955
The 69-dm-lvm-metad.rules udev rule has been removed from the initrd, because it's been dropped by recent upstream lvm versions, and it never performed any primary function within the initrd. But, it did have the job of setting LVM_MD_PV_ACTIVATED=1 for active md devices used by PVs. That step needs to be restored, and is now included in 64-lvm.rules. (cherry picked from commit 164e5eb) Resolves: #2037955
pvalena
approved these changes
Feb 15, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
[exception pending] |
pvalena
pushed a commit
to pvalena/dracut-rhel9
that referenced
this pull request
Nov 14, 2023
in install_dependent_modules we use &path[kerneldirlen] as the key for inserting, let's do the same for checking. otherwise installing kernel module has circular dependency from a custom kernel module directory will cause infinite recursion and segfault. $ grep ipmi kbuilt/lib/modules/5.10.121/modules.dep kernel/drivers/char/ipmi/ipmi_msghandler.ko: kernel/drivers/char/ipmi/ipmi_devintf.ko: kernel/drivers/char/ipmi/ipmi_msghandler.ko $ grep ipmi kbuilt/lib/modules/5.10.121/modules.softdep softdep ipmi_msghandler post: ipmi_devintf $ ./dracut-install -D /tmp --kerneldir ~/working/kernel/linux-5.10.121/kbuilt/lib/modules/5.10.121 -m ipmi-devintf Segmentation fault (core dumped) (gdb) b install_dependent_modules Breakpoint 1 at 0x7db0: file src/install/dracut-install.c, line 1513. (gdb) bt #0 install_dependent_modules (modlist=0x0) at src/install/dracut-install.c:1513 #1 0x000055555555c027 in install_dependent_modules (modlist=modlist@entry=0x555555579e90) at src/install/dracut-install.c:1553 #2 0x000055555555bf1c in install_dependent_modules (modlist=0x5555555799d0) at src/install/dracut-install.c:1548 redhat-plumbers#3 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555557a3f0) at src/install/dracut-install.c:1554 redhat-plumbers#4 0x000055555555bf1c in install_dependent_modules (modlist=0x555555579d60) at src/install/dracut-install.c:1548 redhat-plumbers#5 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555557b170) at src/install/dracut-install.c:1554 redhat-plumbers#6 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557a0f0) at src/install/dracut-install.c:1548 redhat-plumbers#7 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x555555575320) at src/install/dracut-install.c:1554 redhat-plumbers#8 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557ab30) at src/install/dracut-install.c:1548 redhat-plumbers#9 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555557dd60) at src/install/dracut-install.c:1554 redhat-plumbers#10 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557b640) at src/install/dracut-install.c:1548 redhat-plumbers#11 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555557e0f0) at src/install/dracut-install.c:1554 redhat-plumbers#12 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557b9d0) at src/install/dracut-install.c:1548 redhat-plumbers#13 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x555555574340) at src/install/dracut-install.c:1554 redhat-plumbers#14 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557cf70) at src/install/dracut-install.c:1548 redhat-plumbers#15 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x5555555768d0) at src/install/dracut-install.c:1554 redhat-plumbers#16 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557d750) at src/install/dracut-install.c:1548 redhat-plumbers#17 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555557e700) at src/install/dracut-install.c:1554 redhat-plumbers#18 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557de90) at src/install/dracut-install.c:1548 redhat-plumbers#19 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x555555581c90) at src/install/dracut-install.c:1554 redhat-plumbers#20 0x000055555555bf1c in install_dependent_modules (modlist=0x555555571e60) at src/install/dracut-install.c:1548 redhat-plumbers#21 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555556b620) at src/install/dracut-install.c:1554 redhat-plumbers#22 0x000055555555bf1c in install_dependent_modules (modlist=0x555555583000) at src/install/dracut-install.c:1548 redhat-plumbers#23 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555556b640) at src/install/dracut-install.c:1554 redhat-plumbers#24 0x000055555555bf1c in install_dependent_modules (modlist=0x555555571b40) at src/install/dracut-install.c:1548 redhat-plumbers#25 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x555555574100) at src/install/dracut-install.c:1554 redhat-plumbers#26 0x000055555555c4b0 in install_module (mod=mod@entry=0x555555573bc0) at src/install/dracut-install.c:1617 redhat-plumbers#27 0x000055555555c93d in install_modules (argc=argc@entry=1, argv=argv@entry=0x7fffffffd6e0) at src/install/dracut-install.c:1952 redhat-plumbers#28 0x000055555555862a in main (argc=<optimized out>, argv=0x7fffffffd6a8) at src/install/dracut-install.c:2090 Signed-off-by: runsisi <runsisi@hust.edu.cn>
pvalena
pushed a commit
to pvalena/dracut-rhel9
that referenced
this pull request
Nov 15, 2023
in install_dependent_modules we use &path[kerneldirlen] as the key for inserting, let's do the same for checking. otherwise installing kernel module has circular dependency from a custom kernel module directory will cause infinite recursion and segfault. $ grep ipmi kbuilt/lib/modules/5.10.121/modules.dep kernel/drivers/char/ipmi/ipmi_msghandler.ko: kernel/drivers/char/ipmi/ipmi_devintf.ko: kernel/drivers/char/ipmi/ipmi_msghandler.ko $ grep ipmi kbuilt/lib/modules/5.10.121/modules.softdep softdep ipmi_msghandler post: ipmi_devintf $ ./dracut-install -D /tmp --kerneldir ~/working/kernel/linux-5.10.121/kbuilt/lib/modules/5.10.121 -m ipmi-devintf Segmentation fault (core dumped) (gdb) b install_dependent_modules Breakpoint 1 at 0x7db0: file src/install/dracut-install.c, line 1513. (gdb) bt #0 install_dependent_modules (modlist=0x0) at src/install/dracut-install.c:1513 #1 0x000055555555c027 in install_dependent_modules (modlist=modlist@entry=0x555555579e90) at src/install/dracut-install.c:1553 #2 0x000055555555bf1c in install_dependent_modules (modlist=0x5555555799d0) at src/install/dracut-install.c:1548 redhat-plumbers#3 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555557a3f0) at src/install/dracut-install.c:1554 redhat-plumbers#4 0x000055555555bf1c in install_dependent_modules (modlist=0x555555579d60) at src/install/dracut-install.c:1548 redhat-plumbers#5 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555557b170) at src/install/dracut-install.c:1554 redhat-plumbers#6 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557a0f0) at src/install/dracut-install.c:1548 redhat-plumbers#7 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x555555575320) at src/install/dracut-install.c:1554 redhat-plumbers#8 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557ab30) at src/install/dracut-install.c:1548 redhat-plumbers#9 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555557dd60) at src/install/dracut-install.c:1554 redhat-plumbers#10 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557b640) at src/install/dracut-install.c:1548 redhat-plumbers#11 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555557e0f0) at src/install/dracut-install.c:1554 redhat-plumbers#12 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557b9d0) at src/install/dracut-install.c:1548 redhat-plumbers#13 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x555555574340) at src/install/dracut-install.c:1554 redhat-plumbers#14 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557cf70) at src/install/dracut-install.c:1548 redhat-plumbers#15 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x5555555768d0) at src/install/dracut-install.c:1554 redhat-plumbers#16 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557d750) at src/install/dracut-install.c:1548 redhat-plumbers#17 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555557e700) at src/install/dracut-install.c:1554 redhat-plumbers#18 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557de90) at src/install/dracut-install.c:1548 redhat-plumbers#19 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x555555581c90) at src/install/dracut-install.c:1554 redhat-plumbers#20 0x000055555555bf1c in install_dependent_modules (modlist=0x555555571e60) at src/install/dracut-install.c:1548 redhat-plumbers#21 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555556b620) at src/install/dracut-install.c:1554 redhat-plumbers#22 0x000055555555bf1c in install_dependent_modules (modlist=0x555555583000) at src/install/dracut-install.c:1548 redhat-plumbers#23 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555556b640) at src/install/dracut-install.c:1554 redhat-plumbers#24 0x000055555555bf1c in install_dependent_modules (modlist=0x555555571b40) at src/install/dracut-install.c:1548 redhat-plumbers#25 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x555555574100) at src/install/dracut-install.c:1554 redhat-plumbers#26 0x000055555555c4b0 in install_module (mod=mod@entry=0x555555573bc0) at src/install/dracut-install.c:1617 redhat-plumbers#27 0x000055555555c93d in install_modules (argc=argc@entry=1, argv=argv@entry=0x7fffffffd6e0) at src/install/dracut-install.c:1952 redhat-plumbers#28 0x000055555555862a in main (argc=<optimized out>, argv=0x7fffffffd6a8) at src/install/dracut-install.c:2090 Signed-off-by: runsisi <runsisi@hust.edu.cn> (Cherry-picked commit: 7bb1f64b972586d86d82fcb23de4b979eab0ddfe) Resolves: RHEL-15821
pvalena
pushed a commit
that referenced
this pull request
Dec 14, 2023
in install_dependent_modules we use &path[kerneldirlen] as the key for inserting, let's do the same for checking. otherwise installing kernel module has circular dependency from a custom kernel module directory will cause infinite recursion and segfault. $ grep ipmi kbuilt/lib/modules/5.10.121/modules.dep kernel/drivers/char/ipmi/ipmi_msghandler.ko: kernel/drivers/char/ipmi/ipmi_devintf.ko: kernel/drivers/char/ipmi/ipmi_msghandler.ko $ grep ipmi kbuilt/lib/modules/5.10.121/modules.softdep softdep ipmi_msghandler post: ipmi_devintf $ ./dracut-install -D /tmp --kerneldir ~/working/kernel/linux-5.10.121/kbuilt/lib/modules/5.10.121 -m ipmi-devintf Segmentation fault (core dumped) (gdb) b install_dependent_modules Breakpoint 1 at 0x7db0: file src/install/dracut-install.c, line 1513. (gdb) bt #0 install_dependent_modules (modlist=0x0) at src/install/dracut-install.c:1513 #1 0x000055555555c027 in install_dependent_modules (modlist=modlist@entry=0x555555579e90) at src/install/dracut-install.c:1553 #2 0x000055555555bf1c in install_dependent_modules (modlist=0x5555555799d0) at src/install/dracut-install.c:1548 #3 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555557a3f0) at src/install/dracut-install.c:1554 #4 0x000055555555bf1c in install_dependent_modules (modlist=0x555555579d60) at src/install/dracut-install.c:1548 #5 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555557b170) at src/install/dracut-install.c:1554 #6 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557a0f0) at src/install/dracut-install.c:1548 #7 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x555555575320) at src/install/dracut-install.c:1554 #8 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557ab30) at src/install/dracut-install.c:1548 #9 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555557dd60) at src/install/dracut-install.c:1554 #10 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557b640) at src/install/dracut-install.c:1548 #11 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555557e0f0) at src/install/dracut-install.c:1554 #12 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557b9d0) at src/install/dracut-install.c:1548 #13 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x555555574340) at src/install/dracut-install.c:1554 #14 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557cf70) at src/install/dracut-install.c:1548 #15 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x5555555768d0) at src/install/dracut-install.c:1554 #16 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557d750) at src/install/dracut-install.c:1548 #17 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555557e700) at src/install/dracut-install.c:1554 #18 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557de90) at src/install/dracut-install.c:1548 #19 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x555555581c90) at src/install/dracut-install.c:1554 #20 0x000055555555bf1c in install_dependent_modules (modlist=0x555555571e60) at src/install/dracut-install.c:1548 #21 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555556b620) at src/install/dracut-install.c:1554 #22 0x000055555555bf1c in install_dependent_modules (modlist=0x555555583000) at src/install/dracut-install.c:1548 #23 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555556b640) at src/install/dracut-install.c:1554 #24 0x000055555555bf1c in install_dependent_modules (modlist=0x555555571b40) at src/install/dracut-install.c:1548 #25 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x555555574100) at src/install/dracut-install.c:1554 #26 0x000055555555c4b0 in install_module (mod=mod@entry=0x555555573bc0) at src/install/dracut-install.c:1617 #27 0x000055555555c93d in install_modules (argc=argc@entry=1, argv=argv@entry=0x7fffffffd6e0) at src/install/dracut-install.c:1952 #28 0x000055555555862a in main (argc=<optimized out>, argv=0x7fffffffd6a8) at src/install/dracut-install.c:2090 Signed-off-by: runsisi <runsisi@hust.edu.cn> (Cherry-picked commit: 7bb1f64b972586d86d82fcb23de4b979eab0ddfe) Resolves: RHEL-15821
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.