On Fri, Jan 28, 2011 at 1:38 PM, Igor P <i...@godlike.org> wrote: > I created a zfs pool with dedup with the following settings: > zpool create data c8t1d0 > zfs create data/shared > zfs set dedup=on data/shared > > The thing I was wondering about was it seems like ZFS only dedup at the file > level and not the block. When I make multiple copies of a file to the store I > see an increase in the deup ratio, but when I copy similar files the ratio > stays at 1.00x.
Easiest way to test it is to create a 10 MB file full of random data: $ dd if=/dev/random of=random.10M bs=1M count=10 Copy that to the pool a few times under different names to watch the dedupe ratio increase, basically linearly. Then open the file in a text editor and change the last few lines of the files. Copy that to the pool a few times under new names. Watch the dedupe ratio increase, but not linearly as the last block or three of the file will be different. Repeat changing different lines in the file, and watch as disk usage only increases a little, since the files still "share" (or have in common) a lot of blocks. ZFS dedupe happens at the block layer, not the file layer. -- Freddie Cash fjwc...@gmail.com _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss