[systemd-devel] Block device shutdown "hook"

Ian Pilcher arequipeno at gmail.com
Thu Oct 15 16:55:37 PDT 2015


Does systemd provide any sort of "hook" mechanism to call a script
program when a block device is unmounted (or otherwise no longer being
used) on shutdown?

I'm toying with the idea of creating an alternative way of managing
dm-cache devices -- something that will operate a bit more like bcache,
rather than LVM cache.  It seems to be pretty straightforward, except
for the need to properly shutdown the dm-cache once any filesystems,
VGs, etc., on it are no longer in use.

Is there a way to tell systemd how to "shut down" a block device?

Thanks!
-- 
========================================================================
Ian Pilcher                                         arequipeno at gmail.com
-------- "I grew up before Mark Zuckerberg invented friendship" --------
========================================================================



More information about the systemd-devel mailing list