Hi,
I have 2 truenas servers in 2 separate locations/networks.
how can I connect both together to run sync between each other?
is there a way to setup openvpn server on one end and connect client as other end to put both in the same subnet?
or wireguard/other options?
Thanks!
Many ways, but yes, if you need to cross the internet the best way is to set up a VPN or WireGuard (faster) and then set the appropriate access on each side to access each other.
First question - what type of router / firewall is at each location? Is it just your local ISP’s device or do you have something like an Asus or TP-Link or something else?
Also, the best way is to transfer data from one truenas to another is generally to replicate, but that does not synchronize.
So what do you actually mean by “sync”
asus routers running asus merlin with openvpn/wireguard enabled on both side. I can setup the routing policies and set both NAS’ in the same vlan, but wanted to know if I can do it directly from truenas side.
what I want to achieve is to ensure data on both servers is the same (2 different location, 2 different sets of data used by 2 different teams).
the idea is that each truenas serves NAS-services locally and provides backup storage for each other
Did you solve it?
Not possible with ZFS. Snapshot replications can only work in one direction.
You would need to use a file-based solution to achieve what you want (if I understand it correctly.)
Unless you mean that the “working” dataset of one server gets replicated as a one-way backup to the other server. While the opposite server does the same with its own (different) dataset?
We have to take a step back and again ask the OP for details.
If both working groups are disjunct you can of course replicate the share of group A to the NAS at location B and vice versa as a backup. Assuming group B will never touch the assets of group A and vice versa.
A bidirectional synchronisation with both groups writing to the same assets simultaneously is not possible with ZFS mechanisms.
A Nextcloud installation on one location that is used by both groups is a possible solution in this case.
Bidirectional sync with both groups accessing the same assets at both locations is an unsolvable problem in computer science. There is no general solution.
Any product advertised as such comes with constraints that you need to check if they match your particular requirements.
I was thrown off at the “recency” of the latest post, and only now realized the OP hasn’t posted anything on the forums since July.
Question, as it seems related to this thread/discussion: what exact proceedure should I use (I’m new to TrueNAS) if I have one main node in use and have a second identical node which I turn on every 7 days and wish to mirror everything to as a cold backup (and then turn off again)?
Alternatively, but I understood this is currently not supported, is there a way I can keep both nodes on in a twin setup so that if one fails the other takes over automatically (and as a consequence both are always in sync)?
(I understand that otherwise what the OP might have desired to do initially with those two nodes in remote locations could only be done with at least 3 nodes and a different OS like Nutanix, right? But that requires even more HW resources).
Thanks in advance!
Outline:
Snapshot task on the main system.
Replication task from the main to the backup.
The precise implementation is up to you, and may depends on how you want to power on and off the backup system.
The main system could have a cron job to wake up the backup through its IPMI, and then PUSH replication to it.
Or the backup could do a PULL replication when it is powered on. (No error logged if the backup remains off.)
You can create a snapshot and replication task on the primary node that replicates all the data to the backup node once a week.
Then manually ensure the backup node is up and running when the replication task runs.
A dual node HA setup is not implemented in TrueNAS. Not even in the Enterprise edition. Enterprise gives you dual node controller HA but there is only one set of storage devices shared by both controllers.
Thanks a lot, yes looks to be the best strategy.
I will follow this video I found about it, seems very clear and well done: https://www.youtube.com/watch?v=XIj0iHtZvOg
I’ve a last noob question though: I’ve currently put 2 NVMe 2Tb disks per each TrueNAS node, it suggests me to configure them in mirror configuration, but isn’t it almost a waste and ok to keep them just as a 4Tb stripe instead? I mean those are solid state memories, the probability this to fail and not being catched by local and remote snapshots once I’ve configured what suggested above, should be super super low: no?
Thanks again!
Drives do fail. HDDs tend to fail gradually; SSDs are pure electronic and may die without warning.
You decide…