[FIX] expanding ZFS raid-z vdev with newly added disks?

Question

I realize it’s only recently become possible, via the new zfs raid-z vdev expansion feature:

https://github.com/openzfs/zfs/pull/12225
https://freebsdfoundation.org/blog/raid-z-expansion-feature-for-zfs/
https://louwrentius.com/zfs-raidz-expansion-is-awesome-but-has-a-small-caveat.html

Using Ubuntu 22.04.1 LTS (jammy) & OpenZFS via zfsutils-linux version 2.1.4-0ubuntu0.1 (as reported by dpkg -l | grep zfsutils). Use case is a home Samba NAS.

Starting with a 6 drive zpool pulled from an older machine (zpool import) and have run zpool upgrade -a

[email protected]:~$ zpool status
  pool: tank
 state: ONLINE
  scan: resilvered 1.46M in 00:00:02 with 0 errors on Wed Sep 21 12:06:07 2022
config:

        NAME                        STATE     READ WRITE CKSUM
        tank                        ONLINE       0     0     0
          raidz2-0                  ONLINE       0     0     0
            wwn-0x5000c50063d584b2  ONLINE       0     0     0
            wwn-0x5000c50090e6b172  ONLINE       0     0     0
            wwn-0x5000c50063dde13d  ONLINE       0     0     0
            wwn-0x5000c50063d6e22c  ONLINE       0     0     0
            wwn-0x5000c50063d6b472  ONLINE       0     0     0
            wwn-0x5000c50063d965df  ONLINE       0     0     0

errors: No known data errors

Good so far…

I’ve added two additional drives to the system (total of 8), identical size & model to drives above. Linux sees the two added drives (for a total of 8) as sdf & sdg

I’d expected to expand raidz2-0 adding the two new disks via this cmd for each new drive:

[email protected]:/tank/public$ sudo zpool attach -f tank raidz2-0 {drivename}
cannot attach {drivename} to raidz2-0: can only attach to mirrors and top-level disks

What am I doing wrong here?

Thanks!

Bob

Click Here to see answer

0
payam 2 weeks 2022-09-21T16:50:57+00:00 0 Answers 4 views

Leave an answer

By answering, you agree to the Terms of Service and Privacy Policy.