Thursday, December 30, 2010

An in depth look at running FreeNAS on an Acer EasyStore H340 - Part 3/3 - Speed Tests & Final Thoughts

Now that I have a browsable network resource, it was time to start copying some files.

Ran into problems

At this point I am excited that things were working.  I immediately started copying files to see what kinds of speeds I'd get.  I was pleased when I was able to upload 93 Mbps!  Then I realized I was only connecting at 10/100.  I broke out my gigabit switch and started the bandwidth tests all over.  This time I was having some serious issues.

I am using a Shuttle SN25P PC with an onboard nVidia NIC.  Since I've owned this thing, I have never been able to get gigabit to work properly.  To make a long story short, I finally got gigabit working properly (see my posting under TIPS).

Whenever I tried transferring over gigabit on the NAS, the transfer would immediately halt and the NIC went down.  The only way to get back online was to set the IP address locally through the console setup screen.

I rememebered reading about FreeNAS not having driver support for the Marvel NIC provided in the H340, but that was on older version of FreeNAS.  My version had the driver provided.  I started to think it was related to Samba and read many forums about configuring Samba for FreeNAS and in general.  I tried various configurations but did not come to a resolution.  I then tested my connection with the FTP service - same problem.  Thinking it was some sort of Windows to Unix issue, I fired up Ubuntu and had the same problem with both Samba and FTP.  On 10/100 the connection was fine, at 93 Mbps I was not complaining.  But I wanted gigabit speeds!

After getting frustrated with the situation, I broke down and bought a PCI-Express network card.  I picked up the Intel EXPI9301CTBLK gigabit card for $34 from newegg.  It had phenomenal reviews so I jumped on it.  I could not find any documentation anywhere about driver support with FreeNAS so I took a chance.

When I received the card, I connected it, booted up, configured the interface, and immediately began bandwidth testing.  The connection was not dropping off, but the speeds left a lot to be desired.  I was receiving about 40-45 Mbps.  What a joke!  I tinkered with the Samba configuration changing the buffers and AIO but could not find a perfect combination.  Then I thought about the connection issues I had with my nVidia NIC in my desktop.  When I was having issues, I had changed it to 100 Full Duplex instead of auto negotiate.  I was only connecting at 100Mbps!  I changed the setting and tested again.  This time, I was getting 100-200 Mbps.  Big improvement, but not a consistent speed and not as fast as I would have liked.  I changed some of the Samba settings and ultimately ended up using the defaults.  I had read a lot of posts about configuring Samba, how you have to tweak your buffers and AIO and disable Send File in order to get decent speeds.  With the default settings, I was able to upload a file from my desktop my H340 at 340Mbps on average!  At these speeds, I am totally pleased.

Speed Test Results

Once I had FreeNAS running and had a stable network connection, I wanted to perform some speed tests to see what kinds of speed I had.

I put together a collection of files to test the transfer speeds of various file sizes.  The file sizes are: 10MB, 20MB, 50MB, 75MB, 100MB, 200MB, 500MB, 750MB, and 1GB.

Have you heard of TeraCopy?  It is a really cool app that replaces the incorporated copy functionality in Windows.  I used the command line feature of TeraCopy to transfer the files from my server to PC and vice versa while monitoring the FreeNAS graph on the web interface and Netstat Live by AnalogX on my machine to get real-time results.  Since I was using command lines to perform the copies, I threw it all into a batch file and included echoes for times before and after the copy to get the times of the copy.

I only used Netstat Live and the FreeNAS graph to obtain speed results because I am not aware of an app that will copy a file (or files) for you and give you statistics on the transfer.  If you know of something, please let me know!  Otherwise, I'll probably have to write something myself.

Server to PC - DownloadingMax recorded throughput - 462 Mbps

Average speeds per file based upon Netstat Live

10MB - 84.0 Mbps   (0.9 sec)
20MB - 124.8 Mbps   (1.14 sec)
50MB - 215.1 Mbps   (2.31 sec)
75MB - 213 Mbps   (3.58 sec)
100MB - 206 Mbps   (4.55 sec)
200MB - 229 Mbps   (8.45 sec)
500MB - 220 Mbps   (20.47 sec)
750MB - 218 Mbps   (30.3 sec)
1GB - 215 Mbps   (31.22 sec)

Screenshot of FreeNAS graph depicting uploading speeds

PC to Server - Uploading
Max recorded throughput - 354 Mbps

Average speeds per file based upon Netstat Live

10MB - 81.4 Mbps  (0.66 sec)
20MB - 162.5 Mbps  (0.89 sec)
50MB - 304.1 Mbps  (2.44 sec)
75MB - 328.9 Mbps  (2.16 sec)
100MB - 320 Mbps  (2.6 sec)
200MB - 314 Mbps  (4.93 sec)
500MB - 324 Mbps  (11.79 sec)
750MB - 318 Mbps  (17.74 sec)
1GB - 315 Mbps  (24.75 sec)

Screenshot of FreeNAS graph depicting uploading speeds

Here is a graph of that shows the time it took (in seconds) to upload (write) and download (read) the files between the H340 and my PC.

The results were great.  I believe the bottleneck in my testing is the old hard drives I used.  I will be using newer/faster drives when this is fully implemented, so I will have to perform additional tests once it is complete.

 Final Thoughts

The Acer H340 was not my first choice when it came to a network storage solution.  In fact, it wasn't even on my list when I realized it did not have a video output and I would be forced to use the provided Windows Home Server.  But curiosity got the best of me and I was fortunate to find other enthusiasts who helped make sway my decision.

