fix #4835: order zfs-import@ before -cache/-scan
this should fix failures of the template instances because either of the two other import services picked up the pool in question first. Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com> Reviewed-by: Stoiko Ivanov <s.ivanov@proxmox.com> Tested-by: Stoiko Ivanov <s.ivanov@proxmox.com>
This commit is contained in:
parent
68be554e71
commit
32ce077088
@ -10,13 +10,16 @@ by scanning /dev/disk/by-id, irrespective of the existence and content of
|
|||||||
the instance name is used unescaped (see systemd.unit(5)), since zpool names
|
the instance name is used unescaped (see systemd.unit(5)), since zpool names
|
||||||
can contain characters which will be escaped by systemd.
|
can contain characters which will be escaped by systemd.
|
||||||
|
|
||||||
|
Its instances are ordered before the other two "big" import services to avoid
|
||||||
|
races and spurious (cosmetic!) service failures.
|
||||||
|
|
||||||
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
|
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
|
||||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||||
---
|
---
|
||||||
etc/Makefile.am | 1 +
|
etc/Makefile.am | 1 +
|
||||||
etc/systemd/system/50-zfs.preset | 1 +
|
etc/systemd/system/50-zfs.preset | 1 +
|
||||||
etc/systemd/system/zfs-import@.service.in | 16 ++++++++++++++++
|
etc/systemd/system/zfs-import@.service.in | 18 ++++++++++++++++
|
||||||
3 files changed, 18 insertions(+)
|
3 files changed, 20 insertions(+)
|
||||||
create mode 100644 etc/systemd/system/zfs-import@.service.in
|
create mode 100644 etc/systemd/system/zfs-import@.service.in
|
||||||
|
|
||||||
diff --git a/etc/Makefile.am b/etc/Makefile.am
|
diff --git a/etc/Makefile.am b/etc/Makefile.am
|
||||||
@ -48,7 +51,7 @@ new file mode 100644
|
|||||||
index 000000000..9b4ee9371
|
index 000000000..9b4ee9371
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/etc/systemd/system/zfs-import@.service.in
|
+++ b/etc/systemd/system/zfs-import@.service.in
|
||||||
@@ -0,0 +1,16 @@
|
@@ -0,0 +1,18 @@
|
||||||
+[Unit]
|
+[Unit]
|
||||||
+Description=Import ZFS pool %i
|
+Description=Import ZFS pool %i
|
||||||
+Documentation=man:zpool(8)
|
+Documentation=man:zpool(8)
|
||||||
@ -57,6 +60,8 @@ index 000000000..9b4ee9371
|
|||||||
+After=cryptsetup.target
|
+After=cryptsetup.target
|
||||||
+After=multipathd.target
|
+After=multipathd.target
|
||||||
+Before=zfs-import.target
|
+Before=zfs-import.target
|
||||||
|
+Before=zfs-import-scan.service
|
||||||
|
+Before=zfs-import-cache.service
|
||||||
+
|
+
|
||||||
+[Service]
|
+[Service]
|
||||||
+Type=oneshot
|
+Type=oneshot
|
||||||
|
Loading…
Reference in New Issue
Block a user