mirror of
https://github.com/nix-community/disko.git
synced 2026-12-02 22:13: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 {
|
_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;
|
||||||
|
|||||||
Reference in new issue
Block a user