My home backup solution is a little elaborate. I’ve built a FreeNAS server with two 500GB drives in a JBOD configuration for 1TB of storage. That data is then replicated to a Windows Device-based NAS with four 250GB drives in a Raid 5 configuration. From there, the most essential folders and data are backed up to a Powervault 120t 4000 DLT IV tape backup library.

The aim of this document will be to illustrate how to recreate this configuration — which is a suitable, inexpensive alternative to more expensive data replication solution for a small office or data center on a limited budget — or overkill for the propeller head who can’t be away from the hum of a data center without going into withdrawal.

This blog post is also available in PDF format in a TechRepublic download and as an illustrative Photo Gallery.

The setup

FreeNAS is a mature, robust open-source NAS application built on FreeBSD. Your configuration may vary, but I found a system that was small and elegant, had enough internal space for a couple of disk drives, and, most importantly, could boot from a USB device. You can also configure FreeNAS to boot from a portion of the internal hard drive or from a floppy or CD, but the first takes away a portion of storage space available to the NAS, and the second two examples are clunky, slow, and potentially unreliable.

By having the device boot off a USB drive, it maintains the impression that this is a dedicated NAS device and not a PC repurposed as storage. I run this box “headless,” although it has a keyboard, mouse, and monitor ports. There is a Web-based interface that allows you to access and manage the box via a Web browser, like most commercial NAS devices. I’m using the FreeNAS software RAID, but if your box has a hardware RAID, you would most likely use that instead.

For the Windows NAS device, I purchased a used Dell Powervault NAS device from eBay. For many users, a Windows Home Server solution is effectively the same thing. A quick search on eBay shows that similar Dell Powervault NAS devices are going for $199, “Buy It Now.” Likewise the Dell Powervault 120t is available on eBay and generally goes for around $20-$80.

A few words in particular about DLT tape devices — these devices have become very affordable, but media can still be a little pricey. I would recommend buying a device bundled with media. Additionally, there are several different models of the Dell Powervault 120t. The native/compressed capacity and speed of the device varies by model. The most common models are the DLT 4000, DLT 7000, and DLT 1.

In the list below, the first number is the native capacity, and the second is the compressed capacity. Most people, in most situations, will not need much more than the native capacity for storage and are likely to experience less than the native capacity for speed.

  • DLT 4000 has a 20/40GB capacity per tape and is rated to transfer at between 1.5mb/second and 3.0mb/second.
  • DLT 7000 has a 35/70GB capacity per tape and is rated at between 5mb/sec and 10mb/sec.
  • DLT1 has a 40/80GB capacity per tape and is rated between 3mb/sec and 6mb/sec.

If you have more money to budget, there are higher capacity and speed tape drives. These drives offer a good balance between features, speed, and affordability for a very tight budget. Anything with noticeably more capacity still has a more significant value in your average production data center, and so you’ll have to pay more.

There is also no reason for you to configure your solution exactly as I have here. You can take ideas from this setup where it makes sense and customize it to your particular needs. In particular, I put this solution together in stages. If I had done it all at once, I probably would have bought two like-configuration Powervault NAS devices — or built two FreeNAS devices that were configured exactly the same. I am describing my solution exactly as it is configured only to give you a framework for how you might implement a similar solution.

My solution

For my home solution, FreeNAS has a couple of advantages, other than it being free. It also plays fairly well with SMB/CIFS “SAMBA” Windows Networks. It does not, unfortunately, support Windows security models for permissions very well. This was not a concern for my home network, but it may be a significant concern on a company network.

In general, if you can get onto my home network, you’ve got complete and unrestricted access to all files on my FreeNAS server. I like it this way, because my home network is a workgroup. All my machines map persistent shares to this FreeNAS server, which we’ll refer to from here out as \\Freenas. The shared folder on \\Freenas is \homeshare. My Macintosh, my Ubuntu servers, even my Android phone can all easily map shares to \\Freenas\homeshare and all files and folders under that share. My wife and kid both have a directory on this device.

All data on \\Freenas\homeshare has been replicated to the second NAS, which we’ll call \\Powervault. \\Powervault has a share named \homeshare as well. After the initial sync between \\Freenas\homeshare and \\Powervault\homeshare, all NEW files written to \\Freenas\homeshare are instantly replicated to \\Powervault\homeshare.

Changes to files are also replicated “instantly” (I’ve set Rsync to replicate every five minutes. You can decrease or increase this number according to your needs). Files that are removed on \\Freenas are not removed on \\Powervault. That is to make sure that an accidental erasure on \\Freenas is not instantly replicated to \\Powervault (thereby defeating the purpose of having a backup-to-disk solution).

I’ve then defined, in my backup solution, a weekly full backup of certain folders on \\Powervault to tape on my DLT 120t tape library. I rotate two sets of six tapes — so I always have the last two weeks of critical data backed up to tape.

