Replication Tasks in FreeNAS-11.3-U1 need to be started by hand

vafk

Contributor
Joined
Jun 22, 2017
Messages
132
I have several replication tasks. There are two pools where the replication happens, one internal and one external. Both the internal and external pools are switched on by demand (the internal pools is a Dell PowerVault external HDD enclosure where the pools is imported by hand and the second pools is a N54L with FreeNAS-11.3-U1).

Both pools have the problems that the main FreeNAS does not realize that the pools become available and remains stuck with the error message that the pool is not available. Once I open the replication task and select "run now" the tasks performs well and everything is fine.

I guess that once FreeNAS identifies that the pool is missing it does not recheck if the pool becomes available.

Who had the same problem and did or did not find a solution? Thank you and stay well!
 

saurav

Contributor
Joined
Jul 29, 2012
Messages
139
I solved the part of the problem where you have to login to FreeNAS web UI and enable/disable _each_ replication by hand. I have a script to enable/disable all replication tasks from a terminal. It uses FreeNAS API to do that: http://api.freenas.org
 

vafk

Contributor
Joined
Jun 22, 2017
Messages
132
@saurav
Thank you for the suggestion. I used your "enable/disable _each_ replication by hand" to search and found this post:


Could you kindly confirm if this is the same or similar way you solved the problem? Or if you have a better idea to share this with us? Many thanks!!!
 

saurav

Contributor
Joined
Jul 29, 2012
Messages
139
That seems to be doing something totally different.

My scenario is basically that I sometimes need to stop all replication from my main server to the back up server. The only way to do that is to sign in to main server's web UI and toggle each task by hand.

Instead of that, I have a script that I can run to enable or disable all tasks. Its a single command in a terminal that gets the job done. I don't have to sign in on the main server's web UI. I could run it on any machine that can connect to the main server over the network.
 

vafk

Contributor
Joined
Jun 22, 2017
Messages
132
I understand and see that this is exactly I was looking for. Could you please paste the content of the script here? One task as example is sufficient. Thank you!
 

saurav

Contributor
Joined
Jul 29, 2012
Messages
139

vafk

Contributor
Joined
Jun 22, 2017
Messages
132
Good morning, that is excellent! I will try it and let you know. Many thanks!!!
 

vafk

Contributor
Joined
Jun 22, 2017
Messages
132
@saurav
I looked at the script so what I need to do is install httpie and jq on the Linux host and run the script? Will the script invoke all existing replication tasks one by one? If so is there a way I can select the tasks because I have two external pools where the data is written. Also I need to add to the script to import the pool before replication and disconnect after replication.
 

saurav

Contributor
Joined
Jul 29, 2012
Messages
139
Yes, the script will invoke all existing replication tasks one by one.

It currently doesn't have a way to select the tasks in any manner. Also, as you can tell from the script, it doesn't do anything to import the pool, etc.

I didn't build those features in because I didn't need them. Feel free to add them if you need. PRs are alway welcome :)
 
Top