I see there is a /lib/systemd/system-shutdown/mdadm.shutdown file that executes mdadm --wait-clean --scan right before actual shutdown.
When using nut-server, a /lib/systemd/system-shutdown/nutshutdown file exists that waits for a few seconds (ups.delay.shutdown=20 seconds by default on my system) before asking the UPS to cut power in case a forced shutdown is underway.
My question is: if the md array had an operation going on, is it safe to kill it? systemd will wait for all processes to finish before the actual shutdown, but nut could potentially bypass it by commanding the UPS to cut power. mdadm could still be running at that point?
Debian 13, systemd 257.8, mdadm 4.4, nut-server 2.8.1
I see there is a
/lib/systemd/system-shutdown/mdadm.shutdownfile that executesmdadm --wait-clean --scanright before actual shutdown.When using
nut-server, a/lib/systemd/system-shutdown/nutshutdownfile exists that waits for a few seconds (ups.delay.shutdown=20seconds by default on my system) before asking the UPS to cut power in case a forced shutdown is underway.My question is: if the md array had an operation going on, is it safe to kill it? systemd will wait for all processes to finish before the actual shutdown, but nut could potentially bypass it by commanding the UPS to cut power. mdadm could still be running at that point?
Debian 13, systemd 257.8, mdadm 4.4, nut-server 2.8.1