From fba7b03a2102c870ec7cbde257adc35337ef1b13 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 1 Oct 2022 19:03:42 +0200 Subject: [PATCH] types mdadm: add metadata option --- types.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/types.nix b/types.nix index 871da48..1c1a36a 100644 --- a/types.nix +++ b/types.nix @@ -892,6 +892,10 @@ rec { type = types.int; default = 1; }; + metadata = mkOption { + type = types.enum [ "1" "1.0" "1.1" "1.2" "default" "ddf" "imsm" ]; + default = "default"; + }; content = diskoLib.deviceType; _meta = mkOption { internal = true; @@ -908,6 +912,8 @@ rec { echo 'y' | mdadm --create /dev/md/${config.name} \ --level=${toString config.level} \ --raid-devices=''${RAIDDEVICES_N_${config.name}} \ + --metadata=${config.metadata} \ + --homehost=any \ ''${RAIDDEVICES_${config.name}} udevadm trigger --subsystem-match=block; udevadm settle ${optionalString (!isNull config.content) (config.content._create "/dev/md/${config.name}")}