When adding a new disk to ZFS RAID-0, you must ensure that the disk has the same storage size as the other disks.
You will need the gptfdisk
package to use sgdisk
.
hdd='/dev/disk/by-id/<DISKNAME>'
zpool labelclear -f "$hdd" || true
sgdisk --zap-all "$hdd"
sgdisk -n 1:0:0 -t 1:8300 -c 1:"Main Data" "$hdd"
zpool add rpool "$hdd-part1"
After adding a disk to the pool, you may find disk corruptions.
zpool status -v
You can try to restore the corrupted files or just delete them if they don't matter.
Then you have to try to scrub the pool:
# this will try to repair everything (do this after deletion or restoration)
zpool scrub rpool
# when all errors are finally repaired or dropped, do this to clear the state of the pool
zpool clear rpool