summaryrefslogtreecommitdiffstats
path: root/util.c
diff options
context:
space:
mode:
authorMateusz Kusiak <mateusz.kusiak@intel.com>2024-10-10 12:31:06 +0200
committerMariusz Tkaczyk <mtkaczyk@kernel.org>2025-01-13 10:24:49 +0100
commit8a0d3fea424c1c19c51993c0849ea76ea41e8003 (patch)
treed45b48936296e2d1c5eae446937c344023c023af /util.c
parentDetail: Export reshape status (diff)
downloadmdadm-8a0d3fea424c1c19c51993c0849ea76ea41e8003.tar.xz
mdadm-8a0d3fea424c1c19c51993c0849ea76ea41e8003.zip
mdadm: Do not start reshape before switchroot
There are numerous issues for --grow --continue in switchroot phrase, they include: * Events being missed for restarting grow-continue service. This is apparent mostly on OS on RAID scenarios. When a checkpoint (next step) is committed, we have no reliable way to gracefully stop reshape until it reaches that checkpoint. During boot, there's heavy I/O utilisation, which causes sync speed drop, and naturally checkpoint takes longer to reach. This further causes systemd to forcefully kill grow-continue service due to timeouts, which results in udev event being missed for grow-continue service restart. * Grow-continue (seemingly) was not designed to be restarted without reassembly, some things like stopping chunksize (to lower) migration were straight up not working until recently. This patch makes grow-continue (actual reshape) start after switchroot phrase. This way we should not encounter issues related to restarting the service. Add checks not start a reshape if in initrd, let it initialise only. Change grow-continue udev rule to be triggered whenever there's a reshape happening in metadata, rely on udev event to kick reshape after switchroot. Add handle_forking helper function for reshapes to avoid duplicating code. Signed-off-by: Mateusz Kusiak <mateusz.kusiak@intel.com>
Diffstat (limited to '')
-rw-r--r--util.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/util.c b/util.c
index 6aa44a80..8099852f 100644
--- a/util.c
+++ b/util.c
@@ -2307,6 +2307,7 @@ int continue_via_systemd(char *devnm, char *service_name, char *prefix)
int pid, status;
char pathbuf[1024];
+ dprintf("Start %s service\n", service_name);
/* Simply return that service cannot be started */
if (check_env("MDADM_NO_SYSTEMCTL"))
return 0;