Solved space comsuption

Hi All,

I'm confused about the zfs consumption of space.

I'm using ZFS to create clone from a sysprep and use it as a zvol for vm connected via iscsi.
The zvol has a size of 256GB.
But several dataset have a space comsuption bigger than the size of the zvol.
I thought this could be happen when we use snapshot but this is not my case.

here information from one zvol impacted :
type volume
volsize 256G
used 483G
referenced 507G
copies 1
refreservation none
compression lz4
usedbydataset 483G
written 483G
logicalused 238G
logicalreferenced 251G

logicalused and logicalreferenced are correct, so the vm didnt see a disk bigger than 256GB.
As used, usedbydataset, referenced properties don't include metadata neither snapshot i dont'know what it could be.

After some research on the web some people had the same issue du to the blocksize of their disk and had to change the ashift to 12. but this is our configuration already.

disk : (from diskinfo -v)
SSD
512 # sectorsize
3840755982336 # mediasize in bytes (3.5T)
7501476528 # mediasize in sectors
4096 # stripesize

volblocksize = 16k
ashift = 12

What i can check to go deeper on this issue ?
or this is just a normal behavior du to my configuration ? if yes, how i can limit the used space from zvol dataset ? with reservation ?
 
Which commands did you use to display the above information?
Mike Lucas and Allan Jude recommend in FreeBSD Mastery: ZFS to use the command zfs list -o space and warn specifically about using legacy tools that might lie.

Also, if you cloned the dataset or have some snapshots - this might impact the referenced size. It can indeed be larger than your volume size because it contains older versions of the data.
 
Hi roccobaroccoSC,

Thanks for your answer !

i used zfs get all command to retrieve all the information.
I also used your command zfs list -o space (and i read the book ;) )

I was aware about the referenced size, and we create zvol from a snapshot that is not alive, so the referenced data is the same for each "clone".
 
Hi All,

And the issue was...the volblocksize get the default value du to an human error during the deployment of the snapshot.
A lesson has been earned ;)
 
Hi,

Correct value was 16K.
i was wrong when i checked by myself the volblocksize so i gave you a false information on my original post.

Best regards,
N.B
 
Back
Top