lvm2/lvm2-2_02_96-use-pvscan-cache-instead-of-vgscan-in-init-scripts.patch

40 lines
1.3 KiB
Diff

scripts/lvm2_lvmetad_init_red_hat.in | 4 ++--
scripts/lvm2_lvmetad_systemd_red_hat.service.in | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/scripts/lvm2_lvmetad_init_red_hat.in b/scripts/lvm2_lvmetad_init_red_hat.in
index 1e64a6c..886944e 100644
--- a/scripts/lvm2_lvmetad_init_red_hat.in
+++ b/scripts/lvm2_lvmetad_init_red_hat.in
@@ -38,7 +38,7 @@ DAEMON=lvmetad
exec_prefix=@exec_prefix@
sbindir=@sbindir@
-lvm_vgscan=${sbindir}/vgscan
+lvm_pvscan="${sbindir}/lvm pvscan --cache"
LOCK_FILE="/var/lock/subsys/$DAEMON"
PID_FILE="@DEFAULT_RUN_DIR@/${DAEMON}.pid"
@@ -55,7 +55,7 @@ rh_status_q() {
start()
{
ret=0
- action "Starting LVM metadata daemon:" $DAEMON && ${lvm_vgscan} || ret=$?
+ action "Starting LVM metadata daemon:" $DAEMON && ${lvm_pvscan} > /dev/null || ret=$?
return $ret
}
diff --git a/scripts/lvm2_lvmetad_systemd_red_hat.service.in b/scripts/lvm2_lvmetad_systemd_red_hat.service.in
index ec43494..6839c87 100644
--- a/scripts/lvm2_lvmetad_systemd_red_hat.service.in
+++ b/scripts/lvm2_lvmetad_systemd_red_hat.service.in
@@ -9,7 +9,7 @@ Conflicts=shutdown.target
Type=forking
NonBlocking=true
ExecStart=@sbindir@/lvmetad
-ExecStartPost=@sbindir@/vgscan
+ExecStartPost=@sbindir@/lvm pvscan --cache
ExecReload=@sbindir@/lvmetad -R
PIDFile=@DEFAULT_RUN_DIR@/lvmetad.pid