[systemd-devel] User configs, BTRFS subvolume for /home and automatic service start during boot?

Andrei Borzenkov arvidjaar at gmail.com
Fri May 4 10:07:11 UTC 2018


On Fri, May 4, 2018 at 9:14 AM, Thorsten Schöning <tschoening at am-soft.de> wrote:
> Guten Tag Andrei Borzenkov,
> am Freitag, 4. Mai 2018 um 06:57 schrieben Sie:
>
>> Or you can enable linger in
>> which case user instance will be started on boot.
>
> That's the part not working in my setup for some reason.
>
>> Which services will actually be started depends on this user's
>> configuration, which services are enabled. It sounds like you may not
>> have enabled them or at least not enabled for the correct top-level target.
>
> I'm pretty sure they are enabled, all the documented directories,
> files and links are available AND the services are started if I do it
> manually

How does it confirm that units are enabled?

> using SSH and "systemctl start ...". The service itself is
> pretty standard as well:
>
>> [Unit]
>> Description=Test /home being a subvolume in BTRFS and containing a service.
>>
>> [Install]
>> WantedBy=multi-user.target
>>
>> [Service]
>> Type=oneshot
>> ExecStart=/bin/bash -c "echo Works: `date` >> /home/tschoening/btrfs_home_test/ping.txt"
>
> Do you see any error?

There is no multi-user.target in user instance (unless you added it
yourself), user instance starts default.target. Which is incidentally
true also for system instance unless explicitly overridden, usually on
kernel command line.

> It is enabled using "systemctl --user enable ..."
> using the absolut path

That just makes it depedency of multi-user.target which itself does not exist.

> and can be diabled the same way and started
> manually. It's only not started automaticalyl, neither if I login
> using SSH, nor at boot time.
>
> So am I missing something in the service config or regarding
> "enable-linger"?
>
> Mit freundlichen Grüßen,
>
> Thorsten Schöning
>
> --
> Thorsten Schöning       E-Mail: Thorsten.Schoening at AM-SoFT.de
> AM-SoFT IT-Systeme      http://www.AM-SoFT.de/
>
> Telefon...........05151-  9468- 55
> Fax...............05151-  9468- 88
> Mobil..............0178-8 9468- 04
>
> AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
> AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow
>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel


More information about the systemd-devel mailing list