db-move: moved linux-zen from [testing] to [extra] (x86_64)
[arch-packages.git] / lvm2 / repos / core-x86_64 / 0001-udev-initcpio.patch
blobcd0fb2558c1e010ba8fd976d03895350244f6bb8
1 From d0a716460c389ebf3af034616c507f5e45610ea6 Mon Sep 17 00:00:00 2001
2 From: Christian Hesse <mail@eworm.de>
3 Date: Mon, 7 Feb 2022 21:12:20 +0100
4 Subject: [PATCH 1/1] udev initcpio
6 apply with:
7 patch -Np1 --output='udev/69-dm-lvm-initcpio.rules.in' < ../0001-udev-initcpio.patch
8 ---
9 udev/69-dm-lvm.rules.in | 26 +-------------------------
10 1 file changed, 1 insertion(+), 25 deletions(-)
12 diff --git a/udev/69-dm-lvm.rules.in b/udev/69-dm-lvm.rules.in
13 index ff1568145..1d7737a6f 100644
14 --- a/udev/69-dm-lvm.rules.in
15 +++ b/udev/69-dm-lvm.rules.in
16 @@ -52,31 +52,7 @@ ACTION!="add", GOTO="lvm_end"
18 LABEL="lvm_scan"
20 -# pvscan will check if this device completes a VG,
21 -# i.e. all PVs in the VG are now present with the
22 -# arrival of this PV. If so, it prints to stdout:
23 -# LVM_VG_NAME_COMPLETE='foo'
25 -# When the VG is complete it can be activated, so
26 -# vgchange -aay <vgname> is run. It is run via
27 -# systemd since it can take longer to run than
28 -# udev wants to block when processing rules.
29 -# (if there are hundreds of LVs to activate,
30 -# the vgchange can take many seconds.)
32 -# pvscan only reads the single device specified,
33 -# and uses temp files under /run/lvm to check if
34 -# other PVs in the VG are present.
36 -# If event_activation=0 in lvm.conf, this pvscan
37 -# (using checkcomplete) will do nothing, so that
38 -# no event-based autoactivation will be happen.
40 -# TODO: adjust the output of vgchange -aay so that
41 -# it's better suited to appearing in the journal.
43 -IMPORT{program}="(LVM_EXEC)/lvm pvscan --cache --listvg --checkcomplete --vgonline --autoactivation event --udevoutput --journal=output $env{DEVNAME}"
44 -ENV{LVM_VG_NAME_COMPLETE}=="?*", RUN+="(SYSTEMDRUN) --no-block --property DefaultDependencies=no --unit lvm-activate-$env{LVM_VG_NAME_COMPLETE} (LVM_EXEC)/lvm vgchange -aay --autoactivation event $env{LVM_VG_NAME_COMPLETE}"
45 +RUN+="(LVM_EXEC)/lvm pvscan --background --cache --activate ay --major $major --minor $minor", ENV{LVM_SCANNED}="1"
46 GOTO="lvm_end"
48 LABEL="lvm_end"