25% of space used from creating a volume

Alain

Cadet
Joined
Nov 17, 2020
Messages
7
I have a pool with 150TB of space. when i create a ZVOL of 142TB the dashbard all of a sudden reports 37TB of space used. No data has been written to the device from external sources. I cannot figure out why or how the system is reporting 37TB of used space as a result of just creating a volume.

1632159973596.png



Any ideas? Any commands that would show where that space is used or by what? This is a virgin box with absolutely no data on it.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Zvols are not sparse by default. What does zfs get refreservation Pool1/iscsi report? I am more puzzled by the fact that it doesn't report 142 TB used.

To turn it into a sparse volume: zfs inherit -S refreservation Pool1/iscsi.

HTH,
Patrick
 

Alain

Cadet
Joined
Nov 17, 2020
Messages
7
the output is

1632169321469.png


Subsequently I typed your second command

zfs inherit -S refreservation Pool1/iscsi

and the output is

1632169580561.png



Thank you for the pointer. I clearly will need to read up on sparse volumes.

thanks again.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Glad it worked. For next time - please post text enclosed in CODE tags, not screenshots. Your post is not readable with a screen reader. I always wonder why people do that, it's even more work than copy&paste, isn't it?

Kind regards,
Patrick
 

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
A piece of software that reads aloud what is visible on the screen. For vision impaired people. And yes, there are blind computer scientists, software developers and system administrators.
 

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925
A piece of software that reads aloud what is visible on the screen. For vision impaired people. And yes, there are blind computer scientists, software developers and system administrators.
Thanks for that. I'm quite embarrassed that I did not make that connection... but glad I asked as it'll make me more conscious going forward.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
it's even more work than copy&paste, isn't it?
Probably not, if they're using the web GUI's shell option. Which, granted, nobody should be doing, but it's there, so... It may also depend on the client OS being used; on a Mac, at least, copying a screenshot to the clipboard is just a hotkey (Cmd-Ctrl-Shift-4) followed by selecting the area.
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
To turn it into a sparse volume: zfs inherit -S refreservation Pool1/iscsi

Useful command!

Note for clarity - This may not make the zvol as "sparse" as you want it if there has already been data written to and deleted from it, unless the mounting initiator is capable of sending SCSI UNMAP commands to let ZFS know the records are to be erased.

Also obvious note - using sparse zvols enables the potentially Very Bad Idea of oversubscribing your storage ("oh wow, this sparse ZVOL compressed really well, I can make ten 1T ZVOLs on this 4T pool!") and regardless of any other voodoo ZFS can perform, it reacts especially poorly to ENOSPC
 

Alain

Cadet
Joined
Nov 17, 2020
Messages
7
Now that I understand the sparse volume property it turns out Patrick's original question was the right one to ask - why isnt the entire 145 TB used? not my question - how come 40 TB is used when there is no data on it.

I cannot figure this out. I intend to mount and format the partition then create a 140 TB file to see if I get full use of the volume.
 
Top