Configure RSync on FreeNAS to sync shares with a Windows NAS device
Image 1 of 75
Sun VM setup 1
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 withdrawals.
Sun VM setup
Open Sun VirtualBox and click the “New” button to create a new machine.
This gallery is also available as a TechRepublic blog post and download.
All images by Donovan Colbert for TechRepublic
Sun VM setup 2
The “Welcome to the New Virtual Machine Wizard will run. Click “Next” to continue.
Sun VM setup 3
Name your virtual machine and select your OS and version. In this case, I am creating a second FreeNAS VM and therefore selecting BSD for the OS and FreeBSD for the Version. Click “Next” when done.
Sun VM setup 4
Select the appropriate amount of memory. For my FreeNas VM, I’ve selected 512MB of memory. Click “Next” when done.
Sun VM setup 5
Sat “Virtual Hard Disk” check “Boot Hard Disk (Primary Master), select “Create new hard disk” button and click “Next” to continue.
Sun VM setup 6
The “Welcome to the Create New Virtual Disk Wizard” will run. Click “Next” to continue.
Sun VM setup 7
At “Hard Disk Storage Type” select “Fixed-size storage” and click “Next”.
Sun VM setup 8
At “Virtual Disk Location And Size, set the size of the disk to 500MB either using the slider or by typing the size in the field. Click “Next” to continue.
Sun VM setup 9
Verify the information for the new virtual disk is correct and click “Finish” to create the disk.
Sun VM setup 10
At the Summary window, verify for your settings and click “Finish” to create your FreeNAS Virtual Machine.
Network Setup VM 1
Network Setup VM
In Sun VirtualBox, select your VM and in the “Details” tab click “Network”.
Network Setup VM 2
The Network configuration for that VM will appear.
Network Setup VM 3
In the Pull-down menu labeled “Attached to:” select “Bridged Adapter”
In “Name:” select the host NIC that you want the VM bridged to.
Under “Advanced” insure “Adapter Type” is “Intel Pro/1000 MT Desktop (8245OEM)” and click “OK” when finished.
Storage Setup VM 1
Storage Setup VM
In Sun VirtualBox select your VM and in the “Details” tab select “Storage”.
Storage Setup VM 2
The Storage settings will display. 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.
Storage Setup VM 3
Storage Setup VM 4
At the “Welcome to the Create New Virtual Disk Wizard!” window, click “Next”.
Storage Setup VM 5
Select the “Fixed-size storage” radio-button and click “Next”.
Storage Setup VM 6
Use either the slider or the text field to enter the drive size as 5GB and click “Next”.
Storage Setup VM 7
At the “Summary” window verify your settings and click “Finish” to continue.
Storage Setup VM 8
A progress bar will display while your drive is created.
Storage Setup VM 9
Once the format is complete, click OK to return to the “Details” tab view of Sun VirtualBox.
FreeNAS Install 1
FreeNAS Install
Place your FreeNAS live CD in the physical machine’s drive, select “Storage” from the “Details” tab on your VM, 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.
FreeNAS Install 2
Highlight your VM and click the Start icon (The large green arrow).
FreeNAS Install 3
FreeNAS Install 4
At the “Install & Upgrade” menu select “3 Install ‘full’ OS on HDD + DATA + SWAP partition” and click “OK” to continue.
FreeNAS Install 5
At the “FreeNAS installation” prompt, click “OK” to continue.
FreeNAS Install 6
At the “Choose Installation media” window select the CD where the Live Boot CD is and click “OK”.
FreeNAS Install 7
At the “Choose destination media” window select the 500MB boot disk and click “OK”.
FreeNAS Install 8
Enter 200MB for the OS partition and click “OK” to continue.
FreeNAS Install 9
Select “Yes” when prompted “Do you want to add a swap partition”.
FreeNAS Install 10
Enter the remaining space (in MB) for your SWAP partition and click “OK”. The system will install. Once install is complete hit
FreeNAS Install 11
Select
FreeNAS Install 12
In Sun Virtual box, select “Storage” in the “Details” tab.
FreeNAS Install 13
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. Click “OK”. Restart your FreeNAS virtual machine u2013 which will now boot from hard drive, instead of the CD.
Freemas VMNIC Setup 1
Freemas VMNIC Setup
Exit out of the “Install & Upgrade” menu and return to the Console Setup numeric menu. Select “1) Assign interfaces”. This allows you to select and configure your active NIC.
Freemas VMNIC Setup 2
At the “Configure LAN interface” window select your interface by MAC address and click “OK”.
Freemas VMNIC Setup 3
At the “Configure OPT Interface” window select “none” and click OK. Acknowledge any prompts and click “yes” the interface will initialize and return you to the Console Setup.
Freemas VMNIC Setup 4
Select “2) Set LAN IP address”.
Freemas VMNIC Setup 5
At the “Do you want to use DHCP for this interface” dialog, select “No”.
Freemas VMNIC Setup 6
Enter your IP address and click “OK”.
Freemas VMNIC Setup 7
Enter the appropriate subnet mask and click “OK”.
Freemas VMNIC Setup 8
Enter the appropriate Default Gateway and click “OK”.
Freemas VMNIC Setup 9
Enter the appropriate DNS information and click “OK”.
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 1
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”.
FreeNAS GUI Setup 2
In the top menu bar, select Disks. In the Disk |Management page click the (+) sign.
FreeNAS GUI Setup 3
Select the 5GB disk from the drop down menu on the Disks|Management|Disk|Add menu. Click the “Add” button.
FreeNAS GUI Setup 4
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”.
FreeNAS GUI Setup 5
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”.
FreeNAS GUI Setup 6
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 u2013 then click “Apply changes”.
CIFS/SAMBA Setup 1
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”.
CIFS/SAMBA Setup 2
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”.
CIFS/SAMBA Setup 3
Click “Apply Changes” to activate your share.
CIFS/SAMBA Setup 4
Verify that the share you have activated it visible on your network, and is writable.
CIFS/SAMBA Setup 5
Setting the Freenas VM Hostname: Click on System | General.
CIFS/SAMBA Setup 6
Rename the host name and click save.
FreeNAS virtual machine server. Repeat all of the steps to build a second target Freenas virtual machine server u2013 changing appropriate information as necessary (IP address, machine name, and any other unique settings).
You’ve completed building your source.
FreeNAS Rsync Configuration 1
FreeNAS Rsync Configuration
Source FreeNAS server Rsync Configuration: Log into your source Freenas server.
FreeNAS Rsync Configuration 2
Select the services\Rsync tab. Click the “enable” checkbox and click the “Save and Restart” button.
FreeNAS Rsync Configuration 3
Select the “Server” tab and the “Modules” tab. Click the add icon.
FreeNAS Rsync Configuration 4
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.
FreeNAS Rsync Configuration 5
Click the share you want to sync. The path will change to reflect that path (in my case, /mnt/testshare) and then click “OK”.
FreeNAS Rsync Configuration 6
Verify your settings and click the add button at the bottom of the Services | Rsync | Server | Module | Add screen.
FreeNAS Rsync Configuration 7
At the summary page verify your settings and then click the “Apply Changes” button.
FreeNAS Rsync Configuration 8
Select the “Local” tab. Click the “Add module” icon.
FreeNAS Rsync Configuration 9
At the “Services|Rsync|Local|Add” page, in “Source Share” click the browse button.
FreeNAS Rsync Configuration 10
Double-click the appropriate source share, verify that the path is correct and click OK (in my case, /mnt/Testshare).
FreeNAS Rsync Configuration 11
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.
FreeNAS Rsync Configuration 12
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”.
FreeNAS Rsync Configuration 13
Target FreeNAS server Rsync Configuration: Log into your target FreeNAS server, select Services|Rsync from the main menu. Check the “enable” checkbox and click the “Save and Restart” button.
FreeNAS Rsync Configuration 14
In the Services|Rsync|Client window, click the plus icon.
FreeNAS Rsync Configuration 15
In “Local Share” click the Browse Button.
FreeNAS Rsync Configuration 16
Select your target path (in my case, mountpointb) and verify the correct path (/mtn/mountpointb) for the destination Rsync path and click “OK”.
FreeNAS Rsync Configuration 17
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” 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.
FreeNAS Rsync Configuration 18
Click “Apply Changes”.
FreeNAS Rsync Configuration 19
Open up a browse session to the share on the Source FreeNAS server and the Target FreeNAS server. Drop a file into the source, 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 2 Disk data replication.
-
Account Information
Contact dcolbertmatrixmso
- |
- See all of dcolbertmatrixmso's content