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

Tokkun Studio unveils alpha trailer for...
We are back on the MMORPG news train, and this time it comes from the sort of international developers Tokkun Studio. They are based in France and Japan, so it counts. Anyway, semantics aside, they have released an alpha trailer for the upcoming... | Read more »
Win a host of exclusive in-game Honor of...
To celebrate its latest Jujutsu Kaisen crossover event, Honor of Kings is offering a bounty of login and achievement rewards kicking off the holiday season early. [Read more] | Read more »
Miraibo GO comes out swinging hard as it...
Having just launched what feels like yesterday, Dreamcube Studio is wasting no time adding events to their open-world survival Miraibo GO. Abyssal Souls arrives relatively in time for the spooky season and brings with it horrifying new partners to... | Read more »
Ditch the heavy binders and high price t...
As fun as the real-world equivalent and the very old Game Boy version are, the Pokemon Trading Card games have historically been received poorly on mobile. It is a very strange and confusing trend, but one that The Pokemon Company is determined to... | Read more »
Peace amongst mobile gamers is now shatt...
Some of the crazy folk tales from gaming have undoubtedly come from the EVE universe. Stories of spying, betrayal, and epic battles have entered history, and now the franchise expands as CCP Games launches EVE Galaxy Conquest, a free-to-play 4x... | Read more »
Lord of Nazarick, the turn-based RPG bas...
Crunchyroll and A PLUS JAPAN have just confirmed that Lord of Nazarick, their turn-based RPG based on the popular OVERLORD anime, is now available for iOS and Android. Starting today at 2PM CET, fans can download the game from Google Play and the... | Read more »
Digital Extremes' recent Devstream...
If you are anything like me you are impatiently waiting for Warframe: 1999 whilst simultaneously cursing the fact Excalibur Prime is permanently Vault locked. To keep us fed during our wait, Digital Extremes hosted a Double Devstream to dish out a... | Read more »
The Frozen Canvas adds a splash of colou...
It is time to grab your gloves and layer up, as Torchlight: Infinite is diving into the frozen tundra in its sixth season. The Frozen Canvas is a colourful new update that brings a stylish flair to the Netherrealm and puts creativity in the... | Read more »
Back When AOL WAS the Internet – The Tou...
In Episode 606 of The TouchArcade Show we kick things off talking about my plans for this weekend, which has resulted in this week’s show being a bit shorter than normal. We also go over some more updates on our Patreon situation, which has been... | Read more »
Creative Assembly's latest mobile p...
The Total War series has been slowly trickling onto mobile, which is a fantastic thing because most, if not all, of them are incredibly great fun. Creative Assembly's latest to get the Feral Interactive treatment into portable form is Total War:... | Read more »

Price Scanner via MacPrices.net

Early Black Friday Deal: Apple’s newly upgrad...
Amazon has Apple 13″ MacBook Airs with M2 CPUs and 16GB of RAM on early Black Friday sale for $200 off MSRP, only $799. Their prices are the lowest currently available for these newly upgraded 13″ M2... Read more
13-inch 8GB M2 MacBook Airs for $749, $250 of...
Best Buy has Apple 13″ MacBook Airs with M2 CPUs and 8GB of RAM in stock and on sale on their online store for $250 off MSRP. Prices start at $749. Their prices are the lowest currently available for... Read more
Amazon is offering an early Black Friday $100...
Amazon is offering early Black Friday discounts on Apple’s new 2024 WiFi iPad minis ranging up to $100 off MSRP, each with free shipping. These are the lowest prices available for new minis anywhere... Read more
Price Drop! Clearance 14-inch M3 MacBook Pros...
Best Buy is offering a $500 discount on clearance 14″ M3 MacBook Pros on their online store this week with prices available starting at only $1099. Prices valid for online orders only, in-store... Read more
Apple AirPods Pro with USB-C on early Black F...
A couple of Apple retailers are offering $70 (28%) discounts on Apple’s AirPods Pro with USB-C (and hearing aid capabilities) this weekend. These are early AirPods Black Friday discounts if you’re... Read more
Price drop! 13-inch M3 MacBook Airs now avail...
With yesterday’s across-the-board MacBook Air upgrade to 16GB of RAM standard, Apple has dropped prices on clearance 13″ 8GB M3 MacBook Airs, Certified Refurbished, to a new low starting at only $829... Read more
Price drop! Apple 15-inch M3 MacBook Airs now...
With yesterday’s release of 15-inch M3 MacBook Airs with 16GB of RAM standard, Apple has dropped prices on clearance Certified Refurbished 15″ 8GB M3 MacBook Airs to a new low starting at only $999.... Read more
Apple has clearance 15-inch M2 MacBook Airs a...
Apple has clearance, Certified Refurbished, 15″ M2 MacBook Airs now available starting at $929 and ranging up to $410 off original MSRP. These are the cheapest 15″ MacBook Airs for sale today at... Read more
Apple drops prices on 13-inch M2 MacBook Airs...
Apple has dropped prices on 13″ M2 MacBook Airs to a new low of only $749 in their Certified Refurbished store. These are the cheapest M2-powered MacBooks for sale at Apple. Apple’s one-year warranty... Read more
Clearance 13-inch M1 MacBook Airs available a...
Apple has clearance 13″ M1 MacBook Airs, Certified Refurbished, now available for $679 for 8-Core CPU/7-Core GPU/256GB models. Apple’s one-year warranty is included, shipping is free, and each... Read more

Jobs Board

Seasonal Cashier - *Apple* Blossom Mall - J...
Seasonal Cashier - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Seasonal Fine Jewelry Commission Associate -...
…Fine Jewelry Commission Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) Read more
Seasonal Operations Associate - *Apple* Blo...
Seasonal Operations Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Read more
Hair Stylist - *Apple* Blossom Mall - JCPen...
Hair Stylist - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Blossom Read more
Cashier - *Apple* Blossom Mall - JCPenney (...
Cashier - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Blossom Mall Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.