From: Peter Rajnoha <prajnoha@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH 1/3] Add systemd units for dmeventd and lvm2 monitoring
Date: Thu, 28 Jul 2011 14:27:03 +0200 [thread overview]
Message-ID: <4E315597.4040103@redhat.com> (raw)
These units are already being used and tested in Fedora rawhide directly:
dm_event_systemd_red_hat.service.in (dm-event.service)
dm_event_systemd_red_hat.socket (dm-event.socket)
lvm2_monitoring_systemd_red_hat.service.in (lvm2-monitor.service)
I'm just resending them here for any additional comments
(I've just added the OOMScoreAdjust to dm-event.service
and SocketMode to dm-event.socket when compared to rawhide).
Note: Conflicts: shutdown.target will stop monitoring before
unmounting any mounted filesystems. But this is as far as we
can go now. Monitor deactivation should be done later, but
that will be handled properly if we have shutdown ramfs in
place (which is also planned, at least for Fedora 16).
Peter
---
scripts/dm_event_systemd_red_hat.service.in | 14 ++++++++++++++
scripts/dm_event_systemd_red_hat.socket | 11 +++++++++++
scripts/lvm2_monitoring_systemd_red_hat.service.in | 17 +++++++++++++++++
3 files changed, 42 insertions(+), 0 deletions(-)
diff --git a/scripts/dm_event_systemd_red_hat.service.in b/scripts/dm_event_systemd_red_hat.service.in
new file mode 100644
index 0000000..32295d3
--- /dev/null
+++ b/scripts/dm_event_systemd_red_hat.service.in
@@ -0,0 +1,14 @@
+[Unit]
+Description=Device-mapper event daemon
+After=fedora-storage-init.service fedora-storage-init-late.service
+Before=local-fs.target
+DefaultDependencies=no
+
+[Service]
+Type=forking
+ExecStart=@sbindir@/dmeventd
+PIDFile=@DMEVENTD_PIDFILE@
+OOMScoreAdjust=-1000
+
+[Install]
+WantedBy=sysinit.target
diff --git a/scripts/dm_event_systemd_red_hat.socket b/scripts/dm_event_systemd_red_hat.socket
new file mode 100644
index 0000000..c580555
--- /dev/null
+++ b/scripts/dm_event_systemd_red_hat.socket
@@ -0,0 +1,11 @@
+[Unit]
+Description=Device-mapper event daemon FIFOs
+DefaultDependencies=no
+
+[Socket]
+ListenFIFO=/var/run/dmeventd-server
+ListenFIFO=/var/run/dmeventd-client
+SocketMode=0600
+
+[Install]
+WantedBy=sockets.target
diff --git a/scripts/lvm2_monitoring_systemd_red_hat.service.in b/scripts/lvm2_monitoring_systemd_red_hat.service.in
new file mode 100644
index 0000000..4715416
--- /dev/null
+++ b/scripts/lvm2_monitoring_systemd_red_hat.service.in
@@ -0,0 +1,17 @@
+[Unit]
+Description=Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling
+Requires=dm-event.socket
+After=fedora-storage-init.service fedora-storage-init-late.service
+Before=local-fs.target
+DefaultDependencies=no
+Conflicts=shutdown.target
+
+[Service]
+Type=oneshot
+ExecStart=@sbindir@/lvm vgchange --monitor y
+ExecStop=@sbindir@/lvm vgchange --monitor n
+RemainAfterExit=yes
+
+[Install]
+WantedBy=sysinit.target
+Also=dm-event.socket
reply other threads:[~2011-07-28 12:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E315597.4040103@redhat.com \
--to=prajnoha@redhat.com \
--cc=lvm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.