Category Archives: Miscellaneous

Just random stuff

Building a NAS (for photos and more) Part III

View Part I here and Part II here.

Step 5. Setting it all up

I started by building the PC with a boot drive installed. I left the data drives out until I was ready for them. cable
Ubuntu Server 12.10 is fairly easy to install, most of the defaults are fine for the initial setup. I had to put a video card and keyboard on the machine so I could do the setup. They only thing you really need to do is assign the server an IP address on your network (dhcp is the default out of the box).

Motherboard

After setting up the server, I updated all of the packages, and installed webmin Webmin gives you an easy way to remotely administer your server through a browser. You should also install a tool like Putty on your client pc, so you can use ssh to get a terminal window on the server.

Step 6. ZFS
To protect against a drive failing, most NAS boxes use some form of RAID. Raid-5 allows your system to keep running if a single drive fails. There are other levels of raid that provide varying levels of performance and redundancy. While my motherboard supported INTEL Rapid Storage at the Bios level, after a lot of research I decided to use ZFS on linux and RaidZ. ZFS offers excellent data integrity features, and some great features like compression, de-duping and snapshots. I wound up not using the de-duping or compression features, since my files were not going to compress well, and de-duping is a great feature for a business scenario where different users may have duplicate copies of documents in their network folders, it can drastically increase memory usage. Snapshots are a great feature that can help restore files that have been deleted or changed.

Plex – The ultimate in media sharing
Plex is a free media server available on multiple platforms. The slick web interface has improved with each recent release. There are clients for iOS, OS X, Windows and Android (including Google TV). You can even share media across the internet with friends and family. We have an old iPad, a Vizio Co-Star Google TV box, Macbook Air, Windows PC’s and multiple Android phones and tablets. Plex has been running great in all cases. The Android app in particular has improved immensely in the last few months. The main issues to be aware of with Plex related to video. If the device you are trying to stream video to does not support the format the video is encoded with, Plex can attempt to re-encode it on the fly. This will require some decent horsepower on your server (see here). In my case, the older Quad Core Intel CPU in my server has worked very for my setup where only one stream is being encoded at a time. If you are a huge fan of iTunes, you should also be aware that because of the way Plex deals with the Apple software, only Windows or Mac servers can support iTunes as a client.

To Sum Up
The combination of Ubuntu Server, ZFS and Plex offer an amazing platform for Network Storage and home Media serving. The only cost involved is your own time and the hardware. The key is to decide what you want to do before you start building. If you just want to share files on a network, a low power PC, some good hard drives and a fast network (gigabit ethernet on the server, router, and main clients) is the way to go. If you are just sharing music and videos (with out the need to re-encode them on the fly), a used laptop, or Mac Mini with a large external hard drive can be a low cost option. Building your own server, installing and configuring some form of Linux and setting up a Raid file system is not for everyone. If you do decide to take the plunge, take your time and do the research. If you do take the plunge, it can be a great learning experience and a way to bring out your inner geek 🙂

The Last Word
Regardless of where your files live, having a backup strategy is not optional. I personally keep one hard drive in my house with a recent full backup, and another at my office. Raid based file systems are not a backup strategy. They are designed to keep your files available if a drive fails (depending on the Raid level). Raid will not help you if a voltage spike fries all of the drives in the server, or a fire destroys them. If you value your “digital life” make sure you do real backups… and do them often.

Building a NAS (for photos and more) Part II

Start with Part I if you haven’t read it already.

Step 3. Choosing an operating system (continued)
I use Windows 7 at home, and I would have no problem recommending it as a home server operating system. It has a familiar interface, has good hardware support, and from my experience it is very stable. From the perspective of building a home NAS as cheaply as possible, its not the best choice. Out of my 4 options, it is the only one that is not free. I also wanted to optimize my NAS as a headless system… meaning that it would not be connected to display or keyboard while running. For these reasons, I crossed it off my list.

Motherboard

FreeNAS is an OS based on FreeBSD. It caught my eye and I started doing research on it. It turns out FreeNas is maintained by a company called iXSystems. In many cases you will find references to FreeNas on the Web. The older version of FreeNas is now maintained in a different fork called Nas4Free. FreeNas is currently more focused on storage solutions and less about media serving. This removed it from my list.

Nas4Free was formally called FreeNAS. It has lots of features for media sharing like DLNA support (to an extent). The OS itself is easy to install and run off of a simple USB key drive, which can save you from having a boot drive in your system. If it supports all of the features you need, it can be a very good choice. One thing Nas4Free is missing is support for the Plex applications. If you are going to buy a pre-built NAS+media server, I suggest checking out Plex and looking at the products that support it. Lack of Plex support was really the deal killer for me.

I’ve used Ubuntu Desktop in a VMWare virtual machine previously. As I learned more about what features I wanted in my NAS, it made more and more sense to move to a full blown Linux install. Plex runs on Ubuntu and it also has support for the ZFS file system which I will elaborate on further later on. It’s a little more complex to set up, but in the end, flexibility, enterprise level features, and application support were worth the effort for me. Ubuntu Server FTW!

Step 4. Hardware decisions

cable

I already had a good Motherboard, a quad core Intel Q9450 processor, 4GB of ram, a power supply and a case. I did buy an Intel Celeron-L 440 processor for $8 on eBay thinking it would save a little power. I also invested in a Kill-A-Watt meter which can give you real time and average power consumption. My hope was to get power consumption under 100watts. NAS systems built on Intel Atom motherboards can get down under 30 watts, but for a system that does more than just serving files, you probably need some more horsepower. The main feature your motherboard needs is the right number of SATA ports. My board has 8, which is great for future expansion if I need it. I would probably want a least 4 if I were buying a new or used board.
The other big choice to make is which hard drive to buy. Western Digital has done a great job of creating a line of drives for the NAS market… WD Red. It seems counter-intuitive at first, but a desktop drive that spins down and parks the heads when not being accessed doesn’t really work well in a NAS. Sleeping drives cause delays when you access your NAS, and there is also the “TLER issue” which causes havoc with Raid Arrays. The Red drives also have very good power consumption numbers. A good review if the Red drives can be found here. I picked up 3 2TB drives from B&H… who had the best price at the time.
I also wanted to mention power supplies. A PC Based NAS without a Video Card will use between 80 and 150 watts depending on how you configure it, and how many drives you need. Power supplies usually operate at peak efficiency at about 50% load. So a 300 Watt power supply is probably a good choice… and an 80 Plus certified supply will help keep the power usage down. Consistent voltages and clean power are important to systems that are running 24/7, so don’t skimp on the power supply!

Continue on to Part III

Building a NAS (for photos and more) Part I

Motherboard

I’m a tech-y sort of guy. I work as an application developer and I have been building my home PCs for years. I recently upgraded my main computer, and I had a bunch of spare parts from the old build. With a growing archive of photos pushing 50,000 raw images, a digital archive of home movies, and 400 albums worth of ripped music from our CD collection, disk space and backups are always a concern. I’d been thinking about network attached storage for a while, but the prices are intimidating. As an example, a 5-Bay Drobo Nas without any drives installed, costs over $500. There are cheaper alternatives, but reviews are mixed. I was also worried that if something broke out of warranty, getting it fixed was going to be a headache.

I decided to take the plunge and build my own NAS/Media Server. The information that follows is more of a dump of my thought process and experiences rather than a “How To” lesson. Hardware gets dated, software gets updated and prices fluctuate.

Build or Buy?
You should buy a pre-built NAS if :

  • You want something that works out of the box with little or no setup
  • You don’t enjoy tinkering with computer parts
  • You don’t know what a command prompt is, and you don’t want to know
  • You trust that the manufacturer you pick will support your hardware, and are willing to replace the whole NAS if you have a hardware failure if the warranty is up. I’m not talking about a bad hard drive… I’m talking about the NAS itself.

You should build your own NAS if :

  • You are willing (and probably like) to tinker with hardware
  • You like the idea of having a new project to work on in your spare time
  • You want to save money, and have something tailored to your needs
  • You enjoy learning about stuff and are ready to do some research

cable

If you decide to build your own system, you need to make a few decisions. Again, I’ve included my own thoughts and opinions

Step 1. How much storage do you need?
The first question to ask is how much storage do you need. My PC has 1.5 Terabytes of storage set up in raid-0 for speed. It has been very reliable and fast. I was down to about 15% free storage space and I was going to have to buy 2 or 3 bigger drives soon. I was flip flopping between 4 and 6 Terabytes of storage. Based on my current usage, I decided 4TB would be enough to last me 4 or 5 years. To protect against a single drive failing, I wanted to use Raid-5, which requires a minimum of 3 equally sized drives. To get 4TB of space with a Raid-5 setup I needed 3 2TB drives.

Step 2. What are you going to do with your data?
Life would be a lot simpler if I just wanted to build a storage only box, without any bells or whistles. I already had an old laptop with an external usb drive acting as an iTunes music server. I also wanted the ability to watch my home video collection on my TV and potentially other devices. The decisions you make here will influnece your decision in step 3. If you are just looking for shared, always on storage, and don’t have the need for raid, the cheapest setup is to buy a used laptop (or a Mac mini) with a large external hard drive.

Step 3. Choosing an operating system
This was probably the most difficult decision. I wanted to check out a few options before I went ahead with the full build. I highly recommend VMWare Player as a way to evaluate operating systems and testing configurations. Here are the OS’s I investigated :

Continue on to Part II

Panasonic GF1 and Optech Pro Loop Connectors

I’m a big fan of OpTech Straps. I had ordered a OpTech Classic Pro Loop Strap for my GF1 the other day. I wanted to use the strap from my D200 in the mean time. When I tried to attach the Pro Loop connectors, I was sadly frustrated by the tiny lugs on the GF1. I took a little bit of my hacker instinct, and decided to cut the leather attachment threading to open the loops up and attach them in a “permanent” way. The results are great and seem very secure. See more info below.

– Sean




Close Up of the leather that gets un-stitched

I used an x-acto knife to cut the threads in the leather shown here. The threads are in a box pattern with an “X” inside. The loops are already open, and don’t need to be cut once the stitching is removed. Next, i put the open loop through the GF1 Lugs, positioned the leather back on them so the strap would hang with the buckles facing in. Next, I put a few stitches in to hold everything in place so I could stich it back up without things moving around. Make sure your new stitches go through both parts of the loop – I positioned the loop ends carefully so that they were under the original needle holes. Then finish up the stitching, and repeat on the other connector.




Full Strap from my D200 now attached

I’m very happy with the results. The only downside is that the loop connectors would need to be cut off to take them off the GF1. I’ve never removed the connectors from my D200 until I did this mod…. so not a big deal for me.




The loop connectors attached together in “Hand Strap” configuration

In this photo, you can see the 2 loop adapters connected to each other, with the padded portion of the strap removed. This creates a nice hand strap when the full strap is not needed. The Optech snap in connectors are very secure and have never accidentally disconnected on my D200.

Let me know if you have any questions by leaving a comment.