Running Ubuntu 22.04 LTS
Had a pool consisting of 1 vdev raidz2 with 6 x 12tb. These disks had partitions (gdisk and partition type a504) and those gpt partitions were contributing to the raidz2 vdev.
Expansion was needed, procured 6 x 20TB and partitioned these to the exact same size as the 12TB’s, thinking if anything went wrong I wasn’t stuck due to larger disks or anything.
But how do I easily extend the partitions now? What is the best approach? I am reading about redoing the full partition with gdisk (which i used before to do the initial partition) but i don’t feel much about creating a full partition, because that’s what you need to do with gdisk, you issue a start and end and a new name. I’d rather issue a command “extend partition”.
I am even willing to boot Gparted but afaics it doesnt support ZFS partitions.
I understand the anxiousness, but partitions are not stateful constructs. There is no difference between “resizing” a partition and deleting it, then recreating it with the same start and an end further away. So first use fdisk (or gdisk) to print the entire partition layout, and save that layout. Then destroy the partition, and recreate it with the same start, but an end further away. You’ll be fine.
After a small debate (Ubuntu resize zfs partitions - #2 by mercenary_sysadmin) and getting some courage I executed the following things and this was eventually the easiest solution which I was also looking for:
Boot in Linux,
make sure you have parted installed
check with any tool you want what the partition number is for the partition you want to extend,
for device /dev/sda this would be:
parted /dev/sda resizepart 1 100%
Do this for all disks and check if the pool got autoexpanded or not, if not expand the pool manually.