Shutdown lvmetad automatically after one hour of inactivity

This commit is contained in:
Peter Rajnoha 2015-11-02 10:40:34 +01:00
parent d975462394
commit b1f7a14d52
2 changed files with 22 additions and 1 deletions

View File

@ -0,0 +1,16 @@
scripts/lvm2_lvmetad_systemd_red_hat.service.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/lvm2_lvmetad_systemd_red_hat.service.in b/scripts/lvm2_lvmetad_systemd_red_hat.service.in
index 8f4c60d..a1cedd2 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
[Service]
Type=simple
NonBlocking=true
-ExecStart=@sbindir@/lvmetad -f
+ExecStart=@sbindir@/lvmetad -f -t 3600
Environment=SD_ACTIVATION=1
Restart=on-abort
PIDFile=@LVMETAD_PIDFILE@

View File

@ -47,13 +47,14 @@
Summary: Userland logical volume management tools Summary: Userland logical volume management tools
Name: lvm2 Name: lvm2
Version: 2.02.133 Version: 2.02.133
Release: 1%{?dist} Release: 2%{?dist}
License: GPLv2 License: GPLv2
Group: System Environment/Base Group: System Environment/Base
URL: http://sources.redhat.com/lvm2 URL: http://sources.redhat.com/lvm2
Source0: ftp://sources.redhat.com/pub/lvm2/releases/LVM2.%{version}.tgz Source0: ftp://sources.redhat.com/pub/lvm2/releases/LVM2.%{version}.tgz
Patch0: lvm2-set-default-preferred_names.patch Patch0: lvm2-set-default-preferred_names.patch
Patch1: lvm2-remove-mpath-device-handling-from-udev-rules.patch Patch1: lvm2-remove-mpath-device-handling-from-udev-rules.patch
Patch2: lvm2-lvmetad-timeout.patch
BuildRequires: libselinux-devel >= %{libselinux_version}, libsepol-devel BuildRequires: libselinux-devel >= %{libselinux_version}, libsepol-devel
BuildRequires: libblkid-devel >= %{util_linux_version} BuildRequires: libblkid-devel >= %{util_linux_version}
@ -103,6 +104,7 @@ or more physical volumes and creating one or more logical volumes
%setup -q -n LVM2.%{version} %setup -q -n LVM2.%{version}
%patch0 -p1 -b .preferred_names %patch0 -p1 -b .preferred_names
%patch1 -p1 -b .udev_no_mpath %patch1 -p1 -b .udev_no_mpath
%patch2 -p1 -b .lvmetad_timeout
%build %build
%define _default_pid_dir /run %define _default_pid_dir /run
@ -791,6 +793,9 @@ the device-mapper event library.
%{_libdir}/pkgconfig/devmapper-event.pc %{_libdir}/pkgconfig/devmapper-event.pc
%changelog %changelog
* Mon Nov 02 2015 Peter Rajnoha <prajnoha@redhat.com> - 2.02.133-2
- Shutdown lvmetad automatically after one hour of inactivity.
* Fri Oct 30 2015 Peter Rajnoha <prajnoha@redhat.com> - 2.02.133-1 * Fri Oct 30 2015 Peter Rajnoha <prajnoha@redhat.com> - 2.02.133-1
- Support repeated -o|--options for reporting commands. - Support repeated -o|--options for reporting commands.
- Support -o- and -o# for reporting commands to remove and compact fields. - Support -o- and -o# for reporting commands to remove and compact fields.