Hello Will, Monday, April 13, 2009, 6:44:47 PM, you wrote:
WM> On Mon, Apr 13, 2009 at 07:03, Robert Milkowski <mi...@task.gda.pl> wrote: >> 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. WM> But it has big consequences on how rsync uses the file system, and WM> thus big consequences on how ZFS behaves. --inplace means rsync walks WM> through the file on the receiving end until it finds a mismatch, and WM> only then does it write new blocks to disk. agree. btw: what I meant by "Yes, it will" is that everytime rsync modifies any part of file zfs will allocate new fs block for those modification - regardless if inplace was used or not. However inplace will be more effective on zfs+snapshots as making a new full copy of a file will be avoided. >> 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. WM> Exactly. But the consequence of this is that with no --inplace, WM> rsync+snapshots balloon space usage under ZFS, and with --inplace you WM> don't get that behavior. But it's not specific to zfs - will happen one way or another if you use any file system with snapshots (unless you do have a dedup buil-in fs). Nevertheless of course I agree that inplace makes sense if updating relatively small portions of files. -- Best regards, Robert Milkowski http://milek.blogspot.com _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss