How can I tell if ZFS (zfs-fuse) dedup/compression is applied to a particular file?

Posted by asari on Super User See other posts from Super User or by asari
Published on 2011-02-12T19:28:17Z Indexed on 2011/02/27 7:26 UTC
Read the original article Hit count: 413

Filed under:
|
|
|

I have a zfs formatted partition using zfs-fuse for linux (Ubuntu).

I had used it for a while, and then enabled dedup and compression on it (zfs set compression=on/dedup=on). Now I think I have some files that are dedup'ed and compressed, and file that are not yet.

It was OK, but sometimes I was confused. Let's see, following command would consume almost 4GB of my zfs storage:

cp oldfile.4GB newfile.4GB

.. and this would consume almost zero:

cp newfile.4GB newfile.4GB.2

This is because the old file is not yet compressed, so dedup not happened, I think.

My idea is -- if I can find old files that are not yet dedup/compressed, I can perform batch copy/rename/remove them to eliminate duplicity and redundancy. But how I can check that?

I know I can re-copy whole contents of my storage should work (even better with checking the time stamp of each file), but I'd be happier if I have zfsstat-like tool that shows some file properties.

© Super User or respective owner

Related posts about linux

Related posts about ubuntu