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

Nov 25, 2022
3
1
3
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!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!