What am I doing wrong here?
This feature is not available yet nor in your version nor in current openzfs version.
https://github.com/openzfs/zfs/blob/master/man/man8/zpool-attach.8#L48
Answer from gapsf on Stack ExchangeAdding Disk to RaidZ1
Add third drive to a zfs mirror possible?
Adding new disks to Raidz | Proxmox Support Forum
Expanding Raidz pool by adding single disk
You can't extend the existing raidz1 vdev by adding another disk but you can add another vdev to the pool to increase the pool's capacity. You'll need more than one additional disk if you want to retain redundancy. For example, you could use two disks to add a mirror vdev or 3+ disks for another raidz1 vdev.
I know this question is old, but I just came across it. It looks like the ability to extend a RAIDZ one drive at a time is in the works! No ETA that I've seen though.
https://www.freebsdfoundation.org/blog/openzfs-raid-z-online-expansion-project-announcement/
You can't expand an existing raidz vdev, you have to blow it away and create it again with the new drive(s). See the other answer for better details.
Side note: Someone actually worked out that it's technically possibly to add drives to a raidz, but the functionality hasn't been implemented. The same is true of removing a disk.
See this thread from one of the FreeBSD lists: http://lists.freebsd.org/pipermail/freebsd-fs/2009-June/006327.html
To quote Dan Naumov,
To reiterate, you cant just add a single disk drive to a raidz1 or raidz2 pool. This is a known limitation (you can check with SUN ZFS docs). If you have an existing raidz and you MUST increase that particular pool's storage capabilities, you have 3 options:
1) Add a raidz of the same configuration to the pool (think 3 disk raidz + 3 disk raidz or 5 + 5, for example)
2) Replace each (and every) disk in your raidz pool one by one, letting it resilver after inserting each upgraded disk
3) Backup your data, destroy your pool and create a new raidz pool with a bigger amount of disks.
Hi, i have a zfs mirror of 4TB drives and i want to add a third 4TB drive. Is it possible to turn zfs mirror to raid z1 without loosing my data?
Update:
so i know i cant turn a mirror to a z1 but how hard is it to add drives to raid z1? for example from 3 to 4
So I am currently building my Ugreen nasync dxp4800(4 possible bays) and while I got my ssds ready, I still need some HDDs. However my setup was already quite expensive and I want to start with 2 or 3 HDDs and add the rest later. How easy is it to add a drive later and add it to an existing pool and is this already possible in proxmox? Which raid level would you recommend?