ZFS Reserving copius amounts of data

DrillSgtErnst

Active Member
Jun 29, 2020
91
6
28
Hi,
I just found out, that creating Disks on ZFS reserves copius amounts of Data on the Host ZFS.
My ZFS is Thin-Provisioned and I use the discard Option.
Cache ist set to Write back an no, that doesn't seem to have an impact.

I have 11x4TB of HDD.
RAIDZ2
I should be able to get roughly 34TB out of that
The Pool gives me 30 TiB, Roughly 30,72TB
That would be okay to me, if there would not be a litle Problem
I can't creat a disk greater than 12950MB ~13TB.

I tried discard
TRIM

I deleted one virtual drive
I created it again, I unchecked the backup Box.
Now I could use 30TB.
Great

But the first drive I created, even if I uncheck the Backup Box, does seem to take up more than double the Space (240GB allocated, while the drive only is 100GB big)

Is there a way to resize it, without deleting and creating afterwards?
 
please check the forum - this is a well known issue with how raidz and zvols interact.
 
Well I found many Threads on this, but none did have a solution for me.

Well. Setting Backup=Off is the best use for me, just have to keep an eye on the disk.

I deleted the Disk, and everything is fine for me now after creating the Disks anew.
 
the backup setting does not affect how much space a volume uses.
 
I know, that is the curious thing. But it is reproducible on my PVE Host.

When I turn on Backup upon creation of the drive, more than double the size of the newly created disk is occupied on ZFS.

But when I turn off Backup upon creation an set Backup=On afterwards, everything is fine.

It does seem like the Backup Options does interfere with the Thin-Provisioning.
 
the backup flag is not passed to ZFS in any way - it's just to tell the PVE code whether to include that volume when making a backup. there must be something else going on. could you get 'zfs get all $dataset' in both cases? it should show what's going on..