Strategy question - redundant FreeNAS servers & sync

k0d3g3ar

Cadet
Joined
Nov 12, 2017
Messages
6
Hi there, we have a large FreeNAS server that is colocated in a data center and is getting more and more critical use. Currently we are backing the file systems up using rsync to an external backup server, which is good but if the server goes offline, the time it will take to rebuild will have undo stress on users to wait through this. As the FreeNAS server is becoming more and more pivotal to our strategy, we have decided to put a redundant 2nd FreeNAS server in the cage.

I believe there are facilities built into FreeNAS to sync content between two servers. In our case, our existing server will be the master and the new additional one will be the slave to it. I'm happy to set this up so that writes from users can only occur to the master, and that the slave is just a read/only backup, since restoring back content after the adverse event might be labor intensive. It is more important that our users have read/only access to file content even if their ability to update files is compromised while we address recovery.

If anyone has or is doing this sort of thing, I'd love to hear what techniques you have used for it, and how successful this approach has been in times when FreeNAS availability is down.

Thanks
Myles
 

Meyers

Patron
Joined
Nov 16, 2016
Messages
211
We have a warm standby. It's about the easiest thing to set up. Get the second server set up as near to production as possible. Then check out the section in the manual about replication. The receiving side's datasets are automatically set to readonly (double check that by running zfs get readonly DATASET on the backup / warm standby server).

I have several snapshot levels set up:
  • Every five minutes, kept for two hours (this is the most frequently you can do snapshots)
  • Every two hours, kept for twelve hours
  • Every twelve hours, kept for twenty-four hours
  • Every day, kept for three months
I also have a remote backup server 1500 miles away that backs up from the warm standby using rsync just to be ultra safe. One concern with using snapshot replication for backups is that you can replicate pool corruption, but I think this is ultra rare. So if the pool is totally trashed, I have snapshots on the remote backup system I can restore from.
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,110
Hi Myles,

What you need here is a combination of scheduled snapshots:
https://www.ixsystems.com/documentation/freenas/11.2/storage.html#snapshots

And a replication task:
https://www.ixsystems.com/documentation/freenas/11.2/tasks.html#replication-tasks

By their powers combined, they are Captain Planet an easy and efficient (after the initial sync) way to increase your redundancy levels and have a shorter time to recovery in case of a primary NAS failure.

You may lose some recently written data - whatever is newer than the latest successfully replicated snapshot obviously won't be present on the secondary system - if this is an issue and you want the data to always be available, you need a "High Availability" solution which isn't present in the free version of FreeNAS, but only in the commercial TrueNAS offerings (or you're building your own ZFS solution)
 
Top