How do I expand my datastore?

Aug 30, 2023
85
12
8
Luxembourg
I have PBS hosted as a PVE VM using a ZFS volume which has now ran out of space. I extended the disk in PVE to hopefully allow me to claim back space but the datastore won't recognise the extra space even though the pool shows as having free space. After looking around I thought it might be because of the "partition 9" of the volume not allowing a "zpool online -e dpool-01 sdb" to expand the partition, but even after deleting it and reboots it's not helping.

How can I get the datastore expanded?

This is the second time this has happened and the last time I gave up and simple blew away the datastore losing my backups - I really like to avoid that again.

root@lenny:~# zpool list
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
dpool-01 1T 993G 31.0G - - 63% 96% 1.00x ONLINE -
rpool 59G 3.27G 55.7G - - 19% 5% 1.00x ONLINE -

root@lenny:~# zfs list dpool-01
NAME USED AVAIL REFER MOUNTPOINT
dpool-01 993G 0B 993G /mnt/datastore/dpool-01

1730601765965.png

1730601818046.png
 
For follow up, I continued to try and gain space in order to perform a GC but failed and in the end messed it up. So I recreated the pool and have started backups from scratch.

It would be nice to know how to properly fix this, as although I had set up a reservation on the volume to allow me to fix this, even that didn't work as the datastore still refused to acknowledge the extra space. Even now after recreating both the ZFS pool and the datastore, the capacity hasn't changed:

1730704285617.png

1730704339756.png

1730704390975.png

I have also set the scheduled GC to run twice per week instead of just once, so hopefully that will keep things under control.
 

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!