[IncusOS] Cannot add second disk to "local" storage pool

Hi,

I have just setup IncusOS on a Hetzner server following the documentation.

My server has two identical nvme drives and now I’m trying to add the second drive to the “local” zfs storage pool, as described in the docs. Unfortunately though, when I edit the storage configuration with incus admin os system storage edit remote:, nothing happens - the changes are not applied and I don’t see any related logs.

Here’s my full storage configurations:

$ incus admin os system storage show remote:
WARNING: The IncusOS API and configuration is subject to change

config:
  scrub_schedule: 0 4 * * 0
state:
  drives:
  - boot: false
    bus: nvme
    capacity_in_bytes: 1.024209543168e+12
    id: /dev/disk/by-id/nvme-SAMSUNG_MZVLB1T0HBLR-00000_S4GJNF0N316288
    model_family: ""
    model_name: SAMSUNG MZVLB1T0HBLR-00000
    multipath: false
    remote: false
    removable: false
    serial_number: S4GJNF0N316288
    smart:
      available_spare: 100
      data_units_read: 4.98427787e+08
      data_units_written: 1.130180965e+09
      enabled: true
      passed: false
      percentage_used: 152
      power_on_hours: 19987
  - boot: true
    bus: nvme
    capacity_in_bytes: 1.024209543168e+12
    id: /dev/disk/by-id/nvme-SAMSUNG_MZVLB1T0HBLR-00000_S4GJNF0N330948
    member_pool: local
    model_family: ""
    model_name: SAMSUNG MZVLB1T0HBLR-00000
    multipath: false
    remote: false
    removable: false
    serial_number: S4GJNF0N330948
    smart:
      available_spare: 100
      data_units_read: 9.75964574e+08
      data_units_written: 1.18017583e+09
      enabled: true
      passed: false
      percentage_used: 160
      power_on_hours: 23513
  pools:
  - devices:
    - /dev/disk/by-id/nvme-SAMSUNG_MZVLB1T0HBLR-00000_S4GJNF0N330948-part11
    encryption_key_status: available
    name: local
    pool_allocated_space_in_bytes: 4.784128e+06
    raw_pool_size_in_bytes: 9.8784247808e+11
    state: ONLINE
    type: zfs-raid0
    usable_pool_size_in_bytes: 9.8784247808e+11
    volumes:
    - name: incus
      quota_in_bytes: 0
      usage_in_bytes: 2.965504e+06
      use: incus

I have tried to add the second disk to state.pools[0].devices like this:

state:
# [...]
  pools:
  - devices:
    - /dev/disk/by-id/nvme-SAMSUNG_MZVLB1T0HBLR-00000_S4GJNF0N330948-part11
    - /dev/disk/by-id/nvme-SAMSUNG_MZVLB1T0HBLR-00000_S4GJNF0N330948
    # [...]
    type: zfs-raid1
    # [...]

and like this:

state:
# [...]
  pools:
  - devices:
    - /dev/disk/by-id/nvme-SAMSUNG_MZVLB1T0HBLR-00000_S4GJNF0N330948-part11
    - /dev/nvme1n1
    # [...]
    type: zfs-raid1
    # [...]

But, as I said, whenever I do this, nothing happens.

Here’s how the disks are displayed in the Incus UI:

Storage
Disk #1	
Model: SAMSUNG MZVLB1T0HBLR-00000
Type: nvme
ID: nvme0n1
Serial: S4GJNF0N330948
Size: 953.9 GiB
Firmware: EXF7201Q
Read-only: No
Mounted: No
Removable: No
RPM: 0
Block Size: 512 B
PCI Address: 0000:02:00.0
NUMA Node: 0
Device Path: pci-0000:02:00.0-nvme-1
Device ID: nvme-eui.0025388301b9060d
WWN: eui.0025388301b9060d
Partitions:

    ID: nvme0n1p1
    Device: 259:1
    Size: 2.0 GiB
    Partition #: 1
    Mounted: No
    ID: nvme0n1p10
    Device: 259:10
    Size: 25.0 GiB
    Partition #: 10
    Mounted: No
    ID: nvme0n1p11
    Device: 259:11
    Size: 920.6 GiB
    Partition #: 11
    Mounted: No
    ID: nvme0n1p2
    Device: 259:2
    Size: 100.0 MiB
    Partition #: 2
    Mounted: No
    ID: nvme0n1p3
    Device: 259:3
    Size: 16.0 KiB
    Partition #: 3
    Mounted: No
    ID: nvme0n1p4
    Device: 259:4
    Size: 100.0 MiB
    Partition #: 4
    Mounted: No
    ID: nvme0n1p5
    Device: 259:5
    Size: 1.0 GiB
    Partition #: 5
    Mounted: No
    ID: nvme0n1p6
    Device: 259:6
    Size: 16.0 KiB
    Partition #: 6
    Mounted: No
    ID: nvme0n1p7
    Device: 259:7
    Size: 100.0 MiB
    Partition #: 7
    Mounted: No
    ID: nvme0n1p8
    Device: 259:8
    Size: 1.0 GiB
    Partition #: 8
    Mounted: No
    ID: nvme0n1p9
    Device: 259:9
    Size: 4.0 GiB
    Partition #: 9
    Mounted: No

Disk #2	
Model: SAMSUNG MZVLB1T0HBLR-00000
Type: nvme
ID: nvme1n1
Serial: S4GJNF0N316288
Size: 953.9 GiB
Firmware: EXF7201Q
Read-only: No
Mounted: No
Removable: No
RPM: 0
Block Size: 512 B
PCI Address: 0000:01:00.0
NUMA Node: 0
Device Path: pci-0000:01:00.0-nvme-1
Device ID: nvme-eui.0025388301b834ba
WWN: eui.0025388301b834ba

Am I doing something wrong?

You need to send back storage configuration changes under the config: section, not state: :slightly_smiling_face:

We have a task to make the storage API more intuitive to avoid this sort of confusion: Rework storage API to show persistent config · Issue #1009 · lxc/incus-os · GitHub.

That makes so much sense :smiley:
Thank you, it worked.