1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

udev vgchange: skip hints and keep transient service record

Using hints with vgchange in the udev rule is not helpful because
repeated pvscans during startup are constantly invalidating hints.

Use -r with systemd-run so that the transient service used to
run vgchange remains visible and can be inspected.

(cherry picked from commit 7b87ffce2a5d635fb10bde3477847339b0ebb776)
This commit is contained in:
David Teigland 2021-07-22 13:27:35 -05:00 committed by Marian Csontos
parent 9c9a6575f0
commit 4317c2a18a

View File

@ -80,7 +80,7 @@ ENV{SYSTEMD_READY}="1"
# it's better suited to appearing in the journal.
IMPORT{program}="(LVM_EXEC)/lvm pvscan --cache --listvg --checkcomplete --vgonline --udevoutput --journal=output $env{DEVNAME}"
ENV{LVM_VG_NAME_COMPLETE}=="?*", RUN+="/usr/bin/systemd-run --no-block --property DefaultDependencies=no --unit lvm-activate-$env{LVM_VG_NAME_COMPLETE} lvm vgchange -aay $env{LVM_VG_NAME_COMPLETE}"
ENV{LVM_VG_NAME_COMPLETE}=="?*", RUN+="/usr/bin/systemd-run -r --no-block --property DefaultDependencies=no --unit lvm-activate-$env{LVM_VG_NAME_COMPLETE} lvm vgchange -aay --config devices/hints=none $env{LVM_VG_NAME_COMPLETE}"
GOTO="lvm_end"
LABEL="lvm_end"