Hello Daniel,

Thursday, April 9, 2009, 3:35:07 PM, you wrote:

DR> Jonathan schrieb:
>> OpenSolaris Forums wrote:
>>> if you have a snapshot of your files and rsync the same files again,
>>> you need to use "--inplace" rsync option , otherwise completely new
>>> blocks will be allocated for the new files. that`s because rsync will
>>> write entirely new file and rename it over the old one.
>> 
>> ZFS will allocate new blocks either way

DR> No it won't. --inplace doesn't rewrite blocks identical on source and 
DR> target but only blocks which have been changed.

Yes, it will. Inplace in rsync has nothing to do with how ZFS works.


DR> I use rsync to synchronize a directory with a few large files (each up
DR> to 32 GB). Data normally gets appended to one file until it reaches the
DR> size limit of 32 GB. Before I used --inplace a snapshot needed on 
DR> average ~16 GB. Now with --inplace it is just a few kBytes.


That's because without --inplace rsync will copy a file first, then
apply changes to it and if successful will remove the old file. So if
the old file is still in snapshot you will end-up with a new copy of
the file and the old copy being kept in a pool.

Now with inplce you're telling rsync to overwrite any changed blocks
directly over the original file instead of making a full copy of a
file. Everytime you overwrite some data zfs will allocate new blocks
only for those blocks and keep the original blocks as long as they are
referenced by at least one snapshot.


-- 
Best regards,
 Robert Milkowski
                                       http://milek.blogspot.com

_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to