Expand rpool Partition in Proxmox

My main Proxmox hard drive was filling up recently...


NAME    SIZE  ALLOC FREE CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP    HEALTH
rpool   451G   396G 55G        -         -    32%    89%  1.00x    ONLINE
zpool list

but I realized the partition was only half the size of the disk!  (Proxmox was originally installed on a smaller disk and copied to it's current disk with dd.)

So I pulled up the drive partitions:

Disk /dev/sdh: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt

Device       Start       End   Sectors   Size Type
/dev/sdh1       34      2047      2014  1007K BIOS boot
/dev/sdh2     2048   1050623   1048576   512M EFI System
/dev/sdh3  1050624 937703054 936652431 446.6G Solaris /usr & Apple ZFS
fdisk -l /dev/sdh

Disk: /dev/sdh

Partition I wanted to expand /dev/sdh3

[For spoiler on the one line resize scroll to the end.]

I started to go through the fdisk flow of resizing the partition but paniced once I realized I had to delete the partition, re-write it, and then saw messages like Created a new partition 3 of type 'Linux Filesystem' and of size 884.4 GiB. and Partition #3 contains a zfs_member signature. I wasn't sure if the partiton was right or not!

Device       Start        End    Sectors   Size Type
/dev/sdh1       34       2047       2014  1007K BIOS boot
/dev/sdh2     2048    1050623    1048576   512M EFI System
/dev/sdh3  1050624 1855717376 1854666753 884.4G Linux filesystem
when I displayed my in memory partition table with p the type had changed from "Solaris /usr & Apple ZFS" to "Linux filesystem"!

I quickly quit out of fdisk without rewriting the partition. I had remembered something easier from Ubuntu and finally found it! resizepart!

Simple 1 line partition resize to 100%:

I simply ran parted /dev/sdh resizepart 3 100% and the partition grew to 100% like magic! (Obviously use your appropriate disk letter/partition number.)

I made sure the pool would expand

zpool set autoexpand=on rpool
zpool online -e rpool /dev/sdh3
make sure the pool expands

And confirmed it did by rerunning zpool list!

NAME  SIZE  ALLOC FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP    HEALTH 
rpool 900G   396G 504G        -         -    32%    44%  1.00x    ONLINE 

zpool list

Note: the proxmox gui didn't recognize the resize until reboot, but as long as zpool did I was confident things were good!