[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#728486: Current patch for resolving lvm/systemd compatibility



Untested patch:

- Static services with the correct name.
- lvm2.service is statically hooked to local-fs.target, as all local
  mounts.
- lvm2-early.service is statically hooked to cryptsetup.target, as all
  crypto devices.

| drwxr-xr-x root/root         0 2014-01-18 12:32 ./lib/systemd/
| drwxr-xr-x root/root         0 2014-01-18 12:49 ./lib/systemd/system/
| -rw-r--r-- root/root       310 2014-01-18 12:34 ./lib/systemd/system/lvm2-early.service
| -rw-r--r-- root/root       301 2014-01-18 12:48 ./lib/systemd/system/lvm2.service
| drwxr-xr-x root/root         0 2014-01-18 12:49 ./lib/systemd/system/cryptsetup.target.wants/
| drwxr-xr-x root/root         0 2014-01-18 12:49 ./lib/systemd/system/local-fs.target.wants/
| lrwxrwxrwx root/root         0 2014-01-18 12:49 ./lib/systemd/system/cryptsetup.target.wants/lvm2-early.service -> ../lvm2-early.service
| lrwxrwxrwx root/root         0 2014-01-18 12:49 ./lib/systemd/system/local-fs.target.wants/lvm2.service -> ../lvm2.service

Index: debian/tree/lvm2/lib/systemd/system/cryptsetup.target.wants/lvm2-early.service
===================================================================
--- debian/tree/lvm2/lib/systemd/system/cryptsetup.target.wants/lvm2-early.service	(revision 0)
+++ debian/tree/lvm2/lib/systemd/system/cryptsetup.target.wants/lvm2-early.service	(working copy)
@@ -0,0 +1 @@
+link ../lvm2-early.service
\ No newline at end of file

Property changes on: debian/tree/lvm2/lib/systemd/system/cryptsetup.target.wants/lvm2-early.service
___________________________________________________________________
Added: svn:special
## -0,0 +1 ##
+*
\ No newline at end of property
Index: debian/tree/lvm2/lib/systemd/system/local-fs.target.wants/lvm2.service
===================================================================
--- debian/tree/lvm2/lib/systemd/system/local-fs.target.wants/lvm2.service	(revision 0)
+++ debian/tree/lvm2/lib/systemd/system/local-fs.target.wants/lvm2.service	(working copy)
@@ -0,0 +1 @@
+link ../lvm2.service
\ No newline at end of file

Property changes on: debian/tree/lvm2/lib/systemd/system/local-fs.target.wants/lvm2.service
___________________________________________________________________
Added: svn:special
## -0,0 +1 ##
+*
\ No newline at end of property
Index: debian/tree/lvm2/lib/systemd/system/lvm2-early.service
===================================================================
--- debian/tree/lvm2/lib/systemd/system/lvm2-early.service	(revision 0)
+++ debian/tree/lvm2/lib/systemd/system/lvm2-early.service	(working copy)
@@ -0,0 +1,11 @@
+[Unit]
+Description=Activation of LVM2 logical volumes
+Documentation=man:lvm(8) man:vgchange(8)
+DefaultDependencies=no
+After=systemd-udev-settle.service
+Before=cryptsetup.target local-fs.target shutdown.target
+
+[Service]
+ExecStartPre=/bin/udevadm settle
+ExecStart=/sbin/lvm vgchange -aay --sysinit
+Type=oneshot
Index: debian/tree/lvm2/lib/systemd/system/lvm2.service
===================================================================
--- debian/tree/lvm2/lib/systemd/system/lvm2.service	(revision 0)
+++ debian/tree/lvm2/lib/systemd/system/lvm2.service	(working copy)
@@ -0,0 +1,11 @@
+[Unit]
+Description=Activation of LVM2 logical volumes
+Documentation=man:lvm(8) man:vgchange(8)
+DefaultDependencies=no
+After=lvm2-early.service cryptsetup.target
+Before=local-fs.target shutdown.target
+
+[Service]
+ExecStartPre=/bin/udevadm settle
+ExecStart=/sbin/lvm vgchange -aay --sysinit
+Type=oneshot


Reply to: