roland wrote:
hello !
i think of using zfs for backup purpose of large binary data files (i.e. vmware
vm`s, oracle database) and want to rsync them in regular interval from other
systems to one central zfs system with compression on.
i`d like to have historical versions and thus want to make a snapshot before
each backup - i.e. rsync.
now i wonder:
if i have one large datafile on zfs, make a snapshot from that zfs fs holding
it and then overwrting that file by a newer version with slight differences
inside - what about the real disk consumption on the zfs side ?
do i need to handle this a special way to make it space-efficient ? do i need
to use rsync --inplace ?
typically , rsync writes a complete new (temporary) file based on the existing
one and on what has change at the remote site - and then replacing the old one
by the new one via delete/rename. i assume this will eat up my backup space
very quickly, even when using snapshots and even if only small parts of the
large file are changing.
comments?
regards
roland
I'm pretty sure about this answer, but others should correct me if I'm
wrong. :-)
Under ZFS, any equivalent to 'cp A B' takes up no extra space. The
metadata is updated so that B points to the blocks in A. Should anyone
begin writing to B, only the updated blocks are added on disk, with the
metadata for B now containing the proper block list to be used (some
from A, and the new blocks in B). So, in your case, you get maximum
space efficiency, where only the new blocks are stored, and the old
blocks simply are referenced.
What I'm not sure of is exactly how ZFS does this. Does the metadata
for B contain an entire list of all blocks (in order) for that file? Or
does each block effectively contain a pointer to the "next" (and
possibly "prev") block, in effect a doubly-linked list? I'd hope for
the former, since that seems most efficient.
--
Erik Trimble
Java System Support
Mailstop: usca22-123
Phone: x17195
Santa Clara, CA
Timezone: US/Pacific (GMT-0800)
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss