Is it possible to change filesystem properties for an existing ZFS pool?
Solution 1
Sure - zfs set compression=off pool/filesystem
(or just zfs set compression=off pool
for the pool's root filesystem).
Note that this does not go back and decompress data that's already been written - you'll need to re-write the data to do that (zfs send
and zfs recv
can help with this).
Solution 2
Yes, you can do this live. You can even change the compression type...
Remember the distinction between zfs pools and filesystems. Compression properties are set at the zfs filesystem level.
New data to the pool will be uncompressed if you turn it off.
May I ask why you're interested in disabling compression? The recommendation for ZFS is to leave compression ON unless you know your dataset if going to be comprised of non-compressible data (e.g. .tiff files or other media files).
Related videos on Youtube
GJ.
Updated on September 18, 2022Comments
-
GJ. almost 2 years
Suppose I created a pool with compression=on, and later wanted to turn off compression in-place - is that possible and if so how?
I'm using Zevo CE on OS X in case that makes any difference (zpool version 28).
-
Jasmine Lognnes over 9 yearsIn this question I have tried the replication you mention, and I doesn't seam to work. serverfault.com/questions/654933/…
-
Pavel over 9 yearsIs there a way to enable compression AND have the OS perform the compression inplace within the same zpool/zfs? I don't have enough space to run send/recv on a second zfs.
-
sherpaurgen over 6 yearsI have compression turned off , if i set compression=lz4 does it compress the existing data set? or how do i compress existing data?
-
ewwhite over 6 yearsYou would need to copy the data off and back.