I think Acer has a great product for SOHO network storage solutions.  If you are not a savvy IT guy, the H340 still has the built-in Windows Home Server.  I am not a fan but I have a friend who is a die hard user and is always explaining the benefits and trying to convert me.  Now that Microsoft is removing the Drive Extender functionality from WHS, I will be sticking to FreeNAS or other FOSS.

For the price, the H340 is the cheapest out-of-the-box solution for network storage, and adding the cost of FreeNAS makes it that much more appealing.

Overall, I am pleased with FreeNAS and especially pleased that I was able to get it running on my H340.  My next big project may have to be on some kind of backup solution for my H340!  I could purchase another one and use rsync or backula (on FreeNAS) to backup my data, but where's the fun in that!

Part 1  Part 2

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

Tuesday, December 7, 2010

An in depth look at running FreeNAS on an Acer EasyStore H340 - Part 1/3 - Background and Prepartion

Before we begin

I have wanted to build a storage solution for many years, and I finally broke down and bought some hardware.

I had looked at many options for a system including the Drobo, Thecus products, Acer EasyStore, and building my own machine.  My biggest concern was cost.  I wanted to get the most for what I paid.  I originally wanted a Thecus, but changed my mind because of its cost.  I later wanted to get the Acer EasyStore, but changed my mind after finding out that it did not have a video output so the idea of installing an alternate OS was out of the question.  Curiosity got the better of me so I did a little research and learned that you could in fact achieve video out on the Acer.

Why the Acer EasyStore H340?  There are several reasons why I chose this device.  Size.  This box physically occupies less space than my Shuttle PC.  I wanted something that was portable and compact, just like my Shuttle.  Price.  At $309.99 with a 1TB drive, it couldn’t be beat.  If I can sell the drive for around $100 (sounds a little steep but I’ve sold 1TB drives for $110 and higher), I’d get this for about $210.  I could pick up a mini-ITX board with an Intel Atom processor and 4-SATA slots on Newegg for $100 or more, add in a small power supply starting at $50, and find the closest thing to the non-existent mini server cases with hot swap drive bays that you likely have to produce yourself for at least $50, and I’m already at a starting point of $200.  I figured Acer already put this thing together, why should I try and recreate it?

Preparing the H340 for FreeNAS

Out of the box, the Acer H340 does not have video output.  The motherboard does have a PCI Express slot you can use to add a video card, but using this slot for a video card takes away from other options such as an additional SATA controller for more drives.

The enthusiast approach is to utilize the onboard video controller that requires a D-Sub 15 connector attached to it.  I found a site after googling "video on Acer H340" that had a lot of good information.  HappyBison provided a walkthrough on installing FreeNAS on the Acer H340.  My biggest interest was the pinout he provided for connecting a female VGA connector to the motherboard.  He got the info from a forum post on where a few people started investigating a header on the motherboard.  Apparently it wasn't documented what the connection was, so ymboc diligently mapped out the connections to determine what the header was.  It was finally determined that it was a multi-function connection, providing VGA output, PS/2 mouse and keyboard support, and a RS-232 serial connection.

I was only interested in the video output so I followed HappyBison's pinout.  HappyBison also provided a few parts that he used to build his cable.  Instead of buying a 15-pin female VGA connector, I used a VGA expansion with ribbon cable from an existing video card.  I picked up the 26-pin housing (DigiKey part 455-1178-ND) and 20 terminators (DigiKey part 455-1313-1-ND).  I technically only needed 13 terminators, but because of their size, and I wasn't going to buy the overpriced crimpers ($485.90, $591.85, $925.65), I wanted to have a little extra just in case.

Once I received my parts, I noticed how terribly small the terminators were.  I couldn't imagine how I was going to terminate these things.  Since my VGA expansion ribbon already had terminators on it, I tested to see if they would fit into the 26-pin housing.  And they did!  That was a huge step avoided.

After I matched the pins on my ribbon cable to the associated pins for the H340 header, I connected my adapter and fired up the H340.  I had video!  The next thing I needed was input via a keyboard.  I did not opt in for the PS/2 connection on the header, so I had to use a USB keyboard.

When I connected the keyboard and turned on the H340, I could not input anything on the keyboard.  I remembered reading something about that in the 13 page forum post over at the site.  I went back to the site and scoured the pages until I got to page 9.  It was identified that input via USB or PS/2 keyboard required the "debug" jumper to be on.

After jumping the connection and powered up, I now had keyboard access.  Since I now had a video output and keyboard input, it was time to get my OS loaded.

Part 2   Part 3

Sunday, December 5, 2010

Solved - Shuttle SN25P Gigabit NIC Issue

Ever since I bought my Shuttle SN25P computer years ago, I have not been successful with gigabit in Windows. Apparently nVidia has (or had) poor driver support in regards to it's nForce chipset.

Whenever I would attempt to utilize my gigabit connection to its full potential, I would immediately get notified by Windows that my network cable was unplugged. It would then reinitialize, and go out. This was identified as suspend/resume.

If I would switch to 10/100, I would have no problems. As soon as I connect a 1GBPS, any heavy network traffic would cause my NIC to flatline.

Last night I started researching this again, to see if maybe there were any breakthroughs or new drivers. I did find a driver from 2008. After updating the driver for the NVIDIA Network Bus Enumerator then NVIDIA nForce 10/100/1000 Mbps Ethernet, my gigabit connection was still having problems. I had remember reading to disable Checksum Offload through device manager. Upon doing so, I attempted to upload to my FreeNAS machine.

This was it! I had 0 problems and I was able to sustain 340 Mbps uploading with my NIC!

SO, if you have a Shuttle SN25P (or any other nForce chipset/NIC), try updating your drivers and disabling Checksum Offload. Maybe it'll bring you to the 21st century with reliable 1 Gbps speeds.