Raidz1 expansion

Hi!

I was looking for hints on how to add another disk to my 3x wide z1 array to increase the available space. After backup of the data I tried to add a new drive to the list of drives in the pool with “incus admin os system storage edit”, but it replaced one of the drives instead.In the end I created a temporary privileged container to run native zfs commands and this actually worked. There could be a better way to accomplish this, but I did not find it. Maybe this will help someone in the similar situation. Always backup your data first of course.

Expanding RAIDZ1 Array on IncusOS

Here is a guide for expanding your RAIDZ1 array on IncusOS using a privileged container. Creation of the container is out of scope.

1. Map Devices to the Container

From your Incus client, map the ZFS control device and the new physical drive into your container (assumed name cli).


# Map ZFS control device

incus config device add cli zfs unix-char source=/dev/zfs path=/dev/zfs

# Map the new NVMe drive

incus config device add cli spare-disk unix-block source=/dev/disk/by-id/<NEW_DISK_ID> path=/dev/disk/by-id/<NEW_DISK_ID>

2. Execute the Expansion

Enter the container and run the OpenZFS expansion command.


incus exec cli -- bash

# Verify your vdev name (usually raidz1-0) (assumed pool name fast)

zpool status fast

# Expand the array (Syntax: zpool attach <pool> <vdev> <new_disk>)

zpool attach fast raidz1-0 /dev/disk/by-id/<NEW_DISK_ID>

exit

3. Cleanup

Remove the block device mapping from the container.


incus config device remove cli spare-disk

incus config device remove cli zfs

2 Likes

Maybe you wanna edit the Title: HOWTO ZFS Raidz1 expansion ?

That would have been better indeed, but I do not see an option to change topic title.

If I hover next to the title on a topic I created, an edit pencil appears:
image
If this doesn’t work for you, then it might be something to do with your user level. (At least some forums grant fewer privileges to new users than longer established users; I don’t know if that’s the case here)

1 Like