mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
systemd: use {local,remote}-fs-pre.target instead of {local,remote}-fs.target
We want most of our units to be started before any local/remote mount points are mounted - we used {local,remote}-fs.target for this purpose before, but it was not 100% correct as there's even {local,remote}-fs-pre.target special systemd unit reserved for this exact purpose. See also man 7 systemd.special and "local-fs-pre.target"/"remote-fs-pre.target" description.
This commit is contained in:
parent
28aff5d240
commit
cb82919b0d
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.133 -
|
Version 2.02.133 -
|
||||||
======================================
|
======================================
|
||||||
|
Fix lvm2-{activation,clvmd,cmirrord,monitor} service to exec before mounting.
|
||||||
|
|
||||||
Version 2.02.132 - 22nd September 2015
|
Version 2.02.132 - 22nd September 2015
|
||||||
======================================
|
======================================
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
Version 1.02.110 -
|
Version 1.02.110 -
|
||||||
======================================
|
======================================
|
||||||
|
Fix dm-event systemd service to make sure it is executed before mounting.
|
||||||
|
|
||||||
Version 1.02.109 - 22nd September 2016
|
Version 1.02.109 - 22nd September 2016
|
||||||
======================================
|
======================================
|
||||||
|
@ -28,8 +28,8 @@ layered on top of encrypted devices.
|
|||||||
|
|
||||||
\fIlvm2-activation-net.service\fP
|
\fIlvm2-activation-net.service\fP
|
||||||
used for activation of LVM2 volumes that is ordered after systemd's
|
used for activation of LVM2 volumes that is ordered after systemd's
|
||||||
special \fBremote-fs.target\fP to support LVM2 volumes which are layered
|
special \fBremote-fs-pre.target\fP to support LVM2 volumes which are
|
||||||
on attached remote devices.
|
layered on attached remote devices.
|
||||||
|
|
||||||
Note that all the underlying devices (Physical Volumes) need to be present
|
Note that all the underlying devices (Physical Volumes) need to be present
|
||||||
when the service is run. If the there are any devices presented in the system
|
when the service is run. If the there are any devices presented in the system
|
||||||
|
@ -3,7 +3,7 @@ Description=Device-mapper event daemon
|
|||||||
Documentation=man:dmeventd(8)
|
Documentation=man:dmeventd(8)
|
||||||
Requires=dm-event.socket
|
Requires=dm-event.socket
|
||||||
After=dm-event.socket
|
After=dm-event.socket
|
||||||
Before=local-fs.target
|
Before=local-fs-pre.target
|
||||||
DefaultDependencies=no
|
DefaultDependencies=no
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
|
@ -28,8 +28,8 @@
|
|||||||
#define LVM_CONF_USE_LVMETAD "global/use_lvmetad"
|
#define LVM_CONF_USE_LVMETAD "global/use_lvmetad"
|
||||||
#define LVM_CONF_USE_LVMPOLLD "global/use_lvmpolld"
|
#define LVM_CONF_USE_LVMPOLLD "global/use_lvmpolld"
|
||||||
|
|
||||||
#define UNIT_TARGET_LOCAL_FS "local-fs.target"
|
#define UNIT_TARGET_LOCAL_FS "local-fs-pre.target"
|
||||||
#define UNIT_TARGET_REMOTE_FS "remote-fs.target"
|
#define UNIT_TARGET_REMOTE_FS "remote-fs-pre.target"
|
||||||
|
|
||||||
static char unit_path[PATH_MAX];
|
static char unit_path[PATH_MAX];
|
||||||
static char target_path[PATH_MAX];
|
static char target_path[PATH_MAX];
|
||||||
@ -135,7 +135,7 @@ static int generate_unit(const char *dir, int unit, int sysinit_needed)
|
|||||||
|
|
||||||
if (unit == UNIT_NET) {
|
if (unit == UNIT_NET) {
|
||||||
fprintf(f, "After=%s iscsi.service fcoe.service\n"
|
fprintf(f, "After=%s iscsi.service fcoe.service\n"
|
||||||
"Before=remote-fs.target shutdown.target\n\n"
|
"Before=remote-fs-pre.target shutdown.target\n\n"
|
||||||
"[Service]\n"
|
"[Service]\n"
|
||||||
"ExecStartPre=/usr/bin/udevadm settle\n", unit_names[UNIT_MAIN]);
|
"ExecStartPre=/usr/bin/udevadm settle\n", unit_names[UNIT_MAIN]);
|
||||||
} else {
|
} else {
|
||||||
@ -145,7 +145,7 @@ static int generate_unit(const char *dir, int unit, int sysinit_needed)
|
|||||||
} else
|
} else
|
||||||
fprintf(f, "After= %s cryptsetup.target\n", unit_names[UNIT_EARLY]);
|
fprintf(f, "After= %s cryptsetup.target\n", unit_names[UNIT_EARLY]);
|
||||||
|
|
||||||
fputs("Before=local-fs.target shutdown.target\n"
|
fputs("Before=local-fs-pre.target shutdown.target\n"
|
||||||
"Wants=systemd-udev-settle.service\n\n"
|
"Wants=systemd-udev-settle.service\n\n"
|
||||||
"[Service]\n", f);
|
"[Service]\n", f);
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Description=Clustered LVM daemon
|
Description=Clustered LVM daemon
|
||||||
Documentation=man:clvmd(8)
|
Documentation=man:clvmd(8)
|
||||||
After=dlm.service corosync.service
|
After=dlm.service corosync.service
|
||||||
Before=remote-fs.target
|
Before=remote-fs-pre.target
|
||||||
Requires=network.target dlm.service corosync.service
|
Requires=network.target dlm.service corosync.service
|
||||||
RefuseManualStart=true
|
RefuseManualStart=true
|
||||||
RefuseManualStop=true
|
RefuseManualStop=true
|
||||||
|
@ -3,7 +3,7 @@ Description=Clustered LVM mirror log daemon
|
|||||||
Documentation=man:cmirrord(8)
|
Documentation=man:cmirrord(8)
|
||||||
Requires=corosync.service
|
Requires=corosync.service
|
||||||
After=corosync.service
|
After=corosync.service
|
||||||
Before=remote-fs.target
|
Before=remote-fs-pre.target
|
||||||
DefaultDependencies=no
|
DefaultDependencies=no
|
||||||
Conflicts=shutdown.target
|
Conflicts=shutdown.target
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ Description=Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progres
|
|||||||
Documentation=man:dmeventd(8) man:lvcreate(8) man:lvchange(8) man:vgchange(8)
|
Documentation=man:dmeventd(8) man:lvcreate(8) man:lvchange(8) man:vgchange(8)
|
||||||
Requires=dm-event.socket lvm2-lvmetad.socket
|
Requires=dm-event.socket lvm2-lvmetad.socket
|
||||||
After=dm-event.socket dm-event.service lvm2-lvmetad.socket lvm2-activation.service lvm2-lvmetad.service
|
After=dm-event.socket dm-event.service lvm2-lvmetad.socket lvm2-activation.service lvm2-lvmetad.service
|
||||||
Before=local-fs.target
|
Before=local-fs-pre.target
|
||||||
DefaultDependencies=no
|
DefaultDependencies=no
|
||||||
Conflicts=shutdown.target
|
Conflicts=shutdown.target
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user