Planning and testing continues. "tech testing" of ZFS capabilities is
going well, so I'm starting coding on individual modules at the
moment. I havent gotten much in the way of additional feature
requests, so I'll take that to mean that I'm on the right track :)
FYI, I figure this is going to be homed at
http://www.bolthole.com/solaris/zrep/
Right now, its just txt file docs and plans there. I'll only put up
the code when it really does something useful, safely.
Hopefully, should have something within 7 days.
For the curious, here's a copy of "zrep.overview.txt" at the moment.
As you can see I'm a big fan of the "KISS" philosophy.
-----------------------------------------------
This document is a highly simplified overview of what should be the
"most common use cases" for zrep
Please note that all examples below, presume that you have the
following setup:
host1 - solaris 10 update 9+
zfs pool "pool1"
root ssh trust to/from host2
host2 - solaris 10 update 9+
zfs pool "pool2"
root ssh trust to/from host1
host1 and host2 are able to "ping" and "ssh" to/from each other
* Initialization of zrep replicated filesystem "prodfs"
host1# zrep -i pool1/prodfs host2 pool
This will create an initial snapshot on prodfs.
It will then a copy of "prodfs" on host2, and set
"readonly" on there.
* Replication
host1# zrep -S pool1/prodfs
You can call this manually, or from a cron job as frequently
as once a minute.
It will know from initialization, where to replicate the
filesystem to, and do so.
If you have more than one filesystem to sync, you may also use
# zrep -S all
You can safely set up a cronjob on both host1 and host2 to do
"all", and it will "do the right thing".
* Failover
host1# zrep failover pool1/prodfs
This will configure each side to know that the flow of data
should now be host2 -> host1, and flip readonly bits appropriately.
Running "zrep -S all" on host1 will then ignore pool1/prodfs
Running "zrep -S all" on host2 will sync
pool2/prodfs to pool1/prodfs
* Takeover
host2# zrep takeover pool2/prodfs
Same as failover example, but required syntax for running on
the non-active host.
* Status
hostX# zrep status
Will give a list of all filesystems the host is "master" for,
and the date of the last successfully replicated snapshot.