Score:1

adding new drive to zfs raidz

cn flag

i have this raid set up:

root@zen:/dev# zpool status zfs-raid
  pool: zfs-raid
 state: ONLINE
status: Some supported and requested features are not enabled on the pool.
    The pool can still be used, but some features are unavailable.
action: Enable all features using 'zpool upgrade'. Once this is done,
    the pool may no longer be accessible by software that does not support
    the features. See zpool-features(7) for details.
  scan: scrub repaired 0B in 12:38:49 with 0 errors on Sun Oct  9 13:02:51 2022
config:

    NAME        STATE     READ WRITE CKSUM
    zfs-raid    ONLINE       0     0     0
      raidz1-0  ONLINE       0     0     0
        sda     ONLINE       0     0     0
        sdb     ONLINE       0     0     0
        sdc     ONLINE       0     0     0

errors: No known data errors

i want to 'grow' this raidz array with some new disks (sdd and sde)

i have tried zpool attach zfs-raid /dev/sdc /dev/sdd but that gives and error: cannot attach /dev/sdd to /dev/sdc: can only attach to mirrors and top-level disks

i have also tried:

root@zen:/dev# zpool add zfs-raid /dev/sdd
invalid vdev specification
use '-f' to override the following errors:
mismatched replication level: pool uses raidz and new vdev is disk

in flag
Are the new disks the same size as the ones currently in the pool?
pgee70 avatar
cn flag
yes they are i bought exactly the same model of disks as before. i decided to back up the data, nuke the pool and start again. that is working and only has about a day to copy left ! ;-)
Score:2
cn flag

TLDR: You cannot add devices to a RAIDZ.

This is an old limitation as mentioned by Dan Naumov in 2009

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.

But current docs still mention it:

zpool attach [-f] [-o property=value] pool device new_device

Attaches new_device to an existing zpool device. The existing device cannot be part of a raidz configuration. If device is not currently part of a mirrored configuration, device automatically transforms into a two-way mirror of device and new_device. If device is part of a two-way mirror, attaching new_device creates a three-way mirror, and so on. In either case, new_device begins to resilver immediately.

pgee70 avatar
cn flag
thanks - that is what i thought - looks like it has been a feature that has been asked for and is in development but not released yet. I just decided to nuke the pool and restore from backup.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.