How to increase datastore size[zfs]

Aug 5, 2019
63
0
6
32
Hi All,

We just setup the new proxmox backup server and we have configured 7TB for initial setup, after that i have increase the size to 7.2TB. I can see the zfs storage size already showing 7.2TB, but datastore size still showing 6.96TB. May i know any method can increase the datastore size?

Tha nk you

root@pbs:/mnt/datastore/backup_disk# zpool list
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
backup_disk 7.19T 3.33G 7.18T - - 0% 0% 1.00x ONLINE -

root@pbs:/mnt/datastore/backup_disk# df -h
Filesystem Size Used Avail Use% Mounted on
udev 7.8G 0 7.8G 0% /dev
tmpfs 1.6G 8.8M 1.6G 1% /run
/dev/mapper/pbs-root 78G 1.4G 73G 2% /
tmpfs 7.9G 0 7.9G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 7.9G 0 7.9G 0% /sys/fs/cgroup
backup_disk 7.0T 3.4G 7.0T 1% /mnt/datastore/backup_disk
tmpfs 1.6G 0 1.6G 0% /run/user/0
 

Attachments

  • zfs.png
    zfs.png
    28.3 KB · Views: 6
  • datastore.png
    datastore.png
    33.5 KB · Views: 6

aaron

Proxmox Staff Member
Staff member
Jun 3, 2019
2,112
279
88
A bit of space will always be used for metadata overhead.
Check the outputs of zpool list and zfs list. The first one taking the whole pool into account, the second one the (file system) datasets on top of the pool.

If you need to store exactly 7.2TiB you should size your pool larger. The rule of thumb is to not fill a ZFS pool to more than 80% because you will lose performance. Once you reach over 90% it is high time to increase the pool size.
 
Aug 5, 2019
63
0
6
32
Thank you. May i know the datastore will auto enlarge ? it seem the zpool list and zfs list showing the size should not matched. Thank you.

root@pbs:~# zpool list
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
backup_disk 7.19T 3.33G 7.18T - - 0% 0% 1.00x ONLINE -
root@pbs:~# zfs list
NAME USED AVAIL REFER MOUNTPOINT
backup_disk 3.33G 6.96T 3.33G /mnt/datastore/backup_disk
 

aaron

Proxmox Staff Member
Staff member
Jun 3, 2019
2,112
279
88
May i know the datastore will auto enlarge ?
That is possible. It depends on how you expand the pool. If you add another set of disks as a new vdev you will see it immediately. If you replace the old disks with larger ones (with a resilver running for each disk!) you might have to adjust the autoexpand pool parameter IIRC.
 
Aug 5, 2019
63
0
6
32
Thank you.

zpool list and zfs list.I have executed the command. May i know any task i need to process when the pool already enlarge. I think the problem should be the file system didn't to enlarge the size.

backup_disk 3.33G 6.96T 3.33G /mnt/datastore/backup_disk

Thank you.
 

aaron

Proxmox Staff Member
Staff member
Jun 3, 2019
2,112
279
88
The difference between zpool list and zfs list is normal.

For example I created this empty pool on a 16GB USB thumb drive:
Code:
zpool list trolo
NAME    SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP    HEALTH  ALTROOT
trolo  14.5G   117K  14.5G        -         -     0%     0%  1.00x    ONLINE  -
Code:
NAME    USED  AVAIL     REFER  MOUNTPOINT
trolo    93K  14.0G       24K  /trolo

There is a difference of about 0.5G. The zpool command will show you the raw value that the pool has while the zfs list command will take into account how much space the metadata needs.
 
Last edited:
  • Like
Reactions: che

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE 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 your own in 60 seconds.

Buy now!