How To : Extend a ZFS RAID0 pool


I was in a situation where I needed to migrate two disks in a ZFS RAID0 pool. The goal was to extend the ZFS pool by replacing the disks with larger ones. Each disk is encrypted with LUKS.



First I will do a copy from sda 2To disk to sdc 4To disk thanks to dd tool.


root@host:~# zpool export raid0_01
root@host:~# cryptsetup luksClose zfs01_crypt
root@host:~# dd if=/dev/sda of=/dev/sdc bs=8M status=progress
root@host:~# parted /dev/sdc
(parted) resizepart
Partition number? 1
End?  [2000,0GB]? 4001,0GB
(parted) print
root@host:~# cryptsetup luksOpen zfs01_crypt
root@host:~# cryptsetup resize zfs01_crypt -v
root@host:~# zpool import -a
root@host:~# zpool online -e raid0_01 zfs01_crypt

Now we can simply do the same with sdb 4To and sdd 8To disks.

Licence Creative Commons
This website is licensed to the public under a licence Creative Commons Attribution licence.
Contact :