On Tue, Feb 26, 2013 at 7:42 PM, Bob Friesenhahn
<bfrie...@simple.dallas.tx.us> wrote:
> On Wed, 27 Feb 2013, Ian Collins wrote:
>>> I am finding that rsync with the right options (to directly
>>> block-overwrite) plus zfs snapshots is providing me with pretty
>>> amazing "deduplication" for backups without even enabling
>>> deduplication in zfs.  Now backup storage goes a very long way.
>> We do the same for all of our "legacy" operating system backups. Take a
>> snapshot then do an rsync and an excellent way of maintaining incremental
>> backups for those.
> Magic rsync options used:
>   -a --inplace --no-whole-file --delete-excluded
> This causes rsync to overwrite the file blocks in place rather than writing
> to a new temporary file first.  As a result, zfs COW produces primitive
> "deduplication" of at least the unchanged blocks (by writing nothing) while
> writing new COW blocks for the changed blocks.

If I understand your use case correctly (the application overwrites
some blocks with the same exact contents), ZFS will ignore these
"no-op" writes only on recent Open ZFS (illumos / FreeBSD / Linux)
builds with checksum=sha256 and compression!=off.  AFAIK, Solaris ZFS
will COW the blocks even if their content is identical to what's
already there, causing the snapshots to diverge.

See https://www.illumos.org/issues/3236 for details.

commit 80901aea8e78a2c20751f61f01bebd1d5b5c2ba5
Author: George Wilson <george.wil...@delphix.com>
Date:   Tue Nov 13 14:55:48 2012 -0800

    3236 zio nop-write

zfs-discuss mailing list

Reply via email to