diff options
author | Britney Fransen <brfransen@gmail.com> | 2018-03-02 21:20:48 (GMT) |
---|---|---|
committer | Britney Fransen <brfransen@gmail.com> | 2018-03-02 21:20:48 (GMT) |
commit | 84756879f17a8dd9acaca32e7edfee5cdeb2dbb8 (patch) | |
tree | 06cf833781552a4581dd052c405a0e137d0f4f9e /abs/core/lvm2/lvm2_hook | |
parent | d181c75e4e1954f1d892c71d8ff268aecdaab340 (diff) | |
download | linhes_pkgbuild-84756879f17a8dd9acaca32e7edfee5cdeb2dbb8.zip linhes_pkgbuild-84756879f17a8dd9acaca32e7edfee5cdeb2dbb8.tar.gz linhes_pkgbuild-84756879f17a8dd9acaca32e7edfee5cdeb2dbb8.tar.bz2 |
lvm2: update to 2.02.177
Diffstat (limited to 'abs/core/lvm2/lvm2_hook')
-rw-r--r-- | abs/core/lvm2/lvm2_hook | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/abs/core/lvm2/lvm2_hook b/abs/core/lvm2/lvm2_hook index 65de7bd..3c28d67 100644 --- a/abs/core/lvm2/lvm2_hook +++ b/abs/core/lvm2/lvm2_hook @@ -5,6 +5,19 @@ run_earlyhook() { lvmetad } +# We are suffering a race condition in non-systemd initramfs: If lvmetad is +# killed before pvscan processes finish we have stale processes and +# uninitialized physical volumes. So wait for pvscan processes to finish. +# Break after 10 seconds (50*0.2s) to avaid infinite loop. +run_latehook() { + local i=50 + + while pgrep -f pvscan >/dev/null 2>/dev/null && [ $i -gt 0 ]; do + sleep 0.2 + i=$((i - 1)) + done +} + run_cleanuphook() { kill $(cat /run/lvmetad.pid) } |