Tuesday, December 14, 2010

An in depth look at running FreeNAS on an Acer EasyStore H340 - Part 2/3 - Installing and Configuring

Why FreeNAS?  Why not Windows Home Server?  I decided to use FreeNAS over WHS because I wanted something that was extremely light weight and did not have to be installed on any of my 4 storage drives.  FreeNAS is versatile in the sense that I can install it on a thumb drive, configure, backup the config, load FreeNAS onto another thumb drive, restore my saved config and I'm back online.  In the event that my host "drive" fails, I'll have my config backed up so I can easily load FreeNAS onto another usb media device, boot up, load my config and I am in business.  If I were using WHS loaded onto one of my storage drives, if that drive failed, I'd lose my OS as well as any data that is not redundant or backed up.

Plus I am a fan of open source operating systems and applications so this won the medal.

In order to get your Acer EasyStore H340 to boot up to removable media, you have to go into the BIOS (F2) and change the first boot device to your USB HDD that you have connected.

Installing FreeNAS on H340

With FreeNAS, you have several ways to install the OS.  You can boot to a LiveCD, use the LiveCD to install it on a hard drive or removable media, or write an image to removable media from another computer.

In my case, I did not want the OS to live on one of my storage drives, even if it's only 70+/- MB.  I chose to use writing an image to removable media.  I wanted something streamlined, not a thumb drive sticking out of the front or back of my case.  I looked into microSD cards and spent a little time trying to find a reader that would do the trick.  You know those USB Bluetooth adapters that barely stick out of your USB port?  Well, I found a microSD card reader that is the same size.  I also stumbled upon the smallest flash drive by Buffalo.  It's practically the same thing.  You could stuff a 16GB microSD card into the reader I bought and call it the same.  It'd be a bit cheaper, $3.72 for the reader and about $27 for a 16GB microSD card on Amazon compared to $140 for the Buffalo.  Plus the reader is black with a blue LED which matches the H340 colors.  But I digress...

To get FreeNAS onto my drive, I had to use physdiskwrite.  Once you have downloaded the embedded IMG file, you can drag it overtop of physdiskwrite and choose your drive.  Generally it will be the one with the least amount of sectors.  Be very careful.  Choosing the wrong drive might ruin your weekend.

After it was written, I plugged my drive into the H340 and booted up.

There is another option for running FreeNAS on the H340.  As pointed out in HappyBisons tutorial, the H340 has an onboard 256MB flash memory drive that houses the install/recovery files for the provided Windows Home Server operating system.  Once you have created a bootable thumb drive, you can copy it to the onboard flash memory.  This will overwrite your WHS installation files so be ready to no longer have it.  I did not choose this option in case I plan on selling this in the future to someone with a little less technical knowledge.

Configuring FreeNAS

There are dozens of tutorials for configuring your freshly loaded FreeNAS OS.  I've watched and read a lot of them to help get me started.  They're even on YouTube!  Take a few minutes to look up some of them.

Without turning this into a full blown tutorial for configuring FreeNAS, I'll briefly outline my steps in order to get started.

Upon bootup of FreeNAS, you have to assign your network interface (option 1).
After assigning your network interface, you have to configure it for DHCP or assign a static IP (option 2).

Now you are ready to configure.  FreeNAS has a web interface for easy access and configuration.  Browse to the IP you assigned or were given (ie.  Login with the default account: username is user and password is freenas.  BE SURE TO CHANGE YOUR PASSWORD FIRST!

Once you are logged in, you need to initialize your storage media.  Choose Disks / Management.  Click on the + icon to add drives.  Select your drive from the drop down then fill out the other details.  This will vary depending on the type of setup you are creating and the disk drives you are using.  For me, I chose the preformatted file system of Software RAID.  After adding your drives, click Apply.

Now that your drives are recognized by FreeNAS, you can create a software RAID.  Choose Disks / Software RAID.  Choose the RAID level you want to produce.  I chose RAID 5.  Click on the + icon to create a new array.  Enter a name and choose the drives you want to add to the array.  I called my array myRAID5 and chose all 4 of my drives.  I also checked the box for Create and Initialize RAID.  This will start building the array with my disks.  Depending on their sizes, it will take some time to get everything built.  For reference, I built a 4 drive array using 40GB drives.  This took approximately 1 hour.

Next you have to format your array.  Choose Disks / Format.  Choose your array from the drop down and select the type of format you want to use.  I chose UFS.  Enter a volume label and hit Format.  Again, depending on the size of your drives, this may take a little bit.  With the 40GB drives, it took approximately 1 minute.

You have initialized your disks, created an array, formatted it, the next step is to mount the array.  Choose Disks / Mount.  Choose your disk from the drop down, select partition type.  I chose MBR since I have formatted to UFS.  Choose your file system (UFS), and enter a mount point name.  This can be whatever you want.  It is basically what FreeNAS will know your drive as.  I chose homeshare.  I left the defaults for access restriction except for Group.  I set this to guest.  This is only because I was testing my FreeNAS installation.  You do not need to choose this.  Hit Save.

At this point, you have an array ready to be used.  You have to configure a way for your network users to access the storage.  Since I am running Windows, I chose Samba.  This will allow windows workstations to see shares on a unix/linux based workstation.  You could also do FTP, but to make it easy, I chose Samba.  Choose Services / CIFS/SMB.  Check the enable box near the top right.  Initially I left everything at default assuming it would work as planned.  At the bottom, hit Save and Restart.

Once saved, on the same page, hit the Shares tab.  Click the + icon to create a new share.  Enter a name and comment.  To keep things simple, I also used homeshare.  Next, click the ellipsis (...) to browse your filesystem.  Your should immediately be presented with the name you chose when you mounted your array.  Click it, then hit OK.  At the bottom, hit Save.

You now have a browseable share on the network that you can read and write to.  Give it a shot!!

Part 1   Part 3

No comments:

Post a Comment