When I started this project, I had intended to write a very simple, high-level overview of how I have this set up. As I got into it, I realized it wouldn’t be very clear unless I rebuilt the entire thing from scratch. As my environment is effectively “production” on my home LAN, I didn’t want to disrupt what I already had in place. Instead, I decided to create a couple of VM machines and illustrate the configuration that way.

Somewhere along the way, I decided to include details on how to actually set up the test environment in a VM environment. In the end, I think this is the best way for most people to approach testing this solution to see if it will work in their own environment.

Using the How To document I’ve created, you’ll be able to build yourself a Source and Target Virtual FreeNAS server and set up RSync to replicate data from the source share to the target share. With the experience you’ll gain doing this, you’ll be ready to move ahead and implement a solution like I describe above if you decide FreeNAS will work for you.

I used Sun VirtualBox as my Virtual Machine foundation. The following documents assume that you will be using Sun VirtualBox as well, but the process can easily be modified to use any other VM solution (VMWare, Citrix, or others) that you may prefer.

I’ve also decided to illustrate an Rsync from a virtualized FreeNAS machine to another virtualized FreeNAS machine. The lessons learned here will apply to using Rsync to perform this kind of data replication to any target server, including a Windows-based NAS. For anyone interested in Syncing from FreeNAS to a Windows-based server or appliance, “DeltaCopy” is the Rysnc Server/Client application that I use on my production replication environment.

Keep in mind, with this virtualized environment, I have made some assumptions in my documentation. I have illustrated the installation process of FreeNAS onto a VM for a single machine only. You’ll need to do this twice, making the necessary changes (machine name and IP address) as appropriate on your network or test environment.

I’ve also set a very small, nonredundant drive on the FreeNAS machines. In production, obviously you would want to increase this size according to the needs of your organization. I suppose that there could be additional advantages of running both the source and target FreeNAS servers as actual virtual machines in a production environment. Those questions are outside the scope of this article, and so I have not addressed issues of what kind of hardware environment is ultimately suitable for a production example of the concept illustrated in this document.

Finally, I haven’t described, in my test environment, how I back up from the B2D to tape. I’m using Backup Exec 10D running on my Windows NAS appliance to do the backup to tape. Depending on your needs, the important thing to know is that once you replicate from the Source NAS to a target NAS, you can then back up to tape from that target NAS without having an impact on your production network or NAS.

Sun VM setup

Figure A

Open Sun VirtualBox and click the New button to create a new machine (Figure A).

Figure B

The Welcome to the New Virtual Machine Wizard will run. Click Next to continue (Figure B).

Figure C

Name your virtual machine and select your operating system and version. In this case, I am creating a second FreeNAS VM and therefore selecting BSD for the Operating System and FreeBSD for the Version. Click Next when done (Figure C).

Figure D

Select the appropriate amount of memory. For my FreeNas VM, I’ve selected 512MB of memory. Click Next when done (Figure D).

Figure E

In Virtual Hard Disk dialog box, check Boot Hard Disk (Primary Master), select Create New Hard Disk, and click Next to continue (Figure E).

Figure F

The Welcome to the Create New Virtual Disk Wizard will run. Click Next to continue (Figure F).

Figure G

At the Hard Disk Storage Type dialog box, select Fixed-size Storage and click Next (Figure G).

Figure H

In the Virtual Disk Location and Size dialog box, set the size of the disk to 500MB either by using the slider or by typing the size in the field. Click Next to continue (Figure H).

Figure I

Verify that the information for the new virtual disk is correct and click Finish to create the disk (Figure I).

Figure J

At the Summary window, verify your settings and click Finish to create your FreeNAS Virtual Machine (Figure J).

Next Page >>

Network Setup VM

Figure K

In Sun VirtualBox, select your VM, and in the Details tab, click Network (Figure K).

Figure L

The Network configuration for that VM will appear (Figure L).

Figure M

  • In the Attached To pull-down menu, select Bridged Adapter.
  • In the Name pull-down menu, select the host NIC that you want the VM bridged to.
  • Under Advanced, ensure that Adapter Type is set to Intel Pro/1000 MT Desktop (8245OEM) and click OK when finished (Figure M).

Storage Setup VM

Figure N

In Sun VirtualBox, select your VM, and in the Details tab, select Storage (Figure N).

Figure O

The Storage settings will display (Figure O). In the Storage Tree, click the Add Hard Disk Button (it is the green plus sign in front of 3 disk platters). Depending on if you’ve created other virtual machines, the behavior of the Storage Tree window can be hard to understand (Figure P).

Figure P

Assuming you have no other virtual machines or virtual disks defined, if you click the plus-button you’ll see the alert in Figure Q. Click Create.

Figure Q

At the Welcome to the Create New Virtual Disk Wizard! window, click Next (Figure R).

Figure R

Select the Fixed-size Storage radio-button and click Next (Figure S).

Figure S

Use either the slider or the text field to enter the drive size as 5GB and click Next (Figure T).

Figure T

At the Summary window, verify your settings and click Finish to continue (Figure U).

Figure U

A progress bar will display while your drive is created (Figure V).

Figure V

Once the format is complete, click OK to return to the Details tab view of Sun VirtualBox.

FreeNAS Install

Figure W

Place your FreeNAS live CD in the physical machine’s drive, select Storage from the Details tab on your VM. Next, under IDE controller, click the CD icon; in Attributes, under the CD/DVD Device pull-down menu, select your host CD/DVD device (in this case, the E: drive on my host machine), and click OK (Figure W).

Figure X

Highlight your VM and click the Start icon (the large green arrow) (Figure X).

Figure Y

You’ll see a numeric boot menu. Wait or hit return to accept the default option. Your virtual machine will start, and FreeNAS will begin to load. Wait for the boot to complete. A numeric Console Setup menu with items 1 through 9 will appear. Select option 9) Install/Upgrade to Hard Drive/Flash Device, Etc. (Figure Y).

Figure Z

At the Install & Upgrade menu, select option 3 Install “Full” OS on HDD + DATA + SWAP Partition and click OK to continue (Figure Z).

Figure ZA

At the FreeNAS Installation prompt, click OK to continue (Figure ZA).

Figure ZB

At the Choose Installation Media window, select the CD where the live boot CD is and click OK (Figure ZB).

Figure ZC

At the Choose Destination Media window, select the 500MB boot disk and click OK (Figure ZC).

Figure ZD

Enter 200MB for the OS partition and click OK to continue (Figure ZD).

Figure ZE

Select Yes at the Do You Want to Add a Swap Partition? prompt (Figure ZE).

Figure ZF

Enter the remaining space (in MB) for your SWAP partition (Figure ZF) and click OK. The system will install. Once the install is complete, hit <Exit> to return to the Console Setup menu and then select the option 8 Shutdown System.

Figure ZG

Select <Yes> at the Do You Really Want to Shutdown the System? prompt (Figure ZG). Allow the system to shut down.

Figure ZH

In Sun Virtual box, select Storage in the Details tab (Figure ZH).

Figure ZI

In the Storage Tree, under the IDE Controller, highlight the host drive. In Attributes, under CD/DVD device, select Empty from the pull-down menu (Figure ZI). Click OK. Restart your FreeNAS virtual machine — which will now boot from the hard drive, instead of from the CD.

Next Page >>

Freemas VMNIC Setup

Exit out of the Install & Upgrade menu and return to the Console Setup numeric menu. Select the option 1) Assign Interfaces  (Figure ZJ). This allows you to select and configure your active NIC.

Figure ZJ

At the Configure LAN Interface window, select your interface by MAC address and click OK (Figure ZK).

Figure ZK

At the Configure OPT Interface window, select None (Figure ZL) and click OK. Acknowledge any prompts and click Yes, so the interface will initialize and return you to the Console Setup.

Figure ZL

Select option 2) Set LAN IP address (Figure ZM).

Figure ZM

At the Do You Want to Use DHCP for This Interface? prompt, select No (Figure ZN).

Figure ZN

Enter your IP address and click OK (Figure ZO).

Figure ZO

Enter the appropriate subnet mask and click OK (Figure ZP).

Figure ZP

Enter the appropriate Default Gateway and click OK (Figure ZQ).

Figure ZQ

Enter the appropriate DNS information and click OK (Figure ZR).

Figure ZR

Select No when asked to configure IPv6 information.

When you return to the numeric Console Setup menu, you’ve finished the installation and basic configuration of your FreeNAS virtual machine. Next we’ll connect with a Web browser from our host machine to the FreeNAS Web-based GUI interface and complete the configuration of the server.

FreeNAS GUI Setup

Open a browser in your host OS and connect to your FreeNAS virtual machine. Default username is “admin” and password is “freenas” (Figure ZS).

Figure ZS

In the top menu bar, select Disks. In the Disks |Management page, click the (+) sign (Figure ZT).

Figure ZT

Select the 5GB disk from the drop-down menu on the Disks|Management|Disk|Add menu. Click the Add button (Figure ZU).

Figure ZU

From the top menu bar, select Disks|Format. Select the 5GB disk from the drop-down menu. Leave the default UFS file system selected and click Format Disk (Figure ZV).

Figure ZV

From the top menu, select Disks|Mount Point|Management. Click on the (+) sign (Figure ZW).

Figure ZW

