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
improve lvm module #1673
improve lvm module #1673
Conversation
@teigland your PR is failing the shell linter in quite few places. Have a look at the detail section of the linter check. |
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.
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.
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.
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.
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.
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.
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.
Hi, I'm uncertain about the lint recommendation to use quotes around $scan_args and $LVs here: LVSLIST=$(lvm lvs $scan_args --noheading -o lv_full_name,segtype $LVS) When I tried adding quotes around that $scan_args, it produced a command with single quotes around the value, which I couldn't figure out. So, in my updated branch I'm going to try adding # shellcheck disable=SC2086 prior to that line, since that seems to be how other similar instances are handled. If there's a better solution please let me know. Thanks |
23aaa41
to
e966cda
Compare
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.
This issue is being marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. If this is still an issue in the latest release of Dracut and you would like to keep it open please comment on this issue within the next 7 days. Thank you for your contributions. |
Changes
This series makes various updates to the lvm module:
Checklist
Fixes #