Size for dataset/zvol creation, before compress or after compress?

Status
Not open for further replies.

Jimm Chen

Dabbler
Joined
Apr 20, 2015
Messages
30
When creating a dataset or zvol, we have an option to assign a size and an option to assign whether using compression(lz4 typically). So the question is, if I assign a size of 100G, does it mean 100G before compression or after compression? The FreeNAS document(at least the bundled htmls) is not clear about this.

I think before compression seem more reasonable, because it keeps the same semantic when you turn compression on/off on the fly? Right?

BTW: Is it really safe to turn compression on and off on the fly?


[FreeNAS 9.3]
 
D

dlavigne

Guest
It means 100GB. Compression happens on the fly. If there's not enough space to complete a write, it produces an error, regardless of whether the write is compressed or not. Changing compression on the fly is fine as it only affects newly written data.
 
D

dlavigne

Guest
I am being explicit. It means 100GB. Compression has nothing to do with it. It either has room to complete a write or it does not.
 

mav@

iXsystems
iXsystems
Joined
Sep 29, 2011
Messages
1,428
It is 100GB before compression. After compression it may occupy less space on pool, leaving additional free space available for other purposed or just helping ZFS allocation algorithms to reduce fragmentation.
 
Status
Not open for further replies.
Top