Solved What will happen if I disable compression of a pool?

Before the pool enabled compression, and now if I disable it, the previously compressed data will be decompressed immediately or will remain in the previous compression state?
Thanks.
 
They will remain compressed. Only new files will be uncompressed.
 
  • Thanks
Reactions: sdf
They will remain compressed. Only new files will be uncompressed.

Thank you.
Conversely, if the pool has not enabled compression before, now enable it, will data that already written to the pool be compressed?
 
will data that already written to the pool be compressed
No, same thing. Only new files will have the new settings. The same holds true for any of the other features like dedup, checksum, copies and a few more.
 
  • Thanks
Reactions: sdf
Basically, altering a setting on a pool or dataset does not affect the existing blocks. It just affects blocks that are written after that point (be they for new files or updated pieces of existing files). If you want to update all of the data to the new settings, you'll have to either copy it or zfs send it elsewhere and then bring it back to the pool so that it's all new data.

The copy-on-write nature of ZFS prevents it from altering the existing blocks based on new settings. Aside from fixing corrupted data, zfs doesn't muck around with existing blocks unless they're freed, because no dataset, snapshot, or clone refers to them anymore.
 
Back
Top