FreeNAS configuration question - is this possible?

Status
Not open for further replies.

thezlog

Dabbler
Joined
Sep 6, 2011
Messages
12
At my work, we're currently considering methods of creating on-site backups that can also be taken off-site for our Exchange server, backup size is about 350GB total.

One of the ideas we had was to build a FreeNAS box. Here's the question:

Is there a way to configure a FreeNAS box with RAID-z2 that will mirror that store to a single HDD that I could have in a hot-swap bay?

Perfect world example: Backup runs, data is saved to NAS RAID-z2 share and mirrored to hot-swap drive. I pull drive and take it with me when I leave work.

Thanks!
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
So what does the NAS do after you pull the drive and leave work? It has to write "newfile" and now it has no place to mirror it. Have you fully thought through the mechanics of this? Does it have to wait for the next day for you to bring the disk back? If you've inserted a new disk, does the new disk have to be re-mirrored upon insertion? What's the process?

What you *can* do is to take ZFS snapshots and then dump them onto a single HDD that you have in a hot-swap bay; you can do this in a number of ways, each with some ups and downs. If you want a complete image, you take a snap an hour or two before you leave work, then dump the whole thing onto the hot-swap HDD. If you want an incremental image, you can probably manage that through the zfs replication feature. It's some script work though.
 

SnorreSelmer

Explorer
Joined
Sep 7, 2011
Messages
58
I second the ZFS snapshot solution. FreeNAS 8 has a built-in feature that lets you set up dumping of snapshots to a remote machine, so you could even set up a remote server connection (for example a VPN via the internet) and let FreeNAS take care of this on its own. No need for hot-swapping physical drives.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
That's certainly possible too. However, many business Internet connections are not really fast enough to support that as a practical matter, and/or may not want to burn the bandwidth doing that. The ZFS snapshot strategy does not necessarily lock you into a choice, however, especially if you're clever about how you go it. So you could set it up to work both ways.

A "best of both worlds" replication solution might work as follows, some script work required:

A second NAS, off-site, maybe at the home of the owner. Let's say both NAS devices are 4TB usable storage (4 x 2TB RAIDZ2). The backup location has a 2Mbps DSL connection (and your primary site has at least 2Mbps upstream capability that's unused outside business hours). If you start dumping at 6PM, you can dump at least 200KB/sec until 7AM the next day, 13 hours, or about 8GB.

So you figure that your daily deltas won't ever be more than 100GB. To be safe and paranoid, you go get yourself a 500GB portable hard drive of some sort. You set up a ZFS replication script that dumps sequentially numbered snapshots onto the portable hard drive every day at 3PM. Upon completion, the script looks at the size of the snap. If it's greater than 8GB, it sends you an e-mail warning you need to sneakernet it. Otherwise, it sleeps until 6PM and begins sending the snapshot over the network. On the receiving end, you have a system that imports sequentially numbered ZFS snapshots into the local filesystem.

This can be made robust in many ways, and tweaked in many ways to suit.
 

thezlog

Dabbler
Joined
Sep 6, 2011
Messages
12
JGreco, I suppose using the term "Mirror" wasn't the best choice of words but I chose it to indicate the intention. I am not looking for an actual RAID mirror to exist between the ZFS and the hot swap drive. What I would like (and seems to have been mentioned as an option) is a way to schedule an event that would dump a copy of the backed up data/snapshots to that drive. We would have a drive for every day of the week that would recycle every two weeks. So on Tuesday before leaving, I would pull Monday's drive to take home and insert tuesdays (which would copy the data to the hot swap over night at somepoint). Tuesday evening, i would pull tuesday and insert wednesday, taking tuesday home with me.

I hope that makes sense, it sounds like it's possible.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Tuesday evening, i would pull tuesday and insert wednesday, taking tuesday home with me.

I hope that makes sense, it sounds like it's possible.

Sure, it's possible. It's just a little scriptwork. What you'll want is a script that verifies that you've got the correct disk inserted, then purges the old backup, takes a snapshot, dumps the snapshot to the removable, then frees the snapshot. That assumes you want a complete image of the datastore saved.
 
Status
Not open for further replies.
Top