open-cas-linux/utils/open-cas.service
Jan Musial aaedfb35dd Change startup procedure
Current startup procedure works on an assumption that we will
deal with asynchronously appearing devices in asynchronous way
(udev rules) and synchronous events in the system (systemd units)
won't interfere. If we would break anything (mounts) we would just
take those units and restart them. This tactic was working as long
as resetting systemd units took reasonable time.

As hackish as it sounds it worked in all systems that the software
has been validated on. Unfortunately it stopped working because
of *.mount units taking MUCH longer time to restart even on
mainstream OSes, so it's time to change.

This change implements open-cas systemd service which will wait
synchronously with systemd bootup process for all required Open CAS
devices to start. If they don't we fail the boot process just as
failing mounts would. We also make sure that this process takes place
before any mounts (aside from root FS and other critical FS's) are
even attempted. Now opencas-mount-utility can be discarded.

To override this behaviour on per-core basis you can specify
lazy_startup=true option in opencas.conf.

Signed-off-by: Jan Musial <jan.musial@intel.com>
2019-11-14 12:20:08 +01:00

23 lines
512 B
Desktop File

#
# Copyright(c) 2019 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause-Clear
#
[Unit]
Description=opencas initialization service
After=systemd-remount-fs.service
Before=local-fs-pre.target local-fs.target
Wants=local-fs-pre.target local-fs.target
DefaultDependencies=no
OnFailure=emergency.target
OnFailureJobMode=isolate
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/sbin/casctl settle --timeout 150 --interval 5
TimeoutStartSec=3min
[Install]
RequiredBy=local-fs.target local-fs-pre.target