[systemd-devel] after=local-fs not enforced

Andrei Borzenkov arvidjaar at gmail.com
Fri Nov 25 03:47:38 UTC 2016


25.11.2016 00:50, Benoit SCHMID пишет:
> Hello,
> 
> 
> On 11/24/2016 08:14 PM, Andrei Borzenkov wrote:
>> What is blkdeactivate? It does not belong to systemd.
> 
> You are asking too much, for me, Andrei because it comes from RH repo :-)
> 

Well, it appears it is part of LVM2.

Version 2.02.98 - 15th October 2012
  Introduce blkdeactivate script to deactivate block devs with dependencies.


> I have found this on my host:
> 
> # cat /usr/lib/systemd/system/blk-availability.service
> [Unit]
> Description=Availability of block devices
> After=lvm2-activation.service lvm2-lvmetad.service
> iscsi-shutdown.service iscsi.service iscsid.service fcoe.service
> DefaultDependencies=no
> Conflicts=shutdown.target
> 
> [Service]
> Type=oneshot
> ExecStart=/usr/bin/true
> ExecStop=/usr/sbin/blkdeactivate -u -l wholevg -m disablequeueing

Yes, this is the command that tries to unmount filesystems on LVM2
devices, thus bypassing systemd normal dependencies. The idea of such
service is very questionable, but it is probably not something you can
really change.

You can try to add drop-in to order this service after
systemd-logind.service on shutdown, but I would contact RH and verify
that they agree to support this. In any case, this is not systemd issue.

> RemainAfterExit=yes
> 
> [Install]
> WantedBy=sysinit.target
> 
> # systemctl status blk-availability
> ● blk-availability.service - Availability of block devices
>    Loaded: loaded (/usr/lib/systemd/system/blk-availability.service;
> disabled; vendor preset: disabled)
>    Active: active (exited) since Thu 2016-11-24 15:25:32 CET; 7h ago
>   Process: 2653 ExecStart=/usr/bin/true (code=exited, status=0/SUCCESS)
>  Main PID: 2653 (code=exited, status=0/SUCCESS)
>    CGroup: /system.slice/blk-availability.service
> 
> Nov 24 15:25:32 beryl5 systemd[1]: Starting Availability of block
> devices...
> Nov 24 15:25:32 beryl5 systemd[1]: Started Availability of block devices.
> 
> Is this enough to answer your question?
> 

Well,



More information about the systemd-devel mailing list