Skip to content

Refuse to evaluate if zpool is set to mirror if only one device is given #645

@cheriimoya

Description

@cheriimoya

When only giving one disk, installation fails during runtime with nixos-anywhere.

Minimal config:

{
  disko.devices = {
    disk = {
      hdd1 = {
        type = "disk";
        device = "/dev/sda";
        content = {
          type = "zfs";
          pool = "zroot";
        };
      };
    };
    zpool = {
      zroot = {
        type = "zpool";
        mode = "mirror";
        mountpoint = "/";
      };
    };
  };
}

Output:

+ zpool create -f zroot -R /mnt mirror /dev/sda
invalid vdev specification: mirror requires at least 2 devices

Probably this is also a problem with raidz, raidz2 and raidz3 where one could check for at least X disks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions