master - cleanup: clarify man pages about lvchange/vgchange -aay, use -aay in lvm2-cluster-activation script
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=1a5062c9a7136f...
Commit: 1a5062c9a7136f93a00b998ff0de1a32bb347b5f
Parent: a092cd33be13229b288ab44fb39e410c1ca57175
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Tue Feb 11 13:48:04 2014 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Tue Feb 11 13:48:04 2014 +0100
cleanup: clarify man pages about lvchange/vgchange -aay, use -aay in lvm2-cluster-activation script
---
WHATS_NEW | 2 +-
man/lvchange.8.in | 5 +++--
man/vgchange.8.in | 7 ++++---
scripts/lvm2_cluster_activation_red_hat.sh.in | 4 +++-
4 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index c5bb6de..918123f 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,6 +1,6 @@
Version 2.02.106 -
====================================
- Add systemd native service for clvmd, cmirrord and cluster activation.
+ Add systemd native service for clvmd, cmirrord and clustered LV activation.
Remove ExecReload from lvmetad systemd unit: lvmetad -R undefined. (2.02.98)
Do not fork lvmetad if running under systemd.
Wipe DM_snapshot_cow signature without prompt in new LVs with blkid wiping.
diff --git a/man/lvchange.8.in b/man/lvchange.8.in
index 49337e4..64231c8 100644
--- a/man/lvchange.8.in
+++ b/man/lvchange.8.in
@@ -74,8 +74,9 @@ logical volumes. If autoactivation option is used (\-aay),
the logical volume is activated only if it matches an item in
the activation/auto_activation_volume_list set in lvm.conf.
If this list is not set, then all volumes are considered for
-autoactivation. The autoactivation is not yet supported for
-logical volumes that are part of partial or clustered volume groups.
+activation. The \-aay option should be also used during system
+boot so it's possible to select which volumes to activate using
+the activation/auto_activation_volume_list setting.
.IP
If clustered locking is enabled, -aey will activate exclusively
on one node and -aly will activate only on the local node.
diff --git a/man/vgchange.8.in b/man/vgchange.8.in
index 823d134..16adf4df 100644
--- a/man/vgchange.8.in
+++ b/man/vgchange.8.in
@@ -76,9 +76,10 @@ In other words, makes the logical volumes known/unknown to the kernel.
If autoactivation option is used (\-aay), each logical volume in
the volume group is activated only if it matches an item in the
activation/auto_activation_volume_list set in lvm.conf. If this
-list is not set, then all volumes are considered for autoactivation.
-The autoactivation is not yet supported for partial or clustered
-volume groups.
+list is not set, then all volumes are considered for activation.
+The \-aay option should be also used during system boot so it's
+possible to select which volumes to activate using the
+activation/auto_activation_volume_list settting.
.IP
If clustered locking is enabled, add 'e' to activate/deactivate
exclusively on one node or 'l' to activate/deactivate only
diff --git a/scripts/lvm2_cluster_activation_red_hat.sh.in b/scripts/lvm2_cluster_activation_red_hat.sh.in
index 2531ef2..0d4676c 100644
--- a/scripts/lvm2_cluster_activation_red_hat.sh.in
+++ b/scripts/lvm2_cluster_activation_red_hat.sh.in
@@ -31,7 +31,9 @@ activate() {
fi
echo -n "Activating ${LVM_VGS:-"all VG(s)"}: "
- ${lvm_vgchange} -ayl $LVM_VGS || return 1
+ # Respect activation/auto_activation_volume_list!
+ # Call "-aay" which is equal to "-aly" but respects this list.
+ ${lvm_vgchange} -aay $LVM_VGS || return 1
return 0
}
10 years, 2 months
master - systemd: rename lvm2-cluster-activation and lvm2-clvmd services to follow existing naming
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=a092cd33be1322...
Commit: a092cd33be13229b288ab44fb39e410c1ca57175
Parent: ef91de2a0cc29dd66a93fc4fb0c873d67328dc7d
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Tue Feb 11 10:03:19 2014 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Tue Feb 11 10:12:39 2014 +0100
systemd: rename lvm2-cluster-activation and lvm2-clvmd services to follow existing naming
lvm2_cluster_activation_red_hat.service.in -> lvm2_cluster_activation_systemd_red_hat.service.in
lvm2_clvmd_red_hat.service.in -> lvm2_clvmd_red_hat.service.in
Edit lvm2-cluster-activation reference on cmirror - take new
lvm2-cmirrord.service, it was just cmirrord(.service) before
as the old initscript was used in compatibility mode.
Also, use WantedBy=multi-user.target instead of sysinit.target
in lvm2-cluster-activation.service.
---
WHATS_NEW | 2 +-
configure | 6 ++--
configure.in | 4 +-
scripts/Makefile.in | 9 ++++---
scripts/lvm2_cluster_activation_red_hat.service.in | 16 ---------------
...2_cluster_activation_systemd_red_hat.service.in | 16 +++++++++++++++
scripts/lvm2_clvmd_red_hat.service.in | 21 --------------------
scripts/lvm2_clvmd_systemd_red_hat.service.in | 21 ++++++++++++++++++++
8 files changed, 48 insertions(+), 47 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 1b24781..c5bb6de 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.106 -
====================================
+ Add systemd native service for clvmd, cmirrord and cluster activation.
Remove ExecReload from lvmetad systemd unit: lvmetad -R undefined. (2.02.98)
Do not fork lvmetad if running under systemd.
Wipe DM_snapshot_cow signature without prompt in new LVs with blkid wiping.
@@ -17,7 +18,6 @@ Version 2.02.106 -
Issue error if libbblkid detects signature and fails to return offset/length.
Update autoconf config.guess/sub to 2014-01-01.
Online thin pool metadata resize requires 1.10 kernel thin pool target.
- Add systemd native service for the clvmd and cluster activation.
Version 2.02.105 - 20th January 2014
====================================
diff --git a/configure b/configure
index 7131300..f6463f0 100755
--- a/configure
+++ b/configure
@@ -11454,7 +11454,7 @@ LVM_LIBAPI=`echo "$VER" | $AWK -F '[()]' '{print $2}'`
################################################################################
-ac_config_files="$ac_config_files Makefile make.tmpl daemons/Makefile daemons/clvmd/Makefile daemons/cmirrord/Makefile daemons/dmeventd/Makefile daemons/dmeventd/libdevmapper-event.pc daemons/dmeventd/plugins/Makefile daemons/dmeventd/plugins/lvm2/Makefile daemons/dmeventd/plugins/raid/Makefile daemons/dmeventd/plugins/mirror/Makefile daemons/dmeventd/plugins/snapshot/Makefile daemons/dmeventd/plugins/thin/Makefile daemons/lvmetad/Makefile conf/Makefile conf/example.conf conf/default.profile include/.symlinks include/Makefile lib/Makefile lib/format1/Makefile lib/format_pool/Makefile lib/locking/Makefile lib/mirror/Makefile lib/replicator/Makefile lib/misc/lvm-version.h lib/raid/Makefile lib/snapshot/Makefile lib/thin/Makefile lib/cache_segtype/Makefile libdaemon/Makefile libdaemon/client/Makefile libdaemon/server/Makefile libdm/Makefile libdm/libdevmapper.pc liblvm/Makefile liblvm/liblvm2app.pc man/Makefile po/Makefile python/Makefile python/setup.py scripts/blkdeactivate.s
h scripts/blk_availability_init_red_hat scripts/blk_availability_systemd_red_hat.service scripts/lvm2_cluster_activation_red_hat.sh scripts/lvm2_cluster_activation_red_hat.service scripts/clvmd_init_red_hat scripts/lvm2_clvmd_red_hat.service scripts/cmirrord_init_red_hat scripts/lvm2_cmirrord_systemd_red_hat.service scripts/lvm2_lvmetad_init_red_hat scripts/lvm2_lvmetad_systemd_red_hat.socket scripts/lvm2_lvmetad_systemd_red_hat.service scripts/lvm2_pvscan_systemd_red_hat@.service scripts/lvm2_monitoring_init_red_hat scripts/dm_event_systemd_red_hat.socket scripts/dm_event_systemd_red_hat.service scripts/lvm2_monitoring_systemd_red_hat.service scripts/lvm2_tmpfiles_red_hat.conf scripts/Makefile test/Makefile test/api/Makefile test/unit/Makefile tools/Makefile udev/Makefile unit-tests/datastruct/Makefile unit-tests/regex/Makefile unit-tests/mm/Makefile"
+ac_config_files="$ac_config_files Makefile make.tmpl daemons/Makefile daemons/clvmd/Makefile daemons/cmirrord/Makefile daemons/dmeventd/Makefile daemons/dmeventd/libdevmapper-event.pc daemons/dmeventd/plugins/Makefile daemons/dmeventd/plugins/lvm2/Makefile daemons/dmeventd/plugins/raid/Makefile daemons/dmeventd/plugins/mirror/Makefile daemons/dmeventd/plugins/snapshot/Makefile daemons/dmeventd/plugins/thin/Makefile daemons/lvmetad/Makefile conf/Makefile conf/example.conf conf/default.profile include/.symlinks include/Makefile lib/Makefile lib/format1/Makefile lib/format_pool/Makefile lib/locking/Makefile lib/mirror/Makefile lib/replicator/Makefile lib/misc/lvm-version.h lib/raid/Makefile lib/snapshot/Makefile lib/thin/Makefile lib/cache_segtype/Makefile libdaemon/Makefile libdaemon/client/Makefile libdaemon/server/Makefile libdm/Makefile libdm/libdevmapper.pc liblvm/Makefile liblvm/liblvm2app.pc man/Makefile po/Makefile python/Makefile python/setup.py scripts/blkdeactivate.s
h scripts/blk_availability_init_red_hat scripts/blk_availability_systemd_red_hat.service scripts/lvm2_cluster_activation_red_hat.sh scripts/lvm2_cluster_activation_systemd_red_hat.service scripts/clvmd_init_red_hat scripts/lvm2_clvmd_systemd_red_hat.service scripts/cmirrord_init_red_hat scripts/lvm2_cmirrord_systemd_red_hat.service scripts/lvm2_lvmetad_init_red_hat scripts/lvm2_lvmetad_systemd_red_hat.socket scripts/lvm2_lvmetad_systemd_red_hat.service scripts/lvm2_pvscan_systemd_red_hat@.service scripts/lvm2_monitoring_init_red_hat scripts/dm_event_systemd_red_hat.socket scripts/dm_event_systemd_red_hat.service scripts/lvm2_monitoring_systemd_red_hat.service scripts/lvm2_tmpfiles_red_hat.conf scripts/Makefile test/Makefile test/api/Makefile test/unit/Makefile tools/Makefile udev/Makefile unit-tests/datastruct/Makefile unit-tests/regex/Makefile unit-tests/mm/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -12188,9 +12188,9 @@ do
"scripts/blk_availability_init_red_hat") CONFIG_FILES="$CONFIG_FILES scripts/blk_availability_init_red_hat" ;;
"scripts/blk_availability_systemd_red_hat.service") CONFIG_FILES="$CONFIG_FILES scripts/blk_availability_systemd_red_hat.service" ;;
"scripts/lvm2_cluster_activation_red_hat.sh") CONFIG_FILES="$CONFIG_FILES scripts/lvm2_cluster_activation_red_hat.sh" ;;
- "scripts/lvm2_cluster_activation_red_hat.service") CONFIG_FILES="$CONFIG_FILES scripts/lvm2_cluster_activation_red_hat.service" ;;
+ "scripts/lvm2_cluster_activation_systemd_red_hat.service") CONFIG_FILES="$CONFIG_FILES scripts/lvm2_cluster_activation_systemd_red_hat.service" ;;
"scripts/clvmd_init_red_hat") CONFIG_FILES="$CONFIG_FILES scripts/clvmd_init_red_hat" ;;
- "scripts/lvm2_clvmd_red_hat.service") CONFIG_FILES="$CONFIG_FILES scripts/lvm2_clvmd_red_hat.service" ;;
+ "scripts/lvm2_clvmd_systemd_red_hat.service") CONFIG_FILES="$CONFIG_FILES scripts/lvm2_clvmd_systemd_red_hat.service" ;;
"scripts/cmirrord_init_red_hat") CONFIG_FILES="$CONFIG_FILES scripts/cmirrord_init_red_hat" ;;
"scripts/lvm2_cmirrord_systemd_red_hat.service") CONFIG_FILES="$CONFIG_FILES scripts/lvm2_cmirrord_systemd_red_hat.service" ;;
"scripts/lvm2_lvmetad_init_red_hat") CONFIG_FILES="$CONFIG_FILES scripts/lvm2_lvmetad_init_red_hat" ;;
diff --git a/configure.in b/configure.in
index ade965b..8fdc8b1 100644
--- a/configure.in
+++ b/configure.in
@@ -1789,9 +1789,9 @@ scripts/blkdeactivate.sh
scripts/blk_availability_init_red_hat
scripts/blk_availability_systemd_red_hat.service
scripts/lvm2_cluster_activation_red_hat.sh
-scripts/lvm2_cluster_activation_red_hat.service
+scripts/lvm2_cluster_activation_systemd_red_hat.service
scripts/clvmd_init_red_hat
-scripts/lvm2_clvmd_red_hat.service
+scripts/lvm2_clvmd_systemd_red_hat.service
scripts/cmirrord_init_red_hat
scripts/lvm2_cmirrord_systemd_red_hat.service
scripts/lvm2_lvmetad_init_red_hat
diff --git a/scripts/Makefile.in b/scripts/Makefile.in
index 35e20c5..8fdb5f7 100644
--- a/scripts/Makefile.in
+++ b/scripts/Makefile.in
@@ -112,8 +112,8 @@ ifeq ("@BUILD_LVMETAD@", "yes")
$(INSTALL_DATA) lvm2_pvscan_systemd_red_hat@.service $(systemd_unit_dir)/lvm2-pvscan@.service
endif
ifneq ("@CLVMD@", "none")
- $(INSTALL_DATA) lvm2_clvmd_red_hat.service $(systemd_unit_dir)/lvm2-clvmd.service
- $(INSTALL_DATA) lvm2_cluster_activation_red_hat.service $(systemd_unit_dir)/lvm2-cluster-activation.service
+ $(INSTALL_DATA) lvm2_clvmd_systemd_red_hat.service $(systemd_unit_dir)/lvm2-clvmd.service
+ $(INSTALL_DATA) lvm2_cluster_activation_systemd_red_hat.service $(systemd_unit_dir)/lvm2-cluster-activation.service
$(INSTALL_DATA) lvm2_cluster_activation_red_hat.sh $(systemd_dir)/lvm2-cluster-activation
endif
ifeq ("@BUILD_CMIRRORD@", "yes")
@@ -132,6 +132,7 @@ DISTCLEAN_TARGETS += clvmd_init_red_hat cmirrord_init_red_hat \
lvm2_pvscan_systemd_red_hat@.service \
lvm2_tmpfiles_red_hat.conf blk_availability_init_red_hat \
blk_availability_systemd_red_hat.service \
- blkdeactivate.sh lvm2_clvmd_red_hat.service \
+ blkdeactivate.sh lvm2_clvmd_systemd_red_hat.service \
lvm2_cmirrord_systemd_red_hat.service \
- lvm2_cluster_activation_red_hat.service lvm2_cluster_activation_red_hat.sh
+ lvm2_cluster_activation_systemd_red_hat.service \
+ lvm2_cluster_activation_red_hat.sh
diff --git a/scripts/lvm2_cluster_activation_red_hat.service.in b/scripts/lvm2_cluster_activation_red_hat.service.in
deleted file mode 100644
index b6887c3..0000000
--- a/scripts/lvm2_cluster_activation_red_hat.service.in
+++ /dev/null
@@ -1,16 +0,0 @@
-[Unit]
-Description=Clustered LVM volumes activation service
-Requires=lvm2-clvmd.service
-After=lvm2-clvmd.service cmirrord.service
-OnFailure=lvm2-clvmd.service
-DefaultDependencies=false
-
-[Service]
-Type=simple
-RemainAfterExit=yes
-EnvironmentFile=-@sysconfdir@/sysconfig/clvmd
-ExecStart=@systemdutildir@/lvm2-cluster-activation activate
-ExecStop=@systemdutildir@/lvm2-cluster-activation deactivate
-
-[Install]
-WantedBy=sysinit.target
diff --git a/scripts/lvm2_cluster_activation_systemd_red_hat.service.in b/scripts/lvm2_cluster_activation_systemd_red_hat.service.in
new file mode 100644
index 0000000..03ed9d2
--- /dev/null
+++ b/scripts/lvm2_cluster_activation_systemd_red_hat.service.in
@@ -0,0 +1,16 @@
+[Unit]
+Description=Clustered LVM volumes activation service
+Requires=lvm2-clvmd.service
+After=lvm2-clvmd.service lvm2-cmirrord.service
+OnFailure=lvm2-clvmd.service
+DefaultDependencies=false
+
+[Service]
+Type=simple
+RemainAfterExit=yes
+EnvironmentFile=-@sysconfdir@/sysconfig/clvmd
+ExecStart=@systemdutildir@/lvm2-cluster-activation activate
+ExecStop=@systemdutildir@/lvm2-cluster-activation deactivate
+
+[Install]
+WantedBy=multi-user.target
diff --git a/scripts/lvm2_clvmd_red_hat.service.in b/scripts/lvm2_clvmd_red_hat.service.in
deleted file mode 100644
index c10bdc4..0000000
--- a/scripts/lvm2_clvmd_red_hat.service.in
+++ /dev/null
@@ -1,21 +0,0 @@
-[Unit]
-Description=Clustered LVM daemon
-Documentation=man:clvmd(8)
-After=dlm.service corosync.service
-Before=remote-fs.target
-Requires=network.target dlm.service corosync.service
-RefuseManualStart=true
-RefuseManualStop=true
-StopWhenUnneeded=true
-
-[Service]
-Type=forking
-Environment=CLVMD_OPTS=-T30
-EnvironmentFile=-@sysconfdir@/sysconfig/clvmd
-ExecStart=@sbindir@/clvmd $CLVMD_OPTS
-SuccessExitStatus=5
-TimeoutStartSec=30
-TimeoutStopSec=10
-OOMScoreAdjust=-1000
-Restart=on-abort
-PIDFile=@CLVMD_PIDFILE@
diff --git a/scripts/lvm2_clvmd_systemd_red_hat.service.in b/scripts/lvm2_clvmd_systemd_red_hat.service.in
new file mode 100644
index 0000000..c10bdc4
--- /dev/null
+++ b/scripts/lvm2_clvmd_systemd_red_hat.service.in
@@ -0,0 +1,21 @@
+[Unit]
+Description=Clustered LVM daemon
+Documentation=man:clvmd(8)
+After=dlm.service corosync.service
+Before=remote-fs.target
+Requires=network.target dlm.service corosync.service
+RefuseManualStart=true
+RefuseManualStop=true
+StopWhenUnneeded=true
+
+[Service]
+Type=forking
+Environment=CLVMD_OPTS=-T30
+EnvironmentFile=-@sysconfdir@/sysconfig/clvmd
+ExecStart=@sbindir@/clvmd $CLVMD_OPTS
+SuccessExitStatus=5
+TimeoutStartSec=30
+TimeoutStopSec=10
+OOMScoreAdjust=-1000
+Restart=on-abort
+PIDFile=@CLVMD_PIDFILE@
10 years, 2 months
master - systemd: add systemd unit for cmirrord
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=ef91de2a0cc29d...
Commit: ef91de2a0cc29dd66a93fc4fb0c873d67328dc7d
Parent: a0d64554e6067edfcc4ed782d5e685cdd12ff894
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Tue Feb 11 09:55:57 2014 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Tue Feb 11 10:06:19 2014 +0100
systemd: add systemd unit for cmirrord
---
configure | 3 ++-
configure.in | 1 +
scripts/Makefile.in | 4 ++++
scripts/lvm2_cmirrord_systemd_red_hat.service.in | 15 +++++++++++++++
4 files changed, 22 insertions(+), 1 deletions(-)
diff --git a/configure b/configure
index 735137b..7131300 100755
--- a/configure
+++ b/configure
@@ -11454,7 +11454,7 @@ LVM_LIBAPI=`echo "$VER" | $AWK -F '[()]' '{print $2}'`
################################################################################
-ac_config_files="$ac_config_files Makefile make.tmpl daemons/Makefile daemons/clvmd/Makefile daemons/cmirrord/Makefile daemons/dmeventd/Makefile daemons/dmeventd/libdevmapper-event.pc daemons/dmeventd/plugins/Makefile daemons/dmeventd/plugins/lvm2/Makefile daemons/dmeventd/plugins/raid/Makefile daemons/dmeventd/plugins/mirror/Makefile daemons/dmeventd/plugins/snapshot/Makefile daemons/dmeventd/plugins/thin/Makefile daemons/lvmetad/Makefile conf/Makefile conf/example.conf conf/default.profile include/.symlinks include/Makefile lib/Makefile lib/format1/Makefile lib/format_pool/Makefile lib/locking/Makefile lib/mirror/Makefile lib/replicator/Makefile lib/misc/lvm-version.h lib/raid/Makefile lib/snapshot/Makefile lib/thin/Makefile lib/cache_segtype/Makefile libdaemon/Makefile libdaemon/client/Makefile libdaemon/server/Makefile libdm/Makefile libdm/libdevmapper.pc liblvm/Makefile liblvm/liblvm2app.pc man/Makefile po/Makefile python/Makefile python/setup.py scripts/blkdeactivate.s
h scripts/blk_availability_init_red_hat scripts/blk_availability_systemd_red_hat.service scripts/lvm2_cluster_activation_red_hat.sh scripts/lvm2_cluster_activation_red_hat.service scripts/clvmd_init_red_hat scripts/lvm2_clvmd_red_hat.service scripts/cmirrord_init_red_hat scripts/lvm2_lvmetad_init_red_hat scripts/lvm2_lvmetad_systemd_red_hat.socket scripts/lvm2_lvmetad_systemd_red_hat.service scripts/lvm2_pvscan_systemd_red_hat@.service scripts/lvm2_monitoring_init_red_hat scripts/dm_event_systemd_red_hat.socket scripts/dm_event_systemd_red_hat.service scripts/lvm2_monitoring_systemd_red_hat.service scripts/lvm2_tmpfiles_red_hat.conf scripts/Makefile test/Makefile test/api/Makefile test/unit/Makefile tools/Makefile udev/Makefile unit-tests/datastruct/Makefile unit-tests/regex/Makefile unit-tests/mm/Makefile"
+ac_config_files="$ac_config_files Makefile make.tmpl daemons/Makefile daemons/clvmd/Makefile daemons/cmirrord/Makefile daemons/dmeventd/Makefile daemons/dmeventd/libdevmapper-event.pc daemons/dmeventd/plugins/Makefile daemons/dmeventd/plugins/lvm2/Makefile daemons/dmeventd/plugins/raid/Makefile daemons/dmeventd/plugins/mirror/Makefile daemons/dmeventd/plugins/snapshot/Makefile daemons/dmeventd/plugins/thin/Makefile daemons/lvmetad/Makefile conf/Makefile conf/example.conf conf/default.profile include/.symlinks include/Makefile lib/Makefile lib/format1/Makefile lib/format_pool/Makefile lib/locking/Makefile lib/mirror/Makefile lib/replicator/Makefile lib/misc/lvm-version.h lib/raid/Makefile lib/snapshot/Makefile lib/thin/Makefile lib/cache_segtype/Makefile libdaemon/Makefile libdaemon/client/Makefile libdaemon/server/Makefile libdm/Makefile libdm/libdevmapper.pc liblvm/Makefile liblvm/liblvm2app.pc man/Makefile po/Makefile python/Makefile python/setup.py scripts/blkdeactivate.s
h scripts/blk_availability_init_red_hat scripts/blk_availability_systemd_red_hat.service scripts/lvm2_cluster_activation_red_hat.sh scripts/lvm2_cluster_activation_red_hat.service scripts/clvmd_init_red_hat scripts/lvm2_clvmd_red_hat.service scripts/cmirrord_init_red_hat scripts/lvm2_cmirrord_systemd_red_hat.service scripts/lvm2_lvmetad_init_red_hat scripts/lvm2_lvmetad_systemd_red_hat.socket scripts/lvm2_lvmetad_systemd_red_hat.service scripts/lvm2_pvscan_systemd_red_hat@.service scripts/lvm2_monitoring_init_red_hat scripts/dm_event_systemd_red_hat.socket scripts/dm_event_systemd_red_hat.service scripts/lvm2_monitoring_systemd_red_hat.service scripts/lvm2_tmpfiles_red_hat.conf scripts/Makefile test/Makefile test/api/Makefile test/unit/Makefile tools/Makefile udev/Makefile unit-tests/datastruct/Makefile unit-tests/regex/Makefile unit-tests/mm/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -12192,6 +12192,7 @@ do
"scripts/clvmd_init_red_hat") CONFIG_FILES="$CONFIG_FILES scripts/clvmd_init_red_hat" ;;
"scripts/lvm2_clvmd_red_hat.service") CONFIG_FILES="$CONFIG_FILES scripts/lvm2_clvmd_red_hat.service" ;;
"scripts/cmirrord_init_red_hat") CONFIG_FILES="$CONFIG_FILES scripts/cmirrord_init_red_hat" ;;
+ "scripts/lvm2_cmirrord_systemd_red_hat.service") CONFIG_FILES="$CONFIG_FILES scripts/lvm2_cmirrord_systemd_red_hat.service" ;;
"scripts/lvm2_lvmetad_init_red_hat") CONFIG_FILES="$CONFIG_FILES scripts/lvm2_lvmetad_init_red_hat" ;;
"scripts/lvm2_lvmetad_systemd_red_hat.socket") CONFIG_FILES="$CONFIG_FILES scripts/lvm2_lvmetad_systemd_red_hat.socket" ;;
"scripts/lvm2_lvmetad_systemd_red_hat.service") CONFIG_FILES="$CONFIG_FILES scripts/lvm2_lvmetad_systemd_red_hat.service" ;;
diff --git a/configure.in b/configure.in
index 60b816f..ade965b 100644
--- a/configure.in
+++ b/configure.in
@@ -1793,6 +1793,7 @@ scripts/lvm2_cluster_activation_red_hat.service
scripts/clvmd_init_red_hat
scripts/lvm2_clvmd_red_hat.service
scripts/cmirrord_init_red_hat
+scripts/lvm2_cmirrord_systemd_red_hat.service
scripts/lvm2_lvmetad_init_red_hat
scripts/lvm2_lvmetad_systemd_red_hat.socket
scripts/lvm2_lvmetad_systemd_red_hat.service
diff --git a/scripts/Makefile.in b/scripts/Makefile.in
index 2f1fb2a..35e20c5 100644
--- a/scripts/Makefile.in
+++ b/scripts/Makefile.in
@@ -116,6 +116,9 @@ ifneq ("@CLVMD@", "none")
$(INSTALL_DATA) lvm2_cluster_activation_red_hat.service $(systemd_unit_dir)/lvm2-cluster-activation.service
$(INSTALL_DATA) lvm2_cluster_activation_red_hat.sh $(systemd_dir)/lvm2-cluster-activation
endif
+ifeq ("@BUILD_CMIRRORD@", "yes")
+ $(INSTALL_DATA) lvm2_cmirrord_systemd_red_hat.service $(systemd_unit_dir)/lvm2-cmirrord.service
+endif
install_tmpfiles_configuration:
$(INSTALL_DIR) $(tmpfiles_dir)
@@ -130,4 +133,5 @@ DISTCLEAN_TARGETS += clvmd_init_red_hat cmirrord_init_red_hat \
lvm2_tmpfiles_red_hat.conf blk_availability_init_red_hat \
blk_availability_systemd_red_hat.service \
blkdeactivate.sh lvm2_clvmd_red_hat.service \
+ lvm2_cmirrord_systemd_red_hat.service \
lvm2_cluster_activation_red_hat.service lvm2_cluster_activation_red_hat.sh
diff --git a/scripts/lvm2_cmirrord_systemd_red_hat.service.in b/scripts/lvm2_cmirrord_systemd_red_hat.service.in
new file mode 100644
index 0000000..4ca3eea
--- /dev/null
+++ b/scripts/lvm2_cmirrord_systemd_red_hat.service.in
@@ -0,0 +1,15 @@
+[Unit]
+Description=Clustered LVM mirror log daemon
+Documentation=man:cmirrord(8)
+Requires=corosync.service
+After=corosync.service
+Before=remote-fs.target
+
+[Service]
+Type=forking
+ExecStart=@sbindir@/cmirrord
+PIDFile=@CMIRRORD_PIDFILE@
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
10 years, 2 months
master - autoreconf: latest changes
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=a0d64554e6067e...
Commit: a0d64554e6067edfcc4ed782d5e685cdd12ff894
Parent: fd41dd8f9ca38a31144ab7f8ed6a14b455dd7611
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Mon Feb 10 19:02:18 2014 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Mon Feb 10 19:02:18 2014 +0100
autoreconf: latest changes
---
configure | 62 +++++++++++++++++++++++++----------------------
lib/misc/configure.h.in | 6 ++--
2 files changed, 36 insertions(+), 32 deletions(-)
diff --git a/configure b/configure
index 20d99dd..735137b 100755
--- a/configure
+++ b/configure
@@ -606,7 +606,6 @@ kernelvsn
missingkernel
kerneldir
interface
-CACHE
CMIRRORD_PIDFILE
CLVMD_PIDFILE
LVMETAD_PIDFILE
@@ -689,6 +688,7 @@ CLUSTER
CLDWHOLEARCHIVE
CLDNOWHOLEARCHIVE
CLDFLAGS
+CACHE
BUILD_LVMETAD
BUILD_DMEVENTD
BUILD_CMIRRORD
@@ -1617,7 +1617,6 @@ Optional Packages:
--with-mirrors=TYPE mirror support: internal/shared/none
[[TYPE=internal]]
--with-raid=TYPE raid support: internal/shared/none [[TYPE=internal]]
- --with-cache=TYPE cache support: internal/shared/none [[TYPE=internal]]
--with-replicators=TYPE replicator support: internal/shared/none
[[TYPE=none]]
--with-thin=TYPE thin provisioning support: internal/shared/none
@@ -1625,6 +1624,8 @@ Optional Packages:
--with-thin-check=PATH thin_check tool: [[autodetect]]
--with-thin-dump=PATH thin_dump tool: [[autodetect]]
--with-thin-repair=PATH thin_repair tool: [[autodetect]]
+ --with-cache=TYPE cache support: internal/shared/none
+ [[TYPE=internal]]
--with-ocfdir=DIR install OCF files in DIR
[[PREFIX/lib/ocf/resource.d/lvm2]]
--with-default-pid-dir=PID_DIR
@@ -7120,31 +7121,6 @@ $as_echo "#define RAID_INTERNAL 1" >>confdefs.h
fi
################################################################################
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include cache" >&5
-$as_echo_n "checking whether to include cache... " >&6; }
-
-# Check whether --with-cache was given.
-if test "${with_cache+set}" = set; then :
- withval=$with_cache; CACHE=$withval
-else
- CACHE=internal
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CACHE" >&5
-$as_echo "$CACHE" >&6; }
-
-if [ "x$CACHE" != xnone -a "x$CACHE" != xinternal -a "x$CACHE" != xshared ];
- then as_fn_error $? "--with-cache parameter invalid
-" "$LINENO" 5
-fi;
-
-if test x$CACHE = xinternal; then
-
-$as_echo "#define CACHE_INTERNAL 1" >>confdefs.h
-
-fi
-
-################################################################################
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include replicators" >&5
$as_echo_n "checking whether to include replicators... " >&6; }
@@ -7559,6 +7535,30 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
+################################################################################
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include cache" >&5
+$as_echo_n "checking whether to include cache... " >&6; }
+
+# Check whether --with-cache was given.
+if test "${with_cache+set}" = set; then :
+ withval=$with_cache; CACHE=$withval
+else
+ CACHE=internal
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CACHE" >&5
+$as_echo "$CACHE" >&6; }
+
+if [ "x$CACHE" != xnone -a "x$CACHE" != xinternal -a "x$CACHE" != xshared ];
+ then as_fn_error $? "--with-cache parameter invalid
+" "$LINENO" 5
+fi;
+
+if test x$CACHE = xinternal; then
+
+$as_echo "#define CACHE_INTERNAL 1" >>confdefs.h
+
+fi
################################################################################
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable readline" >&5
@@ -11452,8 +11452,9 @@ LVM_LIBAPI=`echo "$VER" | $AWK -F '[()]' '{print $2}'`
+
################################################################################
-ac_config_files="$ac_config_files Makefile make.tmpl daemons/Makefile daemons/clvmd/Makefile daemons/cmirrord/Makefile daemons/dmeventd/Makefile daemons/dmeventd/libdevmapper-event.pc daemons/dmeventd/plugins/Makefile daemons/dmeventd/plugins/lvm2/Makefile daemons/dmeventd/plugins/raid/Makefile daemons/dmeventd/plugins/mirror/Makefile daemons/dmeventd/plugins/snapshot/Makefile daemons/dmeventd/plugins/thin/Makefile daemons/lvmetad/Makefile conf/Makefile conf/example.conf conf/default.profile include/.symlinks include/Makefile lib/Makefile lib/format1/Makefile lib/format_pool/Makefile lib/locking/Makefile lib/mirror/Makefile lib/replicator/Makefile lib/misc/lvm-version.h lib/raid/Makefile lib/cache_segtype/Makefile lib/snapshot/Makefile lib/thin/Makefile libdaemon/Makefile libdaemon/client/Makefile libdaemon/server/Makefile libdm/Makefile libdm/libdevmapper.pc liblvm/Makefile liblvm/liblvm2app.pc man/Makefile po/Makefile python/Makefile python/setup.py scripts/blkdeactivate.s
h scripts/blk_availability_init_red_hat scripts/blk_availability_systemd_red_hat.service scripts/clvmd_init_red_hat scripts/cmirrord_init_red_hat scripts/lvm2_lvmetad_init_red_hat scripts/lvm2_lvmetad_systemd_red_hat.socket scripts/lvm2_lvmetad_systemd_red_hat.service scripts/lvm2_pvscan_systemd_red_hat@.service scripts/lvm2_monitoring_init_red_hat scripts/dm_event_systemd_red_hat.socket scripts/dm_event_systemd_red_hat.service scripts/lvm2_monitoring_systemd_red_hat.service scripts/lvm2_tmpfiles_red_hat.conf scripts/Makefile test/Makefile test/api/Makefile test/unit/Makefile tools/Makefile udev/Makefile unit-tests/datastruct/Makefile unit-tests/regex/Makefile unit-tests/mm/Makefile"
+ac_config_files="$ac_config_files Makefile make.tmpl daemons/Makefile daemons/clvmd/Makefile daemons/cmirrord/Makefile daemons/dmeventd/Makefile daemons/dmeventd/libdevmapper-event.pc daemons/dmeventd/plugins/Makefile daemons/dmeventd/plugins/lvm2/Makefile daemons/dmeventd/plugins/raid/Makefile daemons/dmeventd/plugins/mirror/Makefile daemons/dmeventd/plugins/snapshot/Makefile daemons/dmeventd/plugins/thin/Makefile daemons/lvmetad/Makefile conf/Makefile conf/example.conf conf/default.profile include/.symlinks include/Makefile lib/Makefile lib/format1/Makefile lib/format_pool/Makefile lib/locking/Makefile lib/mirror/Makefile lib/replicator/Makefile lib/misc/lvm-version.h lib/raid/Makefile lib/snapshot/Makefile lib/thin/Makefile lib/cache_segtype/Makefile libdaemon/Makefile libdaemon/client/Makefile libdaemon/server/Makefile libdm/Makefile libdm/libdevmapper.pc liblvm/Makefile liblvm/liblvm2app.pc man/Makefile po/Makefile python/Makefile python/setup.py scripts/blkdeactivate.s
h scripts/blk_availability_init_red_hat scripts/blk_availability_systemd_red_hat.service scripts/lvm2_cluster_activation_red_hat.sh scripts/lvm2_cluster_activation_red_hat.service scripts/clvmd_init_red_hat scripts/lvm2_clvmd_red_hat.service scripts/cmirrord_init_red_hat scripts/lvm2_lvmetad_init_red_hat scripts/lvm2_lvmetad_systemd_red_hat.socket scripts/lvm2_lvmetad_systemd_red_hat.service scripts/lvm2_pvscan_systemd_red_hat@.service scripts/lvm2_monitoring_init_red_hat scripts/dm_event_systemd_red_hat.socket scripts/dm_event_systemd_red_hat.service scripts/lvm2_monitoring_systemd_red_hat.service scripts/lvm2_tmpfiles_red_hat.conf scripts/Makefile test/Makefile test/api/Makefile test/unit/Makefile tools/Makefile udev/Makefile unit-tests/datastruct/Makefile unit-tests/regex/Makefile unit-tests/mm/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -12169,9 +12170,9 @@ do
"lib/replicator/Makefile") CONFIG_FILES="$CONFIG_FILES lib/replicator/Makefile" ;;
"lib/misc/lvm-version.h") CONFIG_FILES="$CONFIG_FILES lib/misc/lvm-version.h" ;;
"lib/raid/Makefile") CONFIG_FILES="$CONFIG_FILES lib/raid/Makefile" ;;
- "lib/cache_segtype/Makefile") CONFIG_FILES="$CONFIG_FILES lib/cache_segtype/Makefile" ;;
"lib/snapshot/Makefile") CONFIG_FILES="$CONFIG_FILES lib/snapshot/Makefile" ;;
"lib/thin/Makefile") CONFIG_FILES="$CONFIG_FILES lib/thin/Makefile" ;;
+ "lib/cache_segtype/Makefile") CONFIG_FILES="$CONFIG_FILES lib/cache_segtype/Makefile" ;;
"libdaemon/Makefile") CONFIG_FILES="$CONFIG_FILES libdaemon/Makefile" ;;
"libdaemon/client/Makefile") CONFIG_FILES="$CONFIG_FILES libdaemon/client/Makefile" ;;
"libdaemon/server/Makefile") CONFIG_FILES="$CONFIG_FILES libdaemon/server/Makefile" ;;
@@ -12186,7 +12187,10 @@ do
"scripts/blkdeactivate.sh") CONFIG_FILES="$CONFIG_FILES scripts/blkdeactivate.sh" ;;
"scripts/blk_availability_init_red_hat") CONFIG_FILES="$CONFIG_FILES scripts/blk_availability_init_red_hat" ;;
"scripts/blk_availability_systemd_red_hat.service") CONFIG_FILES="$CONFIG_FILES scripts/blk_availability_systemd_red_hat.service" ;;
+ "scripts/lvm2_cluster_activation_red_hat.sh") CONFIG_FILES="$CONFIG_FILES scripts/lvm2_cluster_activation_red_hat.sh" ;;
+ "scripts/lvm2_cluster_activation_red_hat.service") CONFIG_FILES="$CONFIG_FILES scripts/lvm2_cluster_activation_red_hat.service" ;;
"scripts/clvmd_init_red_hat") CONFIG_FILES="$CONFIG_FILES scripts/clvmd_init_red_hat" ;;
+ "scripts/lvm2_clvmd_red_hat.service") CONFIG_FILES="$CONFIG_FILES scripts/lvm2_clvmd_red_hat.service" ;;
"scripts/cmirrord_init_red_hat") CONFIG_FILES="$CONFIG_FILES scripts/cmirrord_init_red_hat" ;;
"scripts/lvm2_lvmetad_init_red_hat") CONFIG_FILES="$CONFIG_FILES scripts/lvm2_lvmetad_init_red_hat" ;;
"scripts/lvm2_lvmetad_systemd_red_hat.socket") CONFIG_FILES="$CONFIG_FILES scripts/lvm2_lvmetad_systemd_red_hat.socket" ;;
diff --git a/lib/misc/configure.h.in b/lib/misc/configure.h.in
index 0acb9b7..c1f088e 100644
--- a/lib/misc/configure.h.in
+++ b/lib/misc/configure.h.in
@@ -3,6 +3,9 @@
/* Define to 1 to use libblkid detection of signatures when wiping. */
#undef BLKID_WIPING_SUPPORT
+/* Define to 1 to include built-in support for cache. */
+#undef CACHE_INTERNAL
+
/* Define to 1 if the `closedir' function returns void instead of `int'. */
#undef CLOSEDIR_VOID
@@ -558,9 +561,6 @@
/* The path to 'thin_repair', if available. */
#undef THIN_REPAIR_CMD
-/* Define to 1 to include built-in support for cache[pool] segment types. */
-#undef CACHE_INTERNAL
-
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
10 years, 2 months
master - Add systemd native service for clvmd and cluster activation
by okozina
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=fd41dd8f9ca38a...
Commit: fd41dd8f9ca38a31144ab7f8ed6a14b455dd7611
Parent: ffa623c53d94a75e40067a2d186ac65a64abb890
Author: Ondrej Kozina <okozina(a)redhat.com>
AuthorDate: Mon Feb 10 17:05:10 2014 +0100
Committer: Ondrej Kozina <okozina(a)redhat.com>
CommitterDate: Mon Feb 10 17:13:49 2014 +0100
Add systemd native service for clvmd and cluster activation
The commit splits original clvmd service in two new native services
for systemd enabled systems while original init scripts remain unaltered.
New systemd native services:
1) clvmd daemon itself (lvm2_clvmd_red_hat.service.in)
2) (de)activation of clustered VGs (lvm2_cluster_activation_red_hat.service.in)
There're several reasons to split it. First, there's no support for conditional
stop in systemd and AFAIK they don't plan to support it. In other words:
if the deactivation fails for some reason, systemd doesn't care and will simply
kill all remaining processes in original cgroup (by default). Killing the
remaining procs can be suppressed however it doesn't solve the following problem:
You can't repeat the stop command of a failed service. The repeated stop command
is simply not propagated to the service in a failed state. You would have to start
and then try to stop the service again. Unfortunately, this can't be done while
the daemon is still running (and we need the daemon to stay active until all
clustered VGs are deactivated properly).
In a separated setup we need only to restart the failed activation service and
that's fine.
---
WHATS_NEW | 1 +
configure.in | 3 +
make.tmpl.in | 1 +
scripts/Makefile.in | 8 ++-
scripts/lvm2_cluster_activation_red_hat.service.in | 16 +++++
scripts/lvm2_cluster_activation_red_hat.sh.in | 68 ++++++++++++++++++++
scripts/lvm2_clvmd_red_hat.service.in | 21 ++++++
7 files changed, 117 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index c4a3dcb..1b24781 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -17,6 +17,7 @@ Version 2.02.106 -
Issue error if libbblkid detects signature and fails to return offset/length.
Update autoconf config.guess/sub to 2014-01-01.
Online thin pool metadata resize requires 1.10 kernel thin pool target.
+ Add systemd native service for the clvmd and cluster activation.
Version 2.02.105 - 20th January 2014
====================================
diff --git a/configure.in b/configure.in
index 7b56b13..60b816f 100644
--- a/configure.in
+++ b/configure.in
@@ -1788,7 +1788,10 @@ python/setup.py
scripts/blkdeactivate.sh
scripts/blk_availability_init_red_hat
scripts/blk_availability_systemd_red_hat.service
+scripts/lvm2_cluster_activation_red_hat.sh
+scripts/lvm2_cluster_activation_red_hat.service
scripts/clvmd_init_red_hat
+scripts/lvm2_clvmd_red_hat.service
scripts/cmirrord_init_red_hat
scripts/lvm2_lvmetad_init_red_hat
scripts/lvm2_lvmetad_systemd_red_hat.socket
diff --git a/make.tmpl.in b/make.tmpl.in
index 65b1da0..7d7d701 100644
--- a/make.tmpl.in
+++ b/make.tmpl.in
@@ -84,6 +84,7 @@ pkgconfigdir = $(usrlibdir)/pkgconfig
initdir = $(DESTDIR)$(sysconfdir)/rc.d/init.d
systemd_unit_dir = $(DESTDIR)@systemdsystemunitdir@
systemd_generator_dir = $(DESTDIR)@systemdutildir@/system-generators
+systemd_dir = $(DESTDIR)@systemdutildir@
tmpfiles_dir = $(DESTDIR)@tmpfilesdir@
ocf_scriptdir = $(DESTDIR)@OCFDIR@
pyexecdir = $(DESTDIR)$(prefix)
diff --git a/scripts/Makefile.in b/scripts/Makefile.in
index ed587ca..2f1fb2a 100644
--- a/scripts/Makefile.in
+++ b/scripts/Makefile.in
@@ -111,6 +111,11 @@ ifeq ("@BUILD_LVMETAD@", "yes")
$(INSTALL_DATA) lvm2_lvmetad_systemd_red_hat.service $(systemd_unit_dir)/lvm2-lvmetad.service
$(INSTALL_DATA) lvm2_pvscan_systemd_red_hat@.service $(systemd_unit_dir)/lvm2-pvscan@.service
endif
+ifneq ("@CLVMD@", "none")
+ $(INSTALL_DATA) lvm2_clvmd_red_hat.service $(systemd_unit_dir)/lvm2-clvmd.service
+ $(INSTALL_DATA) lvm2_cluster_activation_red_hat.service $(systemd_unit_dir)/lvm2-cluster-activation.service
+ $(INSTALL_DATA) lvm2_cluster_activation_red_hat.sh $(systemd_dir)/lvm2-cluster-activation
+endif
install_tmpfiles_configuration:
$(INSTALL_DIR) $(tmpfiles_dir)
@@ -124,4 +129,5 @@ DISTCLEAN_TARGETS += clvmd_init_red_hat cmirrord_init_red_hat \
lvm2_pvscan_systemd_red_hat@.service \
lvm2_tmpfiles_red_hat.conf blk_availability_init_red_hat \
blk_availability_systemd_red_hat.service \
- blkdeactivate.sh
+ blkdeactivate.sh lvm2_clvmd_red_hat.service \
+ lvm2_cluster_activation_red_hat.service lvm2_cluster_activation_red_hat.sh
diff --git a/scripts/lvm2_cluster_activation_red_hat.service.in b/scripts/lvm2_cluster_activation_red_hat.service.in
new file mode 100644
index 0000000..b6887c3
--- /dev/null
+++ b/scripts/lvm2_cluster_activation_red_hat.service.in
@@ -0,0 +1,16 @@
+[Unit]
+Description=Clustered LVM volumes activation service
+Requires=lvm2-clvmd.service
+After=lvm2-clvmd.service cmirrord.service
+OnFailure=lvm2-clvmd.service
+DefaultDependencies=false
+
+[Service]
+Type=simple
+RemainAfterExit=yes
+EnvironmentFile=-@sysconfdir@/sysconfig/clvmd
+ExecStart=@systemdutildir@/lvm2-cluster-activation activate
+ExecStop=@systemdutildir@/lvm2-cluster-activation deactivate
+
+[Install]
+WantedBy=sysinit.target
diff --git a/scripts/lvm2_cluster_activation_red_hat.sh.in b/scripts/lvm2_cluster_activation_red_hat.sh.in
new file mode 100644
index 0000000..2531ef2
--- /dev/null
+++ b/scripts/lvm2_cluster_activation_red_hat.sh.in
@@ -0,0 +1,68 @@
+#!/bin/bash
+
+sbindir=@sbindir@
+
+lvm_vgchange=${sbindir}/vgchange
+lvm_vgscan=${sbindir}/vgscan
+lvm_vgs=${sbindir}/vgs
+lvm_lvm=${sbindir}/lvm
+
+parse_clustered_vgs() {
+ while read -r name attrs;
+ do
+ test "${attrs:5:1}" == 'c' && echo -n "$name "
+ done
+}
+
+# NOTE: replace this with vgs, once display filter per attr is implemented.
+clustered_vgs() {
+ ${lvm_vgs} -o vg_name,vg_attr --noheadings | parse_clustered_vgs
+}
+
+activate() {
+ eval local $(${lvm_lvm} dumpconfig devices/obtain_device_list_from_udev 2>/dev/null) 2>/dev/null
+ if [ $? -ne 0 ]; then
+ echo "Warning: expected single couple of key=value in output of dumpconfig"
+ fi
+
+ if [ -z $obtain_device_list_from_udev -o $obtain_device_list_from_udev -ne 1 ]; then
+ echo -n "lvm.conf option obtain_device_list_from_udev!=1: Executing vgscan"
+ ${lvm_vgscan} > /dev/null 2>&1
+ fi
+
+ echo -n "Activating ${LVM_VGS:-"all VG(s)"}: "
+ ${lvm_vgchange} -ayl $LVM_VGS || return 1
+
+ return 0
+}
+
+deactivate()
+{
+ # NOTE: following section will be replaced by blkdeactivate script
+ # with option supporting request to deactivate all clustered volume
+ # groups in the system
+ [ -z $LVM_VGS ] && LVM_VGS="$(clustered_vgs)"
+ if [ -n "$LVM_VGS" ]; then
+ echo -n "Deactivating clustered VG(s): "
+ ${lvm_vgchange} -anl $LVM_VGS || return 1
+ fi
+
+ return 0
+}
+
+case "$1" in
+ deactivate)
+ deactivate
+ rtrn=$?
+ ;;
+ activate)
+ activate
+ rtrn=$?
+ ;;
+ *)
+ echo $"Usage: $0 {activate|deactivate}"
+ rtrn=3
+ ;;
+esac
+
+exit $rtrn
diff --git a/scripts/lvm2_clvmd_red_hat.service.in b/scripts/lvm2_clvmd_red_hat.service.in
new file mode 100644
index 0000000..c10bdc4
--- /dev/null
+++ b/scripts/lvm2_clvmd_red_hat.service.in
@@ -0,0 +1,21 @@
+[Unit]
+Description=Clustered LVM daemon
+Documentation=man:clvmd(8)
+After=dlm.service corosync.service
+Before=remote-fs.target
+Requires=network.target dlm.service corosync.service
+RefuseManualStart=true
+RefuseManualStop=true
+StopWhenUnneeded=true
+
+[Service]
+Type=forking
+Environment=CLVMD_OPTS=-T30
+EnvironmentFile=-@sysconfdir@/sysconfig/clvmd
+ExecStart=@sbindir@/clvmd $CLVMD_OPTS
+SuccessExitStatus=5
+TimeoutStartSec=30
+TimeoutStopSec=10
+OOMScoreAdjust=-1000
+Restart=on-abort
+PIDFile=@CLVMD_PIDFILE@
10 years, 2 months
master - systemd: cleanup for lvmetad systemd unit
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=ffa623c53d94a7...
Commit: ffa623c53d94a75e40067a2d186ac65a64abb890
Parent: 38457e1be9c3363126eadc3e04ae8b8780832668
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Mon Feb 10 16:18:48 2014 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Mon Feb 10 16:20:45 2014 +0100
systemd: cleanup for lvmetad systemd unit
No need to fork lvmetad when running under systemd.
Also, the "lvmetad -R" support has been removed in lvm2 v2.02.98
so remove the ExecReload line that called it on "systemctl reload".
---
WHATS_NEW | 2 ++
scripts/lvm2_lvmetad_systemd_red_hat.service.in | 5 ++---
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 043feae..c4a3dcb 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,7 @@
Version 2.02.106 -
====================================
+ Remove ExecReload from lvmetad systemd unit: lvmetad -R undefined. (2.02.98)
+ Do not fork lvmetad if running under systemd.
Wipe DM_snapshot_cow signature without prompt in new LVs with blkid wiping.
Avoid exposing temporary devices when initializing raid metadata volumes.
Add internal tags command to display any tags defined on the host.
diff --git a/scripts/lvm2_lvmetad_systemd_red_hat.service.in b/scripts/lvm2_lvmetad_systemd_red_hat.service.in
index 0150726..8f4c60d 100644
--- a/scripts/lvm2_lvmetad_systemd_red_hat.service.in
+++ b/scripts/lvm2_lvmetad_systemd_red_hat.service.in
@@ -7,10 +7,9 @@ DefaultDependencies=no
Conflicts=shutdown.target
[Service]
-Type=forking
+Type=simple
NonBlocking=true
-ExecStart=@sbindir@/lvmetad
-ExecReload=@sbindir@/lvmetad -R
+ExecStart=@sbindir@/lvmetad -f
Environment=SD_ACTIVATION=1
Restart=on-abort
PIDFile=@LVMETAD_PIDFILE@
10 years, 2 months
master - libdevmapper-event: Print a deprecation warning for non-default plugins.
by Petr Rockai
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=38457e1be9c336...
Commit: 38457e1be9c3363126eadc3e04ae8b8780832668
Parent: ed166a3b1d3290ad887d8f83c24a8d8877713d3c
Author: Petr Rockai <me(a)mornfall.net>
AuthorDate: Mon Feb 10 14:51:14 2014 +0100
Committer: Petr Rockai <me(a)mornfall.net>
CommitterDate: Mon Feb 10 14:52:59 2014 +0100
libdevmapper-event: Print a deprecation warning for non-default plugins.
---
daemons/dmeventd/libdevmapper-event.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/daemons/dmeventd/libdevmapper-event.c b/daemons/dmeventd/libdevmapper-event.c
index 1b5273d..db9200f 100644
--- a/daemons/dmeventd/libdevmapper-event.c
+++ b/daemons/dmeventd/libdevmapper-event.c
@@ -619,6 +619,13 @@ int dm_event_register_handler(const struct dm_event_handler *dmevh)
uuid = dm_task_get_uuid(dmt);
+ if (!strstr(dmevh->dso, "libdevmapper-event-lvm2thin.so") &&
+ !strstr(dmevh->dso, "libdevmapper-event-lvm2snapshot.so") &&
+ !strstr(dmevh->dso, "libdevmapper-event-lvm2mirror.so") &&
+ !strstr(dmevh->dso, "libdevmapper-event-lvm2raid.so"))
+ log_warn("WARNING: %s: dmeventd plugins are deprecated", dmevh->dso);
+
+
if ((err = _do_event(DM_EVENT_CMD_REGISTER_FOR_EVENT, dmevh->dmeventd_path, &msg,
dmevh->dso, uuid, dmevh->mask, dmevh->timeout)) < 0) {
log_error("%s: event registration failed: %s",
10 years, 2 months
master - wiping: wipe DM_snapshot_cow signature without prompt in newly created LVs
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=ed166a3b1d3290...
Commit: ed166a3b1d3290ad887d8f83c24a8d8877713d3c
Parent: 56358160948554e1eb8dc7c5a86dbad4216376fd
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Mon Feb 10 13:28:13 2014 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Mon Feb 10 13:28:13 2014 +0100
wiping: wipe DM_snapshot_cow signature without prompt in newly created LVs
The libblkid can detect DM_snapshot_cow signature and when creating
new LVs with blkid wiping used (allocation/use_blkid_wiping=1 lvm.conf
setting and --wipe y used at the same time - which it is by default).
Do not issue any prompts about this signature when new LV is created
and just wipe it right away without asking questions. Still keep the
log in verbose mode though.
---
WHATS_NEW | 1 +
lib/device/dev-type.c | 47 ++++++++++++++++++++++++++++++++---------------
lib/device/dev-type.h | 6 +++++-
lib/metadata/lv_manip.c | 4 +++-
lib/metadata/metadata.c | 4 +++-
5 files changed, 44 insertions(+), 18 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index dbacf01..043feae 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.106 -
====================================
+ Wipe DM_snapshot_cow signature without prompt in new LVs with blkid wiping.
Avoid exposing temporary devices when initializing raid metadata volumes.
Add internal tags command to display any tags defined on the host.
Prohibit use of external origin with size incompatible with thin pool.
diff --git a/lib/device/dev-type.c b/lib/device/dev-type.c
index e67169b..87a6659 100644
--- a/lib/device/dev-type.c
+++ b/lib/device/dev-type.c
@@ -449,19 +449,27 @@ out:
#ifdef BLKID_WIPING_SUPPORT
+static inline int _type_in_flag_list(const char *type, uint32_t flag_list)
+{
+ return (((flag_list & TYPE_LVM2_MEMBER) && !strcmp(type, "LVM2_member")) ||
+ ((flag_list & TYPE_LVM1_MEMBER) && !strcmp(type, "LVM1_member")) ||
+ ((flag_list & TYPE_DM_SNAPSHOT_COW) && !strcmp(type, "DM_snapshot_cow")));
+}
+
static int _blkid_wipe(blkid_probe probe, struct device *dev, const char *name,
- int exclude_lvm_member, int yes, force_t force)
+ uint32_t types_to_exclude, uint32_t types_no_prompt,
+ int yes, force_t force)
{
static const char* msg_failed_offset = "Failed to get offset of the %s signature on %s.";
static const char* msg_failed_length = "Failed to get length of the %s signature on %s.";
+ static const char* msg_wiping = "Wiping %s signature on %s.";
const char *offset = NULL, *type = NULL, *magic = NULL,
*usage = NULL, *label = NULL, *uuid = NULL;
loff_t offset_value;
size_t len;
if (!blkid_probe_lookup_value(probe, "TYPE", &type, NULL)) {
- if (exclude_lvm_member &&
- (!strcmp(type, "LVM1_member") || !strcmp(type, "LVM2_member")))
+ if (_type_in_flag_list(type, types_to_exclude))
return 1;
if (blkid_probe_lookup_value(probe, "SBMAGIC_OFFSET", &offset, NULL)) {
log_error(msg_failed_offset, type, name);
@@ -495,12 +503,15 @@ static int _blkid_wipe(blkid_probe probe, struct device *dev, const char *name,
"UUID=\"%s\" TYPE=\"%s\" USAGE=\"%s\"",
name, offset, label, uuid, type, usage);
- if (!yes && (force == PROMPT) &&
- yes_no_prompt("WARNING: %s signature detected on %s at offset %s. "
- "Wipe it? [y/n] ", type, name, offset) != 'y')
- return_0;
+ if (!_type_in_flag_list(type, types_no_prompt)) {
+ if (!yes && (force == PROMPT) &&
+ yes_no_prompt("WARNING: %s signature detected on %s at offset %s. "
+ "Wipe it? [y/n] ", type, name, offset) != 'y')
+ return_0;
+ log_print_unless_silent(msg_wiping, type, name);
+ } else
+ log_verbose(msg_wiping, type, name);
- log_print_unless_silent("Wiping %s signature on %s.", type, name);
if (!dev_set(dev, offset_value, len, 0)) {
log_error("Failed to wipe %s signature on %s.", type, name);
return 0;
@@ -510,7 +521,8 @@ static int _blkid_wipe(blkid_probe probe, struct device *dev, const char *name,
}
static int _wipe_known_signatures_with_blkid(struct device *dev, const char *name,
- int exclude_lvm_member,
+ uint32_t types_to_exclude,
+ uint32_t types_no_prompt,
int yes, force_t force)
{
blkid_probe probe = NULL;
@@ -538,7 +550,7 @@ static int _wipe_known_signatures_with_blkid(struct device *dev, const char *nam
while (!blkid_do_probe(probe)) {
found++;
- if (_blkid_wipe(probe, dev, name, exclude_lvm_member, yes, force))
+ if (_blkid_wipe(probe, dev, name, types_to_exclude, types_no_prompt, yes, force))
wiped++;
}
@@ -592,7 +604,8 @@ static int _wipe_signature(struct device *dev, const char *type, const char *nam
}
static int _wipe_known_signatures_with_lvm(struct device *dev, const char *name,
- int exclude_lvm_member,
+ uint32_t types_to_exclude __attribute__((unused)),
+ uint32_t types_no_prompt __attribute__((unused)),
int yes, force_t force)
{
if (!_wipe_signature(dev, "software RAID md superblock", name, 4, yes, force, dev_is_md) ||
@@ -604,16 +617,20 @@ static int _wipe_known_signatures_with_lvm(struct device *dev, const char *name,
}
int wipe_known_signatures(struct cmd_context *cmd, struct device *dev,
- const char *name, int exclude_lvm_member,
- int yes, force_t force)
+ const char *name, uint32_t types_to_exclude,
+ uint32_t types_no_prompt, int yes, force_t force)
{
#ifdef BLKID_WIPING_SUPPORT
if (find_config_tree_bool(cmd, allocation_use_blkid_wiping_CFG, NULL))
return _wipe_known_signatures_with_blkid(dev, name,
- exclude_lvm_member, yes, force);
+ types_to_exclude,
+ types_no_prompt,
+ yes, force);
#endif
return _wipe_known_signatures_with_lvm(dev, name,
- exclude_lvm_member, yes, force);
+ types_to_exclude,
+ types_no_prompt,
+ yes, force);
}
#ifdef __linux__
diff --git a/lib/device/dev-type.h b/lib/device/dev-type.h
index 284280e..b1520ee 100644
--- a/lib/device/dev-type.h
+++ b/lib/device/dev-type.h
@@ -60,8 +60,12 @@ int dev_is_swap(struct device *dev, uint64_t *signature);
int dev_is_luks(struct device *dev, uint64_t *signature);
/* Signature wiping. */
+#define TYPE_LVM1_MEMBER 0x001
+#define TYPE_LVM2_MEMBER 0x002
+#define TYPE_DM_SNAPSHOT_COW 0x004
int wipe_known_signatures(struct cmd_context *cmd, struct device *dev, const char *name,
- int exclude_lvm_member, int yes, force_t force);
+ uint32_t types_to_exclude, uint32_t types_no_prompt,
+ int yes, force_t force);
/* Type-specific device properties */
unsigned long dev_md_stripe_width(struct dev_types *dt, struct device *dev);
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index 96515d7..d0b6c9e 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -5538,7 +5538,9 @@ int wipe_lv(struct logical_volume *lv, struct wipe_params wp)
if (wp.do_wipe_signatures) {
log_verbose("Wiping known signatures on logical volume \"%s/%s\"",
lv->vg->name, lv->name);
- if (!wipe_known_signatures(lv->vg->cmd, dev, name, 0, wp.yes, wp.force))
+ if (!wipe_known_signatures(lv->vg->cmd, dev, name, 0,
+ TYPE_DM_SNAPSHOT_COW,
+ wp.yes, wp.force))
stack;
}
diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c
index 16a5411..88447a3 100644
--- a/lib/metadata/metadata.c
+++ b/lib/metadata/metadata.c
@@ -1372,7 +1372,9 @@ static int pvcreate_check(struct cmd_context *cmd, const char *name,
goto bad;
}
- if (!wipe_known_signatures(cmd, dev, name, 1, pp->yes, pp->force)) {
+ if (!wipe_known_signatures(cmd, dev, name,
+ TYPE_LVM1_MEMBER | TYPE_LVM2_MEMBER,
+ 0, pp->yes, pp->force)) {
log_error("Aborting pvcreate on %s.", name);
goto bad;
}
10 years, 2 months
master - cleanup: missing parentheses in a condition
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=56358160948554...
Commit: 56358160948554e1eb8dc7c5a86dbad4216376fd
Parent: 290e58b0b6f001b2f3563304fd17d606eff51ba2
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Mon Feb 10 09:03:08 2014 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Mon Feb 10 09:05:17 2014 +0100
cleanup: missing parentheses in a condition
gcc reports:
metadata/merge.c:229:58: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
metadata/merge.c:232:58: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
---
lib/metadata/merge.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/metadata/merge.c b/lib/metadata/merge.c
index e636580..f6a14a8 100644
--- a/lib/metadata/merge.c
+++ b/lib/metadata/merge.c
@@ -227,11 +227,11 @@ int check_lv_segments(struct logical_volume *lv, int complete_vg)
}
if ((seg_is_thin_pool(seg) &&
- (seg->chunk_size < DM_THIN_MIN_DATA_BLOCK_SIZE) ||
- (seg->chunk_size > DM_THIN_MAX_DATA_BLOCK_SIZE)) ||
+ ((seg->chunk_size < DM_THIN_MIN_DATA_BLOCK_SIZE) ||
+ (seg->chunk_size > DM_THIN_MAX_DATA_BLOCK_SIZE))) ||
(seg_is_cache_pool(seg) &&
- (seg->chunk_size < DM_CACHE_MIN_DATA_BLOCK_SIZE) ||
- (seg->chunk_size > DM_CACHE_MAX_DATA_BLOCK_SIZE)))
+ ((seg->chunk_size < DM_CACHE_MIN_DATA_BLOCK_SIZE) ||
+ (seg->chunk_size > DM_CACHE_MAX_DATA_BLOCK_SIZE))))
{
log_error("LV %s: %spool segment %u has chunk size %u out of range.",
lv->name,
10 years, 2 months
master - WHATS_NEW: latest commits
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=290e58b0b6f001...
Commit: 290e58b0b6f001b2f3563304fd17d606eff51ba2
Parent: 73f30ed6a4b85c3b70aa39efa14ce78be5bf8a3a
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Thu Feb 6 18:19:24 2014 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Thu Feb 6 18:19:24 2014 +0100
WHATS_NEW: latest commits
---
WHATS_NEW_DM | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 5aa3892..827e994 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,5 +1,8 @@
Version 1.02.85 -
===================================
+ Exit dmeventd with pidfile cleanup instead of raising SIGKILL on DIE request.
+ Add new DM_EVENT_GET_PARAMETERS request to dmeventd protocol.
+ Do not use systemd's reload for dmeventd restart, use dmeventd -R instead.
Drop cryptsetup rules from 10-dm.rules - cryptsetup >= 1.1.3 sets them.
Version 1.02.84 - 20th January 2014
10 years, 3 months