Resize rpool/ROOT/pve-1 live

Valerio Pachera

Active Member
Aug 19, 2016
131
6
38
43
Hi all, I have a Proxmox 5 server with 2 ssd in zfs raid 1.
During setup I let Proxmox installer to choose the size of swap and root (/).
The root virtual size is huge: 85G and I wish to shrink it.

Is it possible to resize rpool/ROOT/pve-1 live?
How?

Code:
df -h /
Filesystem        Size  Used Avail Use% Mounted on
rpool/ROOT/pve-1   85G  5.2G   80G   7% /

zpool list rpool
NAME    SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
rpool   232G   141G  91.3G         -    37%    60%  1.00x  ONLINE  -

zfs list
NAME                       USED  AVAIL  REFER  MOUNTPOINT
rpool                      145G  79.7G    96K  /rpool
rpool/ROOT                5.14G  79.7G    96K  /rpool/ROOT
rpool/ROOT/pve-1          5.14G  79.7G  5.14G  /
rpool/data                 131G  79.7G    96K  /rpool/data
rpool/data/vm-100-disk-1   131G  79.7G   131G  -
rpool/swap                8.50G  84.0G  4.17G  -
 
Hi Valerio,
you don't need to shrink root partition, because 85 GB is the total space of zfs pool.
This space will be uset for VMs too in thin provisioning
 
Thank you for your reply.
Well, what I fear is something start writing in the / filling up all the availabel space.
This is unprobabile but no impossible.

Virtual space of rpool/ROOT + virtual space of rpool/data > phisical space.

In such case, the gest will start getting I/O.
In the worse case, the guest filesystem may corrupt.
I didn't test this on zfs but once I had a guest corrupted on lvm-thin because of overbooking.
I would feel more safe if the sum of virtual space is smaller than the physical space, also for snapshots use.

So, do anybody know if it's possible to resize / live ?
 

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!