Baffled with (>100%) zvol used percent

Status
Not open for further replies.

Jimm Chen

Dabbler
Joined
Apr 20, 2015
Messages
30
I'm learning FreeNAS, using FreeNAS-9.3-STABLE-201504100216.iso . Please help me answering a question.

At first I have volume status as this:


snap1720-1st-11G.png


Later, I edit zvol1 size to be 9G, then it shows

snap1724-9G.png


I go further to change zvol1 size to 13G , the percent value becomes 102%. How do you explain a >100% value?

And why increasing the capacity makes "used" percent larger? (intuitively, the percent should be smaller)

snap1723-13G-fix.png
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
No, you don't understand zvols.

Read up on zvols. The disk space is immediately "taken" then second to increase the size... unless you set the sparse volume checkbox. And if you (not you specifically, just someone in general) were silly enough to ignore the all upper case warning that it was dangerous, you deserve exactly what you get when you do that. ;)

Anyway, if you have a 15GB zvol on a 15.5GB zpool, you're going to have overhead with managing that space (hence the greater than 100% value). You shouldn't be allocating more than 80% of an entire zpool anyway, so you've broken lots of thumbrules and recommendations doing what you are doing. ;)

(Yes, I realize this is probably a VM so you can learn FreeNAS.)
 

Jimm Chen

Dabbler
Joined
Apr 20, 2015
Messages
30
cyberjock, I'm afraid your reply helps very little. My zvol1(as in my image snaps) is created with non-sparse property. I can verify it by trying to change its size to 33G, and get a red "out of space" error message. To clarify, I know the sparse concept, just like NTFS sparse file enabled by DeviceIoControl(hFile, FSCTL_SET_SPARSE, ...) ; and Linux files have sparse characteristics by default; and VMware ESXi call this thin provisioning(for vmdk files).

So someone please explain what the 102% value mean, and how is it calculated ?

One thing I think I have been clear today is: the "used percent" is conceptually calulated as zvol's size divided by containing zpool's size , so increasing zvol1's size increases the percent value as well.

I now have the perception that "the Used value(xxGB), the accompanied percent value, and the Available value" is interpreted differently for a zpool, a dataset, a zvol, and a snapshot clone -- quite complicated. But current FreeNAS official doc have very few words on this.
 
Last edited:
Status
Not open for further replies.
Top