From 96815862d88734307021ffe58bb1b9abe01f1d79 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 15 Jul 2023 18:49:49 +0200 Subject: [PATCH] types.mdadm: zap raid after creation --- lib/types/mdadm.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/types/mdadm.nix b/lib/types/mdadm.nix index 500f0df..6769830 100644 --- a/lib/types/mdadm.nix +++ b/lib/types/mdadm.nix @@ -44,6 +44,8 @@ "''${disk_devices[@]}" udevadm trigger --subsystem-match=block udevadm settle + # for some reason mdadm devices spwan with an existing partition table, so we need to wipe it + sgdisk --zap-all /dev/md/${config.name} ${lib.optionalString (config.content != null) config.content._create} ''; };