Volumes mirror

Status
Not open for further replies.

mdimuzio

Dabbler
Joined
Jul 1, 2015
Messages
26
Hi,
how-to build two volumes which the first volume is the exact mirror of the latter volume ?

My customer want to manage a "disaster-recovery" situation on which a iSCSI volume go down and we switch the FreeNAS volume from the first (totally damaged) to the second (up with a mirror copy of the firest) ... I don't know if I expained well the situation in my poor English level.

HowTo make a FreeNAS volume2 the mirror of a FreeNAS volume1 ? Is this possibile with the rsync tool ? If no, what other tools ?



Tnx,
Marco.
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
Replication is the way to go, see the manual for the details ;)
 

mdimuzio

Dabbler
Joined
Jul 1, 2015
Messages
26
Replication is the way to go, see the manual for the details ;)

Tnx Bidule0hm and tnx Robert Trevellyan, but I want to mirror a volume of the self SuperMicro where I installed inside the volumes.

From the chapter 8.3 of the official FreeNAS 9.3.1 User Guide I read
"...A replication task allows you to automate the copy of ZFS snapshots to another system over an encrypted connection.
This allows you to create an off-site backup of a ZFS dataset or pool..."

Good, wonderful, but I want that the replication task automate the replica on our FreeNAS locally volumes. So, I want a off-site backup, but locally.

HowTo ?


Tnx again
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
It's possible, even replication on the same system but to another pool is possible. Just follow the manual.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Tnx Bidule0hm and tnx Robert Trevellyan, but I want to mirror a volume of the self SuperMicro where I installed inside the volumes.

From the chapter 8.3 of the official FreeNAS 9.3.1 User Guide I read
"...A replication task allows you to automate the copy of ZFS snapshots to another system over an encrypted connection.
This allows you to create an off-site backup of a ZFS dataset or pool..."

Good, wonderful, but I want that the replication task automate the replica on our FreeNAS locally volumes. So, I want a off-site backup, but locally.

HowTo ?


Tnx again
Make the destination localhost?

Do you expect automatic failover type functionality? Because freenas can't do that.
 

mdimuzio

Dabbler
Joined
Jul 1, 2015
Messages
26
SweetAndLow : not automatic failover, but a functionality to have a backup of a failure volume and irrecoverable.


This morning I received by email : "The system was unable to replicate snapshot iscsivolume1 to localhost ====================== No ECDSA host key is known for localhost and you have requested strict checking. Host key verification failed.
"

Where I'm wrong?
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Did you setup ssh keys and do they work? ssh localhost with root should just work without password.
 

mdimuzio

Dabbler
Joined
Jul 1, 2015
Messages
26
test99999999999.png



In my FreeNAS

1) /root/.ssh/authorized_keys = /data/ssh/replication.pub

but

2) /etc/ssh/ssh_host_rsa_key.pub != (/root/.ssh/authorized_keys and /data/ssh/replication.pub)


Does the condition number 2) it's correct?

Tnx
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
View attachment 8659


In my FreeNAS

1) /root/.ssh/authorized_keys = /data/ssh/replication.pub

but

2) /etc/ssh/ssh_host_rsa_key.pub != (/root/.ssh/authorized_keys and /data/ssh/replication.pub)


Does the condition number 2) it's correct?

Tnx
I have no clue how to set it up. Did you follow the steps in the manual? I think all you have to do is generate a key pair then put the public key in the ssh box for the user you want in the GUI.
 

toadman

Guru
Joined
Jun 4, 2013
Messages
619
http://doc.freenas.org/9.3/freenas_storage.html#replication-tasks

PUSH and PULL are the same system in this case. Since it's the same system and no external network involved I would think the OP would just disable encryption (via the encryption cipher box in the replication task settings). But if not:

"Go to PULL and click Account ‣ Users ‣ View Users. Click the “Modify User” button for the user account you will be using for replication (by default this is the root user). Paste the copied key into the “SSH Public Key” field and click “OK”. If a key already exists, append the new text after the existing key.

On PULL, ensure that the SSH service is enabled in Services ‣ Control Services. Start it if it is not already running.

...

On PUSH, verify that a periodic snapshot task has been created and that at least one snapshot is listed in Storage ‣ Snapshots.

To create the replication task, click Storage ‣ Replication Tasks ‣ Add Replication which will open the screen shown in Figure 8.3b. For this example, the required configuration is as follows:

  • the Volume/Dataset is local/data
  • the Remote ZFS Volume/Dataset is remote
  • the Remote hostname is 192.168.2.6
  • the Begin and End times are at their default values, meaning that replication will occur whenever a snapshot is created
  • once the Remote hostname is input, click the “SSH Key Scan” button; assuming the address is reachable and the SSH service is running on PULL, its key will automatically be populated to the “Remote hostkey” box"
 

toadman

Guru
Joined
Jun 4, 2013
Messages
619
Maybe nothing. When I saw "No ECDSA host key is known for localhost " I jumped to the conclusion (perhaps prematurely) the issue was with the replication stream encryption vs. opening the ssh session. Hence the suggestion to turn off encryption of the replication stream. I've been playing with replication since it failed to setup for me on 9.3.1 and the ECDSA is what is used for "Fast" encryption. (I think.)
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
When I saw "No ECDSA host key is known for localhost "
I'm pretty sure that relates to key-based SSH authentication, which is required for automatic replication on FreeNAS. Encryption, if enabled, would use one-time keys. Disabling encryption certainly makes sense for local replication, but I don't think it's the issue.
 
Status
Not open for further replies.
Top