On the Management tab, select the 5GB disk from the drop-down menu and enter the mount point name (I’ve chosen “Testshare” for this mount point) and click the Add button and then click Apply Changes (Figure ZX).

Figure ZX

CIFS/SAMBA Setup

From the top menu, select Services, CIFS\SMB. Check Enable to activate the CIFS/SMB file-sharing service. In the NetBIOS Name field, enter the name you want the machine to register on your Windows network. In the Workgroup field, enter your domain name or workgroup name. Scroll down to the bottom of the screen and click Save & Restart (Figure ZY).

Figure ZY

Click the Shares tab. Click (+). In the Name field, enter the name of the share as you want it to appear in your network neighborhood. In the Path field, you can type in the path you want to be shared or you can browse to the path you want to share. Once you’ve filled in this information, click Add (Figure ZZ).

Figure ZZ

Click Apply Changes to activate your share (Figure ZZA).

Figure ZZA

Verify that the share you have activated it visible on your network and is writable (Figure ZZB).

Figure ZZB

To set the Freenas VM Hostname, click on System | General (Figure ZZC).

Figure ZZC

Rename the host name and click Save (Figure ZZD).

Figure ZZD

You’ve completed building your source FreeNAS virtual machine server. Repeat all the steps to build a second target Freenas virtual machine server — changing appropriate information as necessary (IP address, machine name, and any other unique settings).

Next Page >>

FreeNAS Rsync Configuration

To set up your Source FreeNAS server Rsync Configuration, log in to your source Freenas server (Figure ZZE).

Figure ZZE

Select the Services\Rsync tab. Click the Enable checkbox and click the Save and Restart button (Figure ZZF).

Figure ZZF

Select the Server tab and the Modules tab. Click the Add icon (Figure ZZG).

Figure ZZG

You’ll see the Services | Rsync | Server | Module | Add window. Enter a name and a comment (I’ve selected “testmod” as my name and comment) and click the Browse button in Path to define your source Rsync share (Figure ZZH).

Figure ZZH

Click the share you want to sync. The path will change to reflect that path (in my case, /mnt/testshare) and then click OK (Figure ZZI).

Figure ZZI

Verify your settings and click the Add button at the bottom of the Services | Rsync | Server | Module | Add screen (Figure ZZJ).

Figure ZZJ

At the summary page, verify your settings and then click the Apply Changes button (Figure ZZK).

Figure ZZK

Select the Local tab. Click the Add Module icon (Figure ZZL).

Figure ZZL

At the Services|Rsync|Local|Add page, in Source Share, click the Browse button (Figure ZZM).

Figure ZZM

Double-click the appropriate source share, verify that the path is correct, and click OK (in my case, /mnt/Testshare) (Figure ZZN).

Figure ZZN

In the Destination Share, enter the IP address and path of the destination share in the format [ipaddress::sharepath]. In my case, my destination server was 192.168.2.31::testb. Please note that you can use FQDN if your FreeNAS is registered with your DNS server or otherwise configured to resolve (Figure ZZO).

Figure ZZO

Select your Synchronization Time preferences. I’ve selected every 5 minutes, every hour, every day, every month, and all weekends. Click the Add button at the bottom of the page. Click Apply Changes (Figure ZZP).

Figure ZZP

To target FreeNAS server Rsync configuration, log in to your target FreeNAS server, select Services|Rsync from the main menu. Check the Enable checkbox and click the Save and Restart button (Figure ZZQ).

Figure ZZQ

In the Services|Rsync|Client window, click the plus icon (Figure ZZR).

Figure ZZR

In Local Share, click the Browse button (Figure ZZS).

Figure ZZS

Select your target path (in my case, mountpointb) and verify the correct path (/mtn/mountpointb) for the destination Rsync path and click OK (Figure ZZT).

Figure ZZT

In the Remote Rysnc Server field, enter the source FreeNAS server (in my case, 192.168.2.30. Again, if your machine is registered with DNS, you can use FQDN). Select the Synchronization Time option that matches the settings you entered on the host machines (in my case, every 5 minutes all hours, all days, all months, and all days of the week). In Remote Module Name, enter the name of the source server module we created on the source, “testmod.” Click the Add button at the bottom of the page (Figure ZZU).

Figure ZZU

Click Apply Changes (Figure ZZV).

Figure ZZV

Open up a browse session to the share on the Source FreeNAS server and the Target FreeNAS server. Drop a file into the source and wait, and if everything is set up correctly, the file should shortly appear on the target share, as well. Congratulations, you’ve configured an inexpensive NAS solution that does disk-to-disk data replication (Figure ZZW).

Figure ZZW

Stay on top of the latest Microsoft Windows tips and tricks with TechRepublic’s Windows Desktop newsletter, delivered every Monday and Thursday. Automatically sign up today!