Files
disko/tests
Michon van Dooren d192ffd944 Fix zpool create for disk vdev after mirror vdev
A config like

```nix
{
  vdev = [
    {
      mode = "mirror";
      members = [ "data1" "data2" ];
    }
    {
      members = [ "data3" ];
    }
  ];
}
```

would result in the following command:

```shell
zpool create -f <name> mirror /dev/data1 /dev/data2 /dev/data3
```

which would result in a single vdev with a 3-way mirror, rather than a
vdev with a 2-way mirror and a second vdev with a single disk. By
reordering the vdevs to handle those with an empty mode first we
transform this into:

```shell
zpool create -f <name> /dev/data3 mirror /dev/data1 /dev/data2
```

which does have the desired outcome.
2024-11-18 01:33:49 +01:00
..
2024-03-05 08:56:58 +01:00
2023-11-08 22:36:40 +00:00
2023-12-14 16:02:39 +00:00
2024-08-20 10:26:29 +01:00
2023-09-12 09:45:57 +00:00
2023-12-14 16:02:39 +00:00
2024-09-26 15:36:54 +02:00
2024-10-16 17:05:43 +00:00