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 ExchangeYou 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.
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?
You have various options. I'm assuming here that you have the 4 disks arranged as a raidz1 (like raid5) layout. Not ideal, but I won't go into discussions about the best disk layout.
- You can go and buy big 4/5/8/XTB disks in a few years and just replace the disks one by one. When they have all been replaced the size of the pool should increase.
- You can add a second group of 4 disks to the original pool. (Adding a new vdev in ZFS terms). The new vdev should ideally be the same type as the first, so if you first 4 disks are set as raidz1, the next four should be as well.
- You can make a new, independent pool out of the new disks.
Yes. You can swap out the disks in a RAIDZ. You can't change the number of disks. You can also add another RAIDZ to a pool, but you can't remove a RAIDZ from a pool. You might want to take a look at the ZFS Administration Guide before deploying it.
I have two 6tb drives to be used as a media server, and I would like to be able to expand the storage in the future. If I wanted them in a mirror as one vdev, would I then be able to add another two 6tb drives as a mirror vdev to the pool to have 12tb of usable storage? Should I instead have each drive be it's own vdev? Can I create a stripe of my two vdevs now, and later add a drive for redundancy?