summaryrefslogtreecommitdiff
path: root/udev
diff options
context:
space:
mode:
authorPeter Rajnoha <prajnoha@redhat.com>2013-09-03 16:06:16 +0200
committerPeter Rajnoha <prajnoha@redhat.com>2013-09-03 16:49:21 +0200
commit008c33a21ba0e0fb27319b63c7bad8fb8136f804 (patch)
treee0bc420e5c4a77c040404fcc14d55381995e9109 /udev
parentea1e8166d57c40a5406b68864e19056df6d2f103 (diff)
downloadlvm2-008c33a21ba0e0fb27319b63c7bad8fb8136f804.tar.gz
tools: add -b/--background for pvscan --cache -aay
Udev daemon has recently introduced a limit on the number of udev processes (there was no limit before). This causes a problem when calling pvscan --cache -aay in lvmetad udev rules which is supposed to activate the volumes. This activation is itself synced with udev and so it waits for the activation to complete before the pvscan finishes. The event processing can't continue until this pvscan call is finished. But if we're at the limit with the udev process count, we can't instatiate any more udev processes, all such events are queued and so we can't process the lvm activation event for which the pvscan is waiting. Then we're in a deadlock since the udev process with the pvscan --cache -aay call waits for the lvm activation udev processing to complete, but that will never happen as there's this limit hit with the number of udev processes. The process with pvscan --cache -aay actually times out eventually (3min or 30sec, depends on the version of udev). This patch makes it possible to run the pvscan --cache -aay in the background so the udev processing can continue and hence we can avoid the deadlock mentioned above.
Diffstat (limited to 'udev')
-rw-r--r--udev/69-dm-lvm-metad.rules.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/udev/69-dm-lvm-metad.rules.in b/udev/69-dm-lvm-metad.rules.in
index 2d6720e6a..6162e262f 100644
--- a/udev/69-dm-lvm-metad.rules.in
+++ b/udev/69-dm-lvm-metad.rules.in
@@ -34,6 +34,6 @@ KERNEL!="dm-[0-9]*", ACTION!="add", GOTO="lvm_end"
KERNEL=="dm-[0-9]*", ENV{DM_ACTIVATION}!="1", GOTO="lvm_end"
LABEL="lvm_scan"
-RUN+="(LVM_EXEC)/lvm pvscan --cache --activate ay --major $major --minor $minor"
+RUN+="(LVM_EXEC)/lvm pvscan --background --cache --activate ay --major $major --minor $minor"
LABEL="lvm_end"