Skip to content

Instantly share code, notes, and snippets.

@Davis-A
Davis-A / raidz expansion
Last active November 10, 2023 20:00
Someone in lobste.rs asked if you could expand a 4 disk raidz3 into a larger and larger pool. The answer is yes! https://lobste.rs/s/roqgoz/zfs_raidz_expansion_merged#c_rqtyqg
[root@devbox ~]# # --- zfs version ----
[root@devbox ~]# zfs version
zfs-2.2.99-0
zfs-kmod-2.2.99-0
[root@devbox ~]# # --- note: 2.2.99 is what you get if you build of master at the moment ---
[root@devbox ~]# # --- Create some disks ----
[root@devbox ~]# mkdir -p /root/zfs-sparse/
[root@devbox ~]# truncate -s 16GB /root/zfs-sparse/d1.img
[root@devbox ~]# truncate -s 16GB /root/zfs-sparse/d2.img
[root@devbox ~]# truncate -s 16GB /root/zfs-sparse/d3.img
This file has been truncated, but you can view the full file.
Checking - uboot-mkimage-2010.12 .. OK.
Checking - lzma .. OK.
Checking - perl5 .. OK.
Checking - rsync .. OK.
Checking - mips-xtoolchain-gcc .. OK.
*** Configuration file : tl-wdr3600
*** Base configuration : mips_ap
*** Platform : mips_ap
Build list: buildworld buildkernel installworld installkernel distribution fetchpkgs mfsroot makepkgs addpkgs fsimage tplink
*** Target : buildworld
This file has been truncated, but you can view the full file.
Checking - uboot-mkimage-2010.12 .. OK.
Checking - lzma .. OK.
Checking - perl5 .. OK.
Checking - rsync .. OK.
Checking - mips-xtoolchain-gcc .. OK.
*** Configuration file : tl-wdr3600
*** Base configuration : mips_ap
*** Platform : mips_ap
Build list: buildworld buildkernel installworld installkernel distribution fetchpkgs mfsroot makepkgs addpkgs fsimage tplink
*** Target : buildworld
Checking - uboot-mkimage-2010.12 .. OK.
Checking - lzma .. OK.
Checking - perl5 .. OK.
Checking - rsync .. OK.
Checking - mips-xtoolchain-gcc .. OK.
*** Configuration file : tl-wdr3600
*** Base configuration : mips_ap
*** Platform : mips_ap
Build list: buildworld buildkernel installworld installkernel distribution fetchpkgs mfsroot makepkgs addpkgs fsimage tplink
*** Target : buildworld
This file has been truncated, but you can view the full file.
Checking - uboot-mkimage-2010.12 .. OK.
Checking - lzma .. OK.
Checking - perl5 .. OK.
Checking - rsync .. OK.
Checking - mips-xtoolchain-gcc .. OK.
*** Configuration file : tl-wdr3600
*** Base configuration : mips_ap
*** Platform : mips_ap
Build list: buildworld buildkernel installworld installkernel distribution fetchpkgs mfsroot makepkgs addpkgs fsimage tplink
*** Target : buildworld
This file has been truncated, but you can view the full file.
Checking - uboot-mkimage-2010.12 .. OK.
Checking - lzma .. OK.
Checking - perl5 .. OK.
Checking - rsync .. OK.
Checking - mips-xtoolchain-gcc .. OK.
*** Configuration file : tl-wdr3600
*** Base configuration : mips_ap
*** Platform : mips_ap
Build list: buildworld buildkernel installworld installkernel distribution fetchpkgs mfsroot makepkgs addpkgs fsimage tplink
*** Target : buildworld