[SOLVED] How to resize a zfs partition on a FreeBSD 14.1 guest

Nov 25, 2022
4
1
8
I have a FreeBSD 14.1 running as a guest on proxmox 8.2.3.
I have increased the disk size from 150 GB to 400 GB using the GUI of proxmox.
But how do I add the new space to the VM disk (which uses the ZFS file system)???

root@glas:~ # lsblk
DEVICE MAJ:MIN SIZE TYPE LABEL MOUNT
ada0 0:87 400G GPT - -
ada0p1 0:88 512K freebsd-boot gpt/gptboot0 -
<FREE> -:- 492K - - -
ada0p2 0:89 2.0G freebsd-swap gpt/swap0 SWAP
ada0p3 0:90 148G freebsd-zfs gpt/zfs0 <ZFS>
root@glas:~ #
 
There are 2 ways that I know of, one is to use parted and a Linux rescue environment to move the end of the partition. You should set autoexpand=on before doing this to avoid doing a manual zpool online -e
https://sirlagz.net/2023/07/03/updated-live-resize-lvm-on-linux/


The other way is to create another partition on the increased free space and add this to the pool, but this is not ideal as it will be more of a jackleg RAID0 config.
 
There are 2 ways that I know of, one is to use parted and a Linux rescue environment to move the end of the partition. You should set autoexpand=on before doing this to avoid doing a manual zpool online -e
https://sirlagz.net/2023/07/03/updated-live-resize-lvm-on-linux/


The other way is to create another partition on the increased free space and add this to the pool, but this is not ideal as it will be more of a jackleg RAID0 config.
The parted and zpool online did the job. Thank you!