Generating files directly on the FreeNAS box, snapshots and replication

Status
Not open for further replies.

dpearcefl

Contributor
Joined
Aug 4, 2015
Messages
145
To make sure I fully understand snapshots, their affect on disk space and replication, I have two FreeNAS boxes set up with replication.

On the "master" box, I am generating files using "dd" and then snapshotting the dataset which triggers the replication.
  1. Is generating the files directly on the "master" server a "valid" way to do things or should I be creating the files off-server through a share?
  2. If I want to check the replication on the "slave" computer, is looking at the folder on the "slave" server through an SSH shell valid or should I be looking at it through a share also?
Thanks!
 

dpearcefl

Contributor
Joined
Aug 4, 2015
Messages
145
Giving back to the community:

Yesterday I was getting inconsistent results between the master and slave box. I would add a file to the master box, wait for replication then look at the slave box. I see the disk space decrease but I couldn't see the original file. Quite confusing.

So this morning I destroyed the volumes on both boxes and recreated everything. In rereading the documentation I realized what mistake I made yesterday: You have to have one and one only snapshot to start replication. Yesterday I have multiple snapshots in place on the master machine by the time I got replication working. This cause ZFS on the slave machine to become confused.

Once I got the replication working properly, it made no difference whether I used an SSH shell to add the files directly on the master server or I used a share. In the same way, looking at the contents of the slave machine via an SSH shell or a share did not matter.

What I learned:
  1. Getting the replication working requires a single snapshot and no more.
  2. SSH shells or shares? Doesn't matter.
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,874
Where in the documentation did you see to start replication with only 1 snapshot? I've started replication with more than 1 snapshot and it's worked fine (just last week in fact). It takes a while for everything to sync, but it gets there. And yes, you can use ssh to go look at the files on your box. remember that replication only replicated snapshots, so until your new file is snapshotted and replicated, it won't be on the other server.
 

dpearcefl

Contributor
Joined
Aug 4, 2015
Messages
145
When I had multiple snapshots then started replication, the original snapshot (and the files) did not appear on the second box after replication finished. Perhaps I did not wait long enough for additional replications to occur. When I had a single snapshot, the files appears on the second box immediately.

I thought I remembered "a single snapshot" comment in a post. If I find it I'll post it here.
 
Status
Not open for further replies.
Top