Skip to content

Commit

Permalink
revert(lvm): remove 69-dm-lvm-metad.rules
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
teigland authored and johannbg committed Feb 2, 2022
1 parent f6f393f commit 50e7466
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions modules.d/90lvm/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,20 +78,7 @@ install() {
unset LVM_SUPPRESS_FD_WARNINGS
fi

inst_rules 11-dm-lvm.rules 69-dm-lvm-metad.rules

# Do not run lvmetad update via pvscan in udev rule - lvmetad is not running yet in dracut!
if [[ -f ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules ]]; then
if grep -q SYSTEMD_WANTS "${initdir}"/lib/udev/rules.d/69-dm-lvm-metad.rules; then
sed -i -e 's/^ENV{SYSTEMD_ALIAS}=.*/# No LVM pvscan in dracut - lvmetad is not running yet/' \
"${initdir}"/lib/udev/rules.d/69-dm-lvm-metad.rules
sed -i -e 's/^ENV{ID_MODEL}=.*//' "${initdir}"/lib/udev/rules.d/69-dm-lvm-metad.rules
sed -i -e 's/^ENV{SYSTEMD_WANTS}+\?=.*//' "${initdir}"/lib/udev/rules.d/69-dm-lvm-metad.rules
else
sed -i -e 's/.*lvm pvscan.*/# No LVM pvscan for in dracut - lvmetad is not running yet/' \
"${initdir}"/lib/udev/rules.d/69-dm-lvm-metad.rules
fi
fi
inst_rules 11-dm-lvm.rules

# Gentoo ebuild for LVM2 prior to 2.02.63-r1 doesn't install above rules
# files, but provides the one below:
Expand Down

0 comments on commit 50e7466

Please sign in to comment.