Embarassing. Can't figure out why blank ZVOL is using space?

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
I am messing around with ZSTD compression for fun and I'm moving ZVOLs around my SSDS in my system.

I have 3 VMs using 3 ZVOLs with maximum compression. They're fantastic - only 21GB for them. (before snapshots)
I am creating 3 'blank' ZVOLS to migrate them to another SSD, the 3 blank ZVOLS I'm creating the same way I created the current ones they're using.

When I do so, instantly, all drive space is allocated. I'm not ticking 'sparse' or 'force size'.
The resulting zvols are using ALL allocated space, immediately, before even ZFS send / recving data to them.



To be clear the ones at the bottom ARE VM ZVOLS, running and live, consuming a total of 21.9GB. The disks are /allocated/ 10/10/80GB - but they're consuming 21.9GB

Why, when I go to create the top ones, does it instantly allocate 101.5GB and when I send / recv into those ZVOLs they get even larger still?
I'm clearly missing something here.
See screenshot:
TllDR0f.png


I 100,000% created the bottom disks, only yesterday, using the same method and they consumed only 21GB.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
I'm not ticking 'sparse' or 'force size'.
If you don't tick "sparse" then the size of the ZVOL will be reserved instantly. That is a feature. Just enable "sparse" if you want a growing ZVOL.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
I swear on my life, I did not originally tick that box, so I'm baffled how they can be created as sparse now.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Try zfs set refreservation=none <volume name> - that will turn a preallocated volume into a sparse one.
 
Top