Reinstate cmirror support and fixes for lvmetad udev rules/init scripts.
This commit is contained in:
parent
9e11a2ef6b
commit
86f493e916
@ -0,0 +1,21 @@
|
||||
udev/69-dm-lvm-metad.rules | 7 ++++++-
|
||||
1 files changed, 6 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/udev/69-dm-lvm-metad.rules b/udev/69-dm-lvm-metad.rules
|
||||
index d6e4169..d272e6e 100644
|
||||
--- a/udev/69-dm-lvm-metad.rules
|
||||
+++ b/udev/69-dm-lvm-metad.rules
|
||||
@@ -19,7 +19,12 @@ SUBSYSTEM!="block", GOTO="lvm_end"
|
||||
# Device-mapper devices are processed only on change event or on supported synthesized event.
|
||||
KERNEL=="dm-[0-9]*", ENV{DM_UDEV_RULES_VSN}!="?*", GOTO="lvm_end"
|
||||
|
||||
+# Set proper sbin path, /sbin has higher priority than /usr/sbin.
|
||||
+ENV{LVM_SBIN_PATH}="/sbin"
|
||||
+TEST!="$env{LVM_SBIN_PATH}/lvm", ENV{LVM_SBIN_PATH}="/usr/sbin"
|
||||
+TEST!="$env{LVM_SBIN_PATH}/lvm", GOTO="lvm_end"
|
||||
+
|
||||
# Only process devices already marked as a PV - this requires blkid to be called before.
|
||||
-ENV{ID_FS_TYPE}=="LVM2_member|LVM1_member", RUN+="$env{DM_SBIN_PATH}/pvscan --cache --major $major --minor $minor"
|
||||
+ENV{ID_FS_TYPE}=="LVM2_member|LVM1_member", RUN+="$env{LVM_SBIN_PATH}/lvm pvscan --cache --major $major --minor $minor"
|
||||
|
||||
LABEL="lvm_end"
|
@ -0,0 +1,39 @@
|
||||
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
|
||||
|
13
lvm2.spec
13
lvm2.spec
@ -30,7 +30,7 @@
|
||||
%define udev_version 158-1
|
||||
%else
|
||||
%define enable_systemd 1
|
||||
%define enable_cmirror 0
|
||||
%define enable_cmirror 1
|
||||
%define udev_version 176-1
|
||||
%define enable_thin 1
|
||||
%define enable_openais 0
|
||||
@ -68,12 +68,14 @@
|
||||
Summary: Userland logical volume management tools
|
||||
Name: lvm2
|
||||
Version: 2.02.95
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
License: GPLv2
|
||||
Group: System Environment/Base
|
||||
URL: http://sources.redhat.com/lvm2
|
||||
Source0: ftp://sources.redhat.com/pub/lvm2/LVM2.%{version}.tgz
|
||||
Patch0: lvm2-set-default-preferred_names.patch
|
||||
Patch1: lvm2-2_02_96-detect-lvm-binary-path-in-lvmetad-udev-rules.patch
|
||||
Patch2: lvm2-2_02_96-use-pvscan-cache-instead-of-vgscan-in-init-scripts.patch
|
||||
|
||||
BuildRequires: libselinux-devel >= 1.30.19-4, libsepol-devel
|
||||
BuildRequires: ncurses-devel
|
||||
@ -117,6 +119,8 @@ or more physical volumes and creating one or more logical volumes
|
||||
%prep
|
||||
%setup -q -n LVM2.%{version}
|
||||
%patch0 -p1 -b preferred_names
|
||||
%patch1 -p1 -b .lvm_path
|
||||
%patch2 -p1 -b .pvscan_cache
|
||||
|
||||
%build
|
||||
%define _exec_prefix ""
|
||||
@ -659,6 +663,11 @@ the device-mapper event library.
|
||||
/usr%{_libdir}/pkgconfig/devmapper-event.pc
|
||||
|
||||
%changelog
|
||||
* Mon Mar 19 2012 Peter Rajnoha <prajnoha@redhat.com> - 2.02.95-4
|
||||
- Reinstate cmirror support.
|
||||
- Detect lvm binary path in lvmetad udev rules.
|
||||
- Use pvscan --cache instead of vgscan in systemd units/init scripts.
|
||||
|
||||
* Fri Mar 16 2012 Fabio M. Di Nitto <fdinitto@redhat.com> - 2.02.95-3
|
||||
- Rebuild against new corosync (soname change).
|
||||
- BuildRequires and Requires on newer version of corosync.
|
||||
|
Loading…
Reference in New Issue
Block a user