[SOLVED] ZFS: enable thin provisioning

Valerio Pachera

Active Member
Aug 19, 2016
131
6
38
42
Hi all, I'm managing a proxmox 5.1-43 server.
I was not the one who installed it.
It has two main zfs volumes.

Code:
zpool iostat
              capacity     operations     bandwidth
pool        alloc   free   read  write   read  write
----------  -----  -----  -----  -----  -----  -----
rpool       9.99G   918G      0     22  13.9K   263K
storage      259G   629G     37     37   424K   839K
storage2     406G  1.42T     20      4   995K   169K
----------  -----  -----  -----  -----  -----  -----

"storage" is on ssd.
I noticed the flag Thin provisioning is note set.

upload_2018-2-20_9-5-39.png

I guess this way, if I set 'discard' option on a guest, it's not going to work.

Is it possible to eneable now?
Shall I shut down guests before doing that?
Are you aware of other bad conseguences?

Thank you.
 
Last edited:
  • Like
Reactions: Mecanik
Just enable it, it'll be used for all new datasets.

For already created ones, just reset the ZFS property refreservation:

Code:
root@proxmox4 ~ > zfs list rpool/data/vm-100-disk-1
NAME                       USED  AVAIL  REFER  MOUNTPOINT
rpool/data/vm-100-disk-1   132G   832G    64K  -

root@proxmox4 ~ > zfs get all rpool/data/vm-100-disk-1
NAME                      PROPERTY              VALUE                 SOURCE
rpool/data/vm-100-disk-1  type                  volume                -
rpool/data/vm-100-disk-1  creation              Mi Feb 21 13:29 2018  -
rpool/data/vm-100-disk-1  used                  132G                  -
rpool/data/vm-100-disk-1  available             832G                  -
rpool/data/vm-100-disk-1  referenced            64K                   -
rpool/data/vm-100-disk-1  compressratio         1.00x                 -
rpool/data/vm-100-disk-1  reservation           none                  default
rpool/data/vm-100-disk-1  volsize               128G                  local
rpool/data/vm-100-disk-1  volblocksize          8K                    -
rpool/data/vm-100-disk-1  checksum              on                    default
rpool/data/vm-100-disk-1  compression           lz4                   inherited from rpool
rpool/data/vm-100-disk-1  readonly              off                   default
rpool/data/vm-100-disk-1  copies                1                     default
rpool/data/vm-100-disk-1  refreservation        132G                  local
rpool/data/vm-100-disk-1  primarycache          all                   default
rpool/data/vm-100-disk-1  secondarycache        all                   default
rpool/data/vm-100-disk-1  usedbysnapshots       0                     -
rpool/data/vm-100-disk-1  usedbydataset         64K                   -
rpool/data/vm-100-disk-1  usedbychildren        0                     -
rpool/data/vm-100-disk-1  usedbyrefreservation  132G                  -
rpool/data/vm-100-disk-1  logbias               latency               default
rpool/data/vm-100-disk-1  dedup                 off                   default
rpool/data/vm-100-disk-1  mlslabel              none                  default
rpool/data/vm-100-disk-1  sync                  standard              inherited from rpool
rpool/data/vm-100-disk-1  refcompressratio      1.00x                 -
rpool/data/vm-100-disk-1  written               64K                   -
rpool/data/vm-100-disk-1  logicalused           30K                   -
rpool/data/vm-100-disk-1  logicalreferenced     30K                   -
rpool/data/vm-100-disk-1  snapshot_limit        none                  default
rpool/data/vm-100-disk-1  snapshot_count        none                  default
rpool/data/vm-100-disk-1  snapdev               hidden                default
rpool/data/vm-100-disk-1  context               none                  default
rpool/data/vm-100-disk-1  fscontext             none                  default
rpool/data/vm-100-disk-1  defcontext            none                  default
rpool/data/vm-100-disk-1  rootcontext           none                  default
rpool/data/vm-100-disk-1  redundant_metadata    all                   default

root@proxmox4 ~ > zfs set refreservation=none rpool/data/vm-100-disk-1

root@proxmox4 ~ > zfs list rpool/data/vm-100-disk-1
NAME                       USED  AVAIL  REFER  MOUNTPOINT
rpool/data/vm-100-disk-1    64K   832G    64K  -
 

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!