ernie wrote:
- you need to install it on both nas. I think yes but thanks for confirming me.
Yes you install it in both NAS. The script expires old snapshots in the backup side; it needs to be there, too.
ernie wrote:
- does the destination nas need only on empty pool or you can have data in other folders than folders of zrep ?
Replication is by dataset. So other datasets can exist in the target; it doesn't matter. For example:
Primary-server
....zpool_mypool1
........ImportantData1
........ImportantData2
........temporaryData
Backup-server
....zpool_myotherpool
........junkData
........someOtherJunkData
Code: Select all
Primary-Server: ~# zrep init zpool_mypool1/ImportantData1 Backup-Server/zpool_myotherpool
Primary-Server: ~# zrep init zpool_mypool1/ImportantData1 Backup-Server/zpool_myotherpool
Primary-server
....zpool_mypool1
........ImportantData1 <-zrep knows about this one
........ImportantData2 <-zrep knows about this one
........temporaryData
Backup-server
....zpool_myotherpool
........junkData
........someOtherJunkData
........ImportantData1 <-zrep knows about this one
........ImportantData2 <-zrep knows about this one
ernie wrote:
- if I create a dataset on my pool, can I install zrep in the dataset ? Or is it necessary folders ?
As long as nas4free can find zrep, put it where you like.
ernie wrote:
- I have jails with the brig. How can we manage this for the destination nas ?
I tried this with mysql in a jail using thebrig and it "works" (works defined by the test below) :
1. Install thebrig in both servers, configure identical jails on both
2. On the primary server, create and populate a jail with mysql in it, configure it to start automatically, use it & make sure it works OK.
3. On the backup server, configure the jail NOT to start on boot.
Note: In my case the pool is called "data" (in both servers) mounted at /mnt/data, and the separate dataset for thebrig, "data/thebrig" so:
4. In the backup server, delete the dataset containing thebrig:
This will of course break all the jails in the backup server, but that's OK--all you need in the backup is the part stored in the N4F configuration. The rest will be replicated by zrep from the primary; that's why they need to be identical configs except the start-on-boot.
Do NOT start the jail in the backup server even if the service can run in both places. The backup dataset will be read-only!
Code: Select all
cd /mnt/data/thebrig
chflags -R noschg *
rm -rf *
cd /
zfs destroy data/thebrig
5. Now, initialize the dataset
Code: Select all
Primary-Server: ~# zrep init data/thebrig Backup-Server/data
Note: At this point, the dataset in the secondary server will be read-only!
The next steps are where I verified that the backup sql server could become active
6. Power Down the Primary Server
7. Tell thebrig in the secondary server to become active:
Code: Select all
Secondary-Server: ~# zrep takeover data/thebrig
8. in the backup server, use your normal method (e.g. gui) to start the jail with mysql in it.
you can also configure it to start on boot now.
9. Try to access mysql from various computers in the house. It works.
ernie wrote:
I have own cloud in a jail, and in case of failover, I would like that the other nas plays the role of master nas.
You need to write a script to automate some things--if you want a hands-off failover.
I haven't got that far yet, so if you please post!
CARP is appealing as part of that solution, but please note I've had trouble accessing smb shares or sql sever using the CARP address from android devices. If you try to ping the CARP virtual address from android terminal window it complains that it's a broadcast address.
I don't know why or what the workaround is--but if you figure it out, please say something!!