[systemd-devel] Block device shutdown "hook"

Lennart Poettering lennart at poettering.net
Sat Oct 17 06:41:15 PDT 2015


On Fri, 16.10.15 12:24, Ian Pilcher (arequipeno at gmail.com) wrote:

> On 10/16/2015 05:25 AM, Kay Sievers wrote:
> >Systemd, as the very last step at system reboot/shutdown tries to
> >stop/disassemle/unmount all active mounts/mapper/loop/... devices, but
> >that works only for simple storage setups and has no hooks for other
> >tools.
> 
> This is the DM_DEV_REMOVE ioctl call in delete_dm() (in
> src/core/umount.c), right?

Yes.

> If that's good enough for an LVM cache device, it's hard to see how it
> wouldn't be good enough for a dm-cache device created in some other
> way.

Note that the loop Kay mentioned is done very late at shutdown, right
at the time we do the final killing spree of everything that was not
terminated cleanly using the normal state machine.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list