rss logo

Expanding 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 was encrypted with LUKS.


ZFS expanding scheme


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


  • Export (unmount) pool
root@host:~# zpool export raid0_01
  • Close LUKS
root@host:~# cryptsetup luksClose zfs01_crypt
  • Copy disk 1 to disk 3
root@host:~# dd if=/dev/sda of=/dev/sdc bs=8M status=progress dd operation on two disks
  • Resize the partition
root@host:~# parted /dev/sdc (parted) resizepart Partition number? 1 End? [2000,0GB]? 4001,0GB (parted) print parted operation on two disks
  • Open LUKS
root@host:~# cryptsetup luksOpen zfs01_crypt
  • Rezize LUKS
root@host:~# cryptsetup resize zfs01_crypt -v parted operation on two disks

Now we have to do the same operation with sdb disk.

Import and resize the new ZFS pool

  • Import (mount) zfs pool
root@host:~# zpool import -a
  • Rezize zfs pool
root@host:~# zpool online -e raid0_01 zfs01_crypt
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Contact :

contact mail address