[systemd-devel] Best way to configure longer start timeout for .device units?
Lennart Poettering
lennart at poettering.net
Sat Apr 29 11:40:03 UTC 2017
On Fri, 28.04.17 09:36, Michal Sekletar (msekleta at redhat.com) wrote:
> Hi,
>
> On big setups (read: a lot of multipathed disks), probing and
> assembling storage may take significant amount of time. However, by
> default systemd waits only 90s (DefaultTimeoutStartSec) for
> "top-level" device unit to show up, i.e. one that is referenced in
> /etc/fstab.
>
> One possible solution is to change JobTimeout for device unit by
> adding x-systemd.device-timeout= option to fstab entries. This is
> kinda ugly.
>
> Another option is to bump value of DefaultTimeoutStartSec, since that
> is what systemd uses as default timeout for device's unit start job.
> However, this has possible negative effect on all other units as well,
> e.g. service Exec* timeouts will be affected by this change.
>
> I am looking for elegant solution that doesn't involve rewriting
> automation scripts that manage /etc/fstab.
>
> Is there any other way how to configure the timeout? Can't we
> introduce new timeout value specifically for device units?
>
> Any advice is much appreciated, thanks.
Note that x-systemd.device-tiemout= is implemented by simply writing
out drop-in snippets for the .device unit. Hence, if you know the
device unit names ahead you can write this out from any tool you like.
I am not overly keen on adding global but per-unit-type options for
this, but then again I do see the usefulness, hence such a
DefaultDeviceTimeoutStartSec= setting might be OK to add...
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list