mirror of
https://github.com/nix-community/disko.git
synced 2026-11-30 13:03:28 +01:00
feat(mdadm); start mdadm before mounting datasets
This commit is contained in:
1 parent
5c7406ecc5
commit
2c40806b93
1 file changed
+13
-2
+13
-2
@@ -82,8 +82,19 @@
|
||||
};
|
||||
_mount = diskoLib.mkMountOption {
|
||||
inherit config options;
|
||||
default = lib.optionalAttrs (config.content != null) config.content._mount;
|
||||
# TODO we probably need to assemble the mdadm somehow
|
||||
default =
|
||||
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 {
|
||||
inherit config options;
|
||||
|
||||
Reference in new issue
Block a user