TweetFollow Us on Twitter

Affordable NAS

Volume Number: 23 (2007)
Issue Number: 11
Column Tag: Networking

Affordable NAS

Integrating FreeNAS appliance software into a Mac environment

by Robert Staehl

What This Article Will Cover

The purpose of this article is to introduce the user to the potential of integrating a NAS device - an open source, Mac-friendly (AFP serving) NAS appliance - into a network environment. The article will focus on getting a FreeNAS device configured and running on a local network. FreeNAS includes several advanced features such LDAP and AD support that I do not cover in detail. This article will cover installation and configuration to a point allowing network access to the data stored on the device.

Why NAS?

NAS, or Network Attached Storage, is a means of sharing data and files via a network. A typical scenario is the use of a NAS device within a work group as a way to store information which allows multiple protocols access, such as NFS, SMB and AFP. As an example, in our office we work with applications that are specific to Mac or Windows systems that need to share common assets. A NAS is a logical solution that allows for the storage of such assets without the need to maintain a full file server. Even for a home network, a NAS appliance can be a rational location for the central storage of music and video libraries.

Why FreeNAS?

My personal experience started by attempting to use a boxed NAS solution available either on line or from the local computer shop. I found out the hard way that the major brands, while claiming to support OSX, integrate an older version of AFP that does not support long filenames. Being cheap to a fault and having extra Intel PC's hanging around my office, I decided to try out the Appliance Software route. There are other widely used NAS solutions that include 1u or 2u chassis preconfigured that only require adding drives: ReadyNAS looks to be a great solution. My goal was to build a cheap, massive (more than 4 drive) solution using mostly left over parts hanging around. To achieve this goal, FreeNAS fit my needs perfectly. An added benefit of using FreeNAS is that it is open source and can potentially be modified or expanded upon as my business evolves. A proprietary solution inherently lacks this flexibility.

Evolution of Appliance Software

Many specialized tasks have been distilled to a self-contained package of tools bundled with a compact version of an operating system (http://en.wikipedia.org/wiki/Software_Appliance). Appliance Software is perfect for dedicated tasks such as routers, mail servers, database applications, NAS systems and almost any other isolated task imaginable. There are various resources on the Internet for finding Appliance software but one of my favorites is the list hosted by VMWare (currently located at the following URL: http://www.vmware.com/vmtn/appliances/directory/). Appliance software can run the gamut from free open source, to commercial packages that can cost thousands of dollars. FreeNAS is an appliance software package. It is an open source initiative based on the FreeBSD kernel.

Getting FreeNAS

FreeNAS is available on the FreeNAS.org website. In the downloads section of site, there are several choices for versions and formats. Before downloading, it is best to consider how the appliance will be run. For my personal needs, a dedicated PC with a 3ware RAID card and 8 SATA drives is the plan. To save space in the case and avoid the added power demands of a dedicated hard drive for the OS, I've opted to run the operating system from a USB jump/thumb drive. The best option for this type of a setup is to obtain the .iso of the latest build of FreeNAS. Normally for a production environment I'd recommend only downloading the latest 'Stable' version of an open source package. But since FreeNAS is currently still in pre-release (there is no 1.0 version yet), beta is the only option. As with any new technology introduction, standard disclaimers apply: test, test, and test prior to deployment to production!

Target Box

My target machine is a standard Intel based PC with a 3ware 8500 series 8-port SATA card. Except for the RAID card, the PC is built with generic components (including motherboard, processor, ram and NIC). The power supply is 500 watt with lots of drive connectors. I found a 'RaidMax' chassis at a local Fry's store with lots of room for drives and good cooling. For purposes of installing the FreeNAS software, I included a CD-ROM drive in the machine build. The only potential 'gotcha' is the system BIOS will need to support booting from USB if the OS is to be installed on the jump/thumb drive.

Installation and Configuration

Burn a CD from the ISO image you downloaded from FreeNAS.org, and boot the PC from it - set the BIOS of the PC to boot from the CD if you must. The PC should boot with a FreeBSD kernel and detect the hardware connected. After the completion of the boot process, there should be a console setup menu with 9 choices. Insert the target USB jump/thumb drive, the console should return some messages that the drive has been detected. Since we plan to install to the USB drive we select item 9 in the list ('Install to a hard drive/memory drive/USB pen, etc.'). After some warning about erasing data on target drives there should be a submenu of 4 choices. Sub-item 1 will install the FreeNAS using all available space on the USB drive. After selecting a single or two partition install (Sub-item 2), the installer will ask for the location of the source data (the CD-ROM). In my case, device 'acd0' is my source drive. So, I type 'acd0' at the prompt (without the quotes). After hitting return, the installer lists all the potential target drives for installation. In my case, again, device 'da0' is the USB drive, so I type that name at the prompt. After a few minutes, the installation should complete and provide instructions for rebooting the system. The CD can also now be removed. The complete FreeNAS installation consumes less than 40 megabytes so it should fit on almost any spare or unused USB drive.

On the next reboot, the BIOS will need to be tweaked again to set the USB drive as the primary device. After proper configuration of the BIOS, the machine should boot into the FreeNAS OS from the USB drive (if your machine supports doing so). Otherwise, you can always install on a hard drive. When the system is booted, the original 9-item menu should present itself again. The first order of business will be to setup the network. Item 1 in the menu is used to Assign Interfaces. Meaning that if the system will have more than one NIC, this is where they could be set to WAN and LAN. For my purposes, the NAS device will only be used on the local network so I only need to configure a single NIC as the LAN. After assignment of the interface, the system may need to be rebooted. This should be the last reboot until the system needs to be taken offline for maintenance.

We should be back to the 9-item menu. This time select item '2', this is used to assign an IP address to the device. I like to manually assign an IP rather than use DHCP, that way, I can set my local DNS to point directly to the box and assign a name like nas.mydomain.com to the IP. Follow the on-screen instructions to assign an IP and subnet to the LAN. The last task at the console is assigning a webGUI password (item 3). Set an appropriate password by following the on screen instructions.

WebGUI

It's now safe to leave the console and return to a machine running a friendlier interface. From another machine on the same subnet, launch a browser and connect to the IP assigned to the FreeNAS box. An authentication window should be presented. The username is 'admin', the password should be whatever you assigned in the last step at the console. If everything worked correctly, there should be an interface that appears similar to that of figure 1.


Figure 1 - The FreeNAS web console

From this GUI, the appliance can now be configured for the installed drives and how the users on the network will see the drives. The first order of business is to show the FreeNAS OS the drives to share. One of the reasons I like 3ware RAID cards is that support for them is built into the kernel of FreeBSD (and hence into FreeNAS). 3ware has a BIOS-level interface that allows the drives to be configured as a RAID device. In my case, I used that interface to create a 7-drive raid 5 system with one hot spare. FreeNAS sees the 3ware card and all 8 drives as a single disk. From the left navigation tools, select the Disks > Management tool then click on the small plus symbol towards the right edge of the screen to add a drive to be managed by FreeNAS. A subsequent screen will appear that allows selection of all the drives seen by FreeNAS. If there is existing data on the selected drive that needs to be saved, there is an option at the bottom of this subsequent screen to allow selection of the preformatted file system. Be sure to use the 'Apply Changes' button or nothing will be modified.

Of note is that HFS or HFS+ are not options, since these are Apple-centric file systems. If the drives are using HFS or HFS+ and the data needs to be preserved, the drives will need to be backed up from a Mac then restored to the NAS after it has been configured.

Once a disk as been set in the Management panel it can then be formatted using the Disks > Format tool. There are also tools for the creation of Software RAID and data Encryption. In my personal experience, the Software RAID was not reliable and I wouldn't recommend its use for any data that isn't being replicated someplace else. After the Format command is initiated on one of the disks created in the Management section, which might take a few minutes to complete, the webGUI should return a window with the super-block data for the drive. At the bottom of that window (hopefully) will be a 'Done!' message. Using the Disks > Mount Points tool the newly formatted drive should be visible. It should be set with a Share Name.

Using the Access > Users and Groups command first create a Group (from the Group tab at the top of the screen). Then add a user. If your network has an LDAP or AD server, you can point the FreeNAS to that device for a list of users.

The last step in the process is to set up the sharing services. From the Services menu, select AFP (assuming the goal is to put the new NAS device on an Mac network). Click the 'Enable' checkbox in the upper right corner. Then assign a name to the server. Set the Authentication as appropriate. Don't forget to click the 'Save and Restart AFP' button.

Test the box by using the Finder > Go > Connect to Server menu and connect to afp://111.111.111.111 (substituting the IP address assigned to the FreeNAS device). If all went well, a standard OS X authentication will appear. The user name created in the webGUI should allow mounting of the shared drive.

Now What?

The beauty of FreeNAS solution is the unlimited potential to customize the device. There is no reason the kernel or installation environment could not be hacked to install almost any tool available in the FreeBSD ports collection. Some examples relevant to the example system would be installation of the 3ware command line tools to administer the RAID device. To be truly fancy, a full version of Apache could be installed and add the 3ware web administration tool. Ideas I've had, but haven't had the time to execute, would be to create an asset browser for image viewing on the network, or adding a subversion control database to the NAS for collaboration and project management.


VIZf/x is an architectural rendering and animation service organization based in Northern California. Robert Staehle is the principal owner of VIZf/x and is an architect and self-educated sys admin. He can be reached via email at: info@vizfx.com.

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Latest Forum Discussions

See All

Top Mobile Game Discounts
Every day, we pick out a curated list of the best mobile discounts on the App Store and post them here. This list won't be comprehensive, but it every game on it is recommended. Feel free to check out the coverage we did on them in the links... | Read more »
Price of Glory unleashes its 1.4 Alpha u...
As much as we all probably dislike Maths as a subject, we do have to hand it to geometry for giving us the good old Hexgrid, home of some of the best strategy games. One such example, Price of Glory, has dropped its 1.4 Alpha update, stocked full... | Read more »
The SLC 2025 kicks off this month to cro...
Ever since the Solo Leveling: Arise Championship 2025 was announced, I have been looking forward to it. The promotional clip they released a month or two back showed crowds going absolutely nuts for the previous competitions, so imagine the... | Read more »
Dive into some early Magicpunk fun as Cr...
Excellent news for fans of steampunk and magic; the Precursor Test for Magicpunk MMORPG Crystal of Atlan opens today. This rather fancy way of saying beta test will remain open until March 5th and is available for PC - boo - and Android devices -... | Read more »
Prepare to get your mind melted as Evang...
If you are a fan of sci-fi shooters and incredibly weird, mind-bending anime series, then you are in for a treat, as Goddess of Victory: Nikke is gearing up for its second collaboration with Evangelion. We were also treated to an upcoming... | Read more »
Square Enix gives with one hand and slap...
We have something of a mixed bag coming over from Square Enix HQ today. Two of their mobile games are revelling in life with new events keeping them alive, whilst another has been thrown onto the ever-growing discard pile Square is building. I... | Read more »
Let the world burn as you have some fest...
It is time to leave the world burning once again as you take a much-needed break from that whole “hero” lark and enjoy some celebrations in Genshin Impact. Version 5.4, Moonlight Amidst Dreams, will see you in Inazuma to attend the Mikawa Flower... | Read more »
Full Moon Over the Abyssal Sea lands on...
Aether Gazer has announced its latest major update, and it is one of the loveliest event names I have ever heard. Full Moon Over the Abyssal Sea is an amazing name, and it comes loaded with two side stories, a new S-grade Modifier, and some fancy... | Read more »
Open your own eatery for all the forest...
Very important question; when you read the title Zoo Restaurant, do you also immediately think of running a restaurant in which you cook Zoo animals as the course? I will just assume yes. Anyway, come June 23rd we will all be able to start up our... | Read more »
Crystal of Atlan opens registration for...
Nuverse was prominently featured in the last month for all the wrong reasons with the USA TikTok debacle, but now it is putting all that behind it and preparing for the Crystal of Atlan beta test. Taking place between February 18th and March 5th,... | Read more »

Price Scanner via MacPrices.net

AT&T is offering a 65% discount on the ne...
AT&T is offering the new iPhone 16e for up to 65% off their monthly finance fee with 36-months of service. No trade-in is required. Discount is applied via monthly bill credits over the 36 month... Read more
Use this code to get a free iPhone 13 at Visi...
For a limited time, use code SWEETDEAL to get a free 128GB iPhone 13 Visible, Verizon’s low-cost wireless cell service, Visible. Deal is valid when you purchase the Visible+ annual plan. Free... Read more
M4 Mac minis on sale for $50-$80 off MSRP at...
B&H Photo has M4 Mac minis in stock and on sale right now for $50 to $80 off Apple’s MSRP, each including free 1-2 day shipping to most US addresses: – M4 Mac mini (16GB/256GB): $549, $50 off... Read more
Buy an iPhone 16 at Boost Mobile and get one...
Boost Mobile, an MVNO using AT&T and T-Mobile’s networks, is offering one year of free Unlimited service with the purchase of any iPhone 16. Purchase the iPhone at standard MSRP, and then choose... Read more
Get an iPhone 15 for only $299 at Boost Mobil...
Boost Mobile, an MVNO using AT&T and T-Mobile’s networks, is offering the 128GB iPhone 15 for $299.99 including service with their Unlimited Premium plan (50GB of premium data, $60/month), or $20... Read more
Unreal Mobile is offering $100 off any new iP...
Unreal Mobile, an MVNO using AT&T and T-Mobile’s networks, is offering a $100 discount on any new iPhone with service. This includes new iPhone 16 models as well as iPhone 15, 14, 13, and SE... Read more
Apple drops prices on clearance iPhone 14 mod...
With today’s introduction of the new iPhone 16e, Apple has discontinued the iPhone 14, 14 Pro, and SE. In response, Apple has dropped prices on unlocked, Certified Refurbished, iPhone 14 models to a... Read more
B&H has 16-inch M4 Max MacBook Pros on sa...
B&H Photo is offering a $360-$410 discount on new 16-inch MacBook Pros with M4 Max CPUs right now. B&H offers free 1-2 day shipping to most US addresses: – 16″ M4 Max MacBook Pro (36GB/1TB/... Read more
Amazon is offering a $100 discount on the M4...
Amazon has the M4 Pro Mac mini discounted $100 off MSRP right now. Shipping is free. Their price is the lowest currently available for this popular mini: – Mac mini M4 Pro (24GB/512GB): $1299, $100... Read more
B&H continues to offer $150-$220 discount...
B&H Photo has 14-inch M4 MacBook Pros on sale for $150-$220 off MSRP. B&H offers free 1-2 day shipping to most US addresses: – 14″ M4 MacBook Pro (16GB/512GB): $1449, $150 off MSRP – 14″ M4... Read more

Jobs Board

All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.