ZFS Accidentally added a disk to a ZFS RaidZ pool, need to remove it

Hi,
I Accidentally added a disk to a ZFS RaidZ pool, but not into the raidz, how can I remove it (gpt/data4t-5)?
Code:
 zpool status -v
  pool: zdata1
 state: ONLINE
  scan: scrub repaired 0B in 11:38:05 with 0 errors on Thu Oct  3 11:57:11 2024
config:

        NAME              STATE     READ WRITE CKSUM
        zdata1            ONLINE       0     0     0
          raidz1-0        ONLINE       0     0     0
            gpt/data4t-1  ONLINE       0     0     0
            gpt/data4t-2  ONLINE       0     0     0
            gpt/data4t-3  ONLINE       0     0     0
            gpt/data4t-4  ONLINE       0     0     0
            gpt/data4t-5    ONLINE       0     0     0

zpool remove  zdata1 gpt/data4t-5
cannot remove gpt/data4t-5: invalid config; all top-level vdevs must have the same sector size and not be raidz
 
Last edited by a moderator:
this disk is actually not in the raidz, if no other way I need to destory the zpool and create new one?
1728737711309.png
 
As stated, unfortunately there's no quick solution for this.
Probably best if you rebuild the original pool at your earliest convenience as the redundancy has taken a hit.



this disk is actually not in the raidz,
Just as a formatting matter: you can cut & pate the text in from your terminal into
[code=rich] <lots of terminal text> [/code]
It looks like:
Rich (BB code):
 zpool status -v
  pool: zdata1
 state: ONLINE
  scan: scrub repaired 0B in 11:38:05 with 0 errors on Thu Oct  3 11:57:11 2024
config:

        NAME              STATE     READ WRITE CKSUM
        zdata1            ONLINE       0     0     0
          raidz1-0        ONLINE       0     0     0
            gpt/data4t-1  ONLINE       0     0     0
            gpt/data4t-2  ONLINE       0     0     0
            gpt/data4t-3  ONLINE       0     0     0
            gpt/data4t-4  ONLINE       0     0     0
          gpt/data4t-5    ONLINE       0     0     0
zpool remove  zdata1 gpt/data4t-5
cannot remove gpt/data4t-5: invalid config; all top-level vdevs must have the same sector size and not be raidz
 
[…] how can I remove it […]
Frankly, you should not be asking this question. As I tried to reproduce the situation, a mismatched replication level warning pops up and you need to override it with ‑force. I really don’t understand this… For Pete’s sake, think, man.​
For future reference you may want to use zpool checkpoints before making such changes.
Or specify the no‑op flag -n to zpool-add(8). It prints the new hierarchy you get if you remove the ‑n flag so you can carefully review it. ? Checkpoints – explained in zpoolconcepts(7) – are needed and useful nevertheless if you need to issue multiple z* commands.​
 
Back
Top