feat(mdadm); start mdadm before mounting datasets

This commit is contained in:
Bert Proesmans authored and Michael Hoang committed 2026-05-29 08:41:07 +02:00
1 parent 5c7406ecc5
commit 2c40806b93
1 file changed
+13 -2
+13 -2
View File
@@ -82,8 +82,19 @@
}; };
_mount = diskoLib.mkMountOption { _mount = diskoLib.mkMountOption {
inherit config options; inherit config options;
default = lib.optionalAttrs (config.content != null) config.content._mount; default =
# TODO we probably need to assemble the mdadm somehow let
content = lib.optionalAttrs (config.content != null) config.content._mount;
in
{
fs = content.fs or { };
dev = ''
if ! test -e "/dev/md/${config.name}"; then
mdadm --assemble --scan
fi
${content.dev or ""}
'';
};
}; };
_unmount = diskoLib.mkUnmountOption { _unmount = diskoLib.mkUnmountOption {
inherit config options; inherit config options;