Random Noise

cat /dev/random >> /dev/dsp

Archive for September 2012

Managing personal media and Custom NAS

with one comment

For over a year I used Buffalo Linkstation Duo Pro with 2x1TB mirrored drives. It served me well, but it was starting to gradually fill up – pictures, videos, taxes/documents, more pictures. And there were other things I wanted to move from my local drives, but still needed them to be accessible on-demand – ISOs – Linux, Windows, IDE installers, Old code etc. And then was wife’s music collection, docs etc.

Judging from above I came up with following requirements:

1. At least 4-6TB space. Future proof for 3-4 years
2. Gigabit Network Capable. I’m done with slooow speed NAS
3. Expandable. Add more space as needed.

There were three options available:
Plan A – Buy new NAS drive(s) – solves the problem for now. Average cost $300
Plan B – Build a new low power PC, install FreeNAS or something similar. Move the old NAS drives to this and add more drives. Around $300-$500
Plan C – Purchase Cloud Storage subscription – varies, from monthly to year plans.

Considering the requirements, clearly my options were limited to Plan B. Plan A and Plan C were pre-baked solutions that did not offer me what I really needed. Plan B meant I needed to spend some time for this project.

Components:

I’m a big fan of Micro Center because I can pickup components as and when I need them. Also, they offer pretty good deals and match NewEgg’s prices – minus the shipping costs. Returning stuff is hastle free as well.

So I started looking for best motherboard to get the job done. Essentially, I was looking for a mordern (but not latest and greatest) mobo that had 6 SATA ports, on board graphics chip and a gigabit ethernet. So, I picked up the cheapest one – Gigabyte GA-78LMT-S2P for $43 after MIR, Sempron 145 – 45W, Diablotek EVO Mid Tower ATX case, a 500W power supply and 2x1TB drives.

After spending sometime with the board, I realized that there is a known issue with the GA-78LMT-S2P – it fails to recognize the drives when switched to AHCI mode!! So back I returned it and got the next in line Asrock 880GM-LE FX. This one cost me $10 more, but has a better graphics chip (HD 4250). Not that I would need it. I installed the CPU and spare 4GB ram that I had. Sempron’s can be unlocked to a dual core CPUs, this one didn’t. But that was OK since I needed less power hungry machine. Then I plugged in four drives (500GB, 750GB, 2x1TB new drives)

Software:

I Initially installed FreeNAS on a 8GB flash drive. Now, all my drives were ntfs and soon enough I ran into issues. Drives were failing to mount since they had errors – threre is no way to fix them on linux. These needed to be fixed by connecting them to a windows machine and running CHDISK /force. I took a step back(read below), and thought that if all my drives are ntfs why not run windows instead? More over Windows 8 has this new feature so that you can run it off a usb drive!

New requirement:

At least 32GB is needed for Windows-To-Go. Which meant I need to buy a 32GB flash drive. So I did – Sandisk Glide 32 GB. Installing windows 8 on the flash drive is real pain. With help of GImageX you can copy the install.wim image on to the flash drive. The copy took around 90 minutes!! Argh! Booting from the flash drive and initial setup took around 30 minutes more! Also, using windows-to-go is really really really slow. I cannot stress it enough. Partly the issue was the Sandisk Glide drive but I think more due to how windows worked. It kept hammering the flash drive. I read that USB 3.0 will improve the speed a little and in any case my 880GM-LE FX board didn’t have it. Finally I gave in.

So where was I? I have to convert all my drives to etx3/4 and move around few TB of data. Before I returned the 32GB flash drive, I CHDISK’d all my drives so at least they would mount on FreeNAS PartedMagic. Then I connected the new drives, formatted them to ext4 and copied over the data to new drives, formatted the nas drives to ext4 and copy back the data from new drives. Same for the old 500GB and 750GB – rinse repeat.

FreeNAS vs OpenMediaVault:

In short, OpenMediaVault is what you want. Stable, functional and actively developed.
Returned the dreadfully slow Sandisk Glide and installed OpenMediaValut on 8GB Kingston G3 drive.
Configured the shares and ftp. For detailed setup please read this blog

Performance:

The last but not the least goal was to have gigabit copy speeds. I set the 9K MTU on the interface using the web interface and I was all set. I get around 80Mb/s copy speeds which I’m pretty satisfied.

Expandability:

I ended up removing the 500GB drive and moving all the important documents to it. I will pair that with another 500GB in a Raid 0 configuration. With 5 drives, I now have almost 4.75 TB of space. With 5 more drive slots to go  – it can continue to expand as needed.

As an engineers we are always on a quest to solve problems and in the process we sometimes over-engineer things. I think this to be true in this case. However, the new NAS would be good for another 3-4 years.

Advertisements

Written by Vivek Unune

September 4, 2012 at 6:12 pm

Posted in linux, NAS