archives technorata gallery music

Archive for the ‘GNU’ Category

Setup a backup server with FreeNAS

Sunday, February 3rd, 2008
freenas.jpg

A few years ago my data added up to a few Gig and backups were a simple matter of adding another mirrored hard drive to my one trusty Dell 700XPS. However, as my home network has expanded with music, image and video data and several computers and laptops, I found the need for a dedicated backup box essential.

My requirements were simple. It needed to be free, easy to configure, scaleable, somewhat well documented and have miserly system requirements. There are many open source solutions out there but I decided to implement FreeNAS.


The box I used for this had the following specs:

  • System: Dell PowerEdge 400SC
  • Proc: Intel Pentium 4 Northwood 2.8Ghz
  • Memory: 2Gb - 4 x 512Mb
  • Video: Rage XL
  • OS drive: 40Gb Seagate Barracuda 7200.7 UltraATA
  • Data drive: 200Gb Western Digital WD2000JB
  • Optical drive: LG Superdrive DVD/CD-RW

Just a quick note on the above system specs. While a 2.8Ghz Northwood and 2Gig of RAM is by no means bleeding edge performance, I also realize it’s not exactly miserly. However, it’s the only spare system I had and I’m not going out to buy a weak Celeron system with 256Megs of RAM to demonstrate how efficiently FreeNAS uses system resources. With that said, let’s go on to the installation.

INSTALLATION

  1. Download the lastest stable image from the FreeNAS site and burn image to CD
  2. Boot up your system with FreeNAS LiveCD (not the embedded *.img)
  3. Hit Enter when the FreeNAS splashpage appears.
  4. Select 9 to install to your harddrive
  5. Select 3 to install full release
  6. FreeNAS setup will list the detected CDROM. Mine was acd0
  7. The next prompt was to enter the name of the CD-ROM drive, I entered acd0 that the install routine detected.
  8. A list of detected drives will be listed and a prompt Enter the name of the hard drive. This drive will be the FreeNAS installation drive not the data drive.
  9. My listed drives were:
    ad0: 38146MB
    ad1: 190783MB
  10. I typed the following for my OS drive - ad0
  11. At the next prompt, type in the size of your OS partition. I’m utilizing the entire disk so I typed the following: 38146
  12. The OS will install and then you are free to reboot the system
  13. The next step is to assign the LAN interfaces.
  14. After entering back into the setup menu, select 1 - Assign Interfaces.
  15. My installation automatically detected the interface - in my case em0 and that is what I typed when prompted to enter my LAN interface.
  16. I don’t want to configure additional (Optional) interfaces, so in the next screen I just hit the Enter key and in the next screen applied any changes by typing y
  17. In the main menu I selected 2 - Set LAN IP Address
  18. I typed n when asked if I wanted to use DHCP for IPv4 and then entered my preferred static IP address
  19. My LAN subnet bit count was 24 and my IPv4 gateway was my router at 192.168.1.1
  20. I also added my DNS information, external Comcast but I’m not sure if I should have just pointed it to my internal Linksys router - not sure if it does forwarding automagically.
  21. I configured IPv6 to configure automatically and then sent a test ping to my router. Looks good so far.
  22. So you should get a message about the assigned address and that you can access the WebGUI there.
  23. I logged on to mine at 192.168.1.30 - w/username: admin and password freenas.
  24. Once logged in, I went ahead and modified some of my network settings. I changed to reflect my network name suffix and also added a DNS server address. I also went ahead and changed the WebGUI password.
  25. Go to Disks -> Management and click on the + sign.
  26. On the next page, select the disk you want to use as your Backup directory. In my case, ad1 as noted earlier in these instructions
  27. In the Preformated FS drop down, we will leave the value as Unformated, click Add and in the next windowApply
  28. Next we want to format the disks. I selected ad1 and UFS with soft updates
  29. Now to mount the disk we use Disks -> Mount Point, click the + sign and select the disk to mount. I used the following values:
    Partition: EFI GPT
    File System: UFS
  30. Click Save and Apply
  31. Now we need to start a few daemons, specifically enabling CIFS/Samba
  32. Click the Services -> CFS/SMB link and check the Enable box.
  33. Leave all the default values and click the Save button for now. We’ll go back and change things as needed.
  34. Apparently as of version 0.685b we need to assign shares. So click the Shares tab and enter the appropriate information. I used the browse button to select the right syntax for the file path and also unchecked the Hosts deny option.
  35. At this point, in a Windows system I am able to type \\192.168.1.30 in the Run command and access the share. On Gutsy I can open Nautilus, click Go -> Location and type in the ip address and access the share as well.
  36. Now that we’ve tested CFS/SMB access, we want to go ahead and allow our *nix systems native access with NFS. Locate and click Services -> NFS
  37. Check the enable check box. Enter the correct subnet that will have access, including the subnet mask which in my case was 192.168.1.0/24. Click Save and Restart and make sure that enable is checked. Let’s test now.
  38. Well, I see it but it’s not listed in my normal network because I haven’t edited those network settings. It shows up in Workgroup and the only place i can see to change that is in CFS/SMB.
  39. Change the workgroup name to whatever you network name is - in my case it is homenet.local Click Save and restart
  40. Checked it again and there it is. Easy.