zfs

How to compress existing data on a ZFS files system?


I have a zfs pool and it already have around 3TB of data. I have set the compression=lz4 by running

zfs set compression=lz4 secondarystore

root@home:/home/user1# zfs get compression secondarystore
NAME            PROPERTY     VALUE     SOURCE
secondarystore  compression  lz4       local

# zfs get compressratio secondarystore 
NAME            PROPERTY       VALUE  SOURCE
secondarystore  compressratio  1.00x  -

Does this compress the existing data or are there any other method of compression using zfs tools ?


Solution

  • moving data out of pool and getting it back to pool compressed those files. 200G-out of pool and back in was 12G