I guess when we are defining a mirror, are you talking about a synchronous 
mirror or an asynchronous mirror?

As stated earlier,  if you are looking for an asynchronous mirror and do not 
want to use AVS, you can use zfs send and receive and craft a fairly simple 
script that runs constantly and updates a remote filesystem. 

zfs send takes a snapshot and turns it into a datastream to standard out while 
zfs receive takes a stdin datastream and outputs it to a zfs filesystem. The 
zfs send and receive structures are only limited to your creativity.

one example use might be the following

[i]zfs send pool/[EMAIL PROTECTED] | ssh remote_hostname zfs receive 
remotepool/fs2[/i]

That would get you your initial copy, then you would have to take a snap and do 
incrementals from there on in with something like

[i]zfs send -i pool/[EMAIL PROTECTED] pool/[EMAIL PROTECTED] | ssh 
remote_hostname zfs receive remotepool/fs2[/i]

note that the filesystem at the other end (fs2 in thsi case) will be a live 
filesystem that you can use anytime.

Now with that incremental commandline, you might run into a bug that is well 
known and you can find a work around in these forums, so I won't get into it, 
but your script would have to incorporate the workaround which would basically 
run a "[i]zfs rollback[/i]" command on the remote host before you propagate the 
incremental changes.

~Bryan
 
 
This message posted from opensolaris.org
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to