In this third lab of ZFSAttack, we will learn how to replicate file systems between two ZFS Appliances. This is a very helpful tool in terms of backup and recovery.

However, we will not actually use two appliances, but simulate the proecedure on just one. So instead of repliating data between two appliances, we will replicate our data from one zpool to another zpool on the same machine.

3.1. Prepare the ZFS Appliance

First we need to add another disk to the zfsapp1.
Shutdown the machine and go to its settings-screen in VirtualBox. Navigate to storage and click the right green “+”-icon next to Controller: SATA.
ZFSAttack_03_30_addDisk.png

This is the same procedure, as in lab 1, where you added a disk to the linux machine:

  • create a new disk
  • Hard drive file Type: VDI -> press next
  • Storage on hard drive: allocate dynamically -> press next
  • Name the disk replicationdisk and set its size to 10GB -> press create

Now, close the settings page and boot your zfsapp1.
Start your webbrowser and browse to https://192.168.56.100:215/
Login using the username root and the password, you specified in lab1.

Navigate to Configuration -> Storage
ZFSAttack_03_31_createZpool1.png
Here you can see the zpool, you created in lab1. Click on the “+” – icon next to Available pools
Name the zpool mypool2 and click apply.
The storage should have found the new disk automatically so you can select 1 data device (10GB) and click commit.
On the profile selection page, there is not much choice this time, because we only have one disk. So just click commit and the appliance should create a second zpool for you.
ZFSAttack_03_33_createZpool2.png

3.2. setup remote replication service

In the “real world” our goal would to build a replication from one appliance (source) to the other (target). But here in this lab, we will build a replication, where source and target are on the same machine. I will continue calling this machine “source” or “target” from time to time. Don’t be confused, this is always the same virtual machine in this lab.

The first step to achieve replication is to let the two machines (source and target) get to know each other. We have to do this even if both machines are in fact the same.
First, go to configuration -> services and verify, that remote replication service is running.
ZFSAttack_03_01_replication1.png
Click the remote replication service to get to its detail page.
ZFSAttack_03_02_replication2.png
On the upper right you can see two links targets and sources. There you can see, which other ZFS Appliances this one uses to replicate from or to. At the moment, there are no entries present, which we are going to change now.

Click the “+” – icon next to Targets
ZFSAttack_03_03_replication3.png
enter the following information
Name: target (can be anything you like)
hostname: 192.168.56.100 (normally, you would use the IP of the actual target machine)
root password: oracle

Then, click “add” and wait a second.
ZFSAttack_03_04_replication4.png

Now, that the preparations are done, you can start the replication. This will be done on the next page

Leave a Reply

Your email address will not be published. Required fields are marked *