[SOLVED] how to shrink 'local' storage and expand 'local-zfs'?

PapaGigas

New Member
Mar 18, 2023
25
0
1
Hi,

I have Proxmox VE installed on ZFS and, since it allocates 50% to each by default, I need to shrink 'local' storage to 32GB and expand 'local-zfs' with the rest of the space that was freed from that process.

Can anyone help me please? Thanks in advanced! ;)
 
Last edited:
RAM not storage space.

Please post the output in CODE tags:
  • df -PHT
  • zpool list
  • zfs list

RAM? ARC is 10% by default on PVE 8 and I'm using a mirror of 118GB Optane drives:

1719501644488.png

1719501748807.png

Code:
root@pve:~# df -PHT
Filesystem                      Type      Size  Used Avail Use% Mounted on
udev                            devtmpfs   68G     0   68G   0% /dev
tmpfs                           tmpfs      14G   17M   14G   1% /run
rpool/ROOT/pve-1                zfs        76G   17G   59G  23% /
tmpfs                           tmpfs      68G   48M   68G   1% /dev/shm
tmpfs                           tmpfs     5.3M     0  5.3M   0% /run/lock
efivarfs                        efivarfs  132k   76k   51k  60% /sys/firmware/efi/efivars
rpool                           zfs        59G  132k   59G   1% /rpool
rpool/var-lib-vz                zfs        74G   16G   59G  22% /var/lib/vz
rpool/ROOT                      zfs        59G  132k   59G   1% /rpool/ROOT
rpool/data                      zfs        59G  132k   59G   1% /rpool/data
overlay                         overlay    76G   17G   59G  23% /var/lib/docker/overlay2/6cd018b655599136ef9c0a38a719466a60ae5b5cf348f94b7ee67222f7cf6a7c/merged
/dev/fuse                       fuse      135M   21k  135M   1% /etc/pve
192.168.1.110:/mnt/kingston/pve nfs4      1.9T     0  1.9T   0% /mnt/pve/truenas
tmpfs                           tmpfs      14G     0   14G   0% /run/user/0

Code:
root@pve:~# zpool list
NAME    SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP    HEALTH  ALTROOT
rpool   108G  50.6G  57.4G        -         -    30%    46%  1.00x    ONLINE  -

Code:
root@pve:~# zfs list
NAME                       USED  AVAIL  REFER  MOUNTPOINT
rpool                     50.6G  54.1G   104K  /rpool
rpool/ROOT                15.8G  54.1G    96K  /rpool/ROOT
rpool/ROOT/pve-1          15.8G  54.1G  15.8G  /
rpool/data                20.2G  54.1G    96K  /rpool/data
rpool/data/vm-100-disk-0   108K  54.1G   108K  -
rpool/data/vm-100-disk-1  2.19G  54.1G  2.19G  -
rpool/data/vm-100-disk-2    64K  54.1G    64K  -
rpool/data/vm-110-disk-0    88K  54.1G    88K  -
rpool/data/vm-110-disk-1  12.5G  54.1G  12.5G  -
rpool/data/vm-110-disk-2    64K  54.1G    64K  -
rpool/data/vm-120-disk-0   136K  54.1G   136K  -
rpool/data/vm-120-disk-1    64K  54.1G    64K  -
rpool/data/vm-130-disk-0   116K  54.1G   116K  -
rpool/data/vm-130-disk-1    64K  54.1G    64K  -
rpool/data/vm-150-disk-0    96K  54.1G    96K  -
rpool/data/vm-150-disk-1  5.49G  54.1G  5.49G  -
rpool/data/vm-150-disk-2    72K  54.1G    72K  -
rpool/var-lib-vz          14.6G  54.1G  14.6G  /var/lib/vz

PS - I see that I've mixed up the allocation, it's not 50% of the space, but what am I missing? :/
 
Last edited:
RAM? ARC is 10% by default on PVE 8
Oh ... never checked. Thank you.


PS - I see that I've mixed up the allocation, it's not 50% of the space, but what am I missing?
In ZFS, the space is there for everything, so you don't need to reallocate. The free space of 59G is the free space of your pool.
In your root dataset, you have a lot of stuff there, 17G is huge for a PVE install and probably the docker stuff (layers, volumes etc.) takes the majority of it.
 
In ZFS, the space is there for everything, so you don't need to reallocate. The free space of 59G is the free space of your pool.
In your root dataset, you have a lot of stuff there, 17G is huge for a PVE install and probably the docker stuff (layers, volumes etc.) takes the majority of it.

But why is it showing less than 80GB as total capacity? even with those 17GB there's still some storage unaccounted for:

1719506932484.png
 
Code:
root@pve:~# zfs list
NAME                       USED  AVAIL  REFER  MOUNTPOINT
rpool/ROOT/pve-1          15.8G  54.1G  15.8G  /
rpool/data                20.2G  54.1G    96K  /rpool/data
rpool/var-lib-vz          14.6G  54.1G  14.6G  /var/lib/vz

This is where your storage is gone.

To be honest I don't understand how Proxmox was taking so much space, this is more in line to what I'm used to... thanks! ;)

1719536385581.png
 

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!