DIY Iphone friendly NAS server with custom built wooden box

I recently finished building a NAS box to suit my media storage needs. Especially photos taken by my SLR and our iphones.  Our backup had been mostly adhoc: Using an external USB disk to store data. While the disk is great and portable, I ran into some issues with the simple external storage.

  • Anytime i needed something from the disk it had to be physically connected to a laptop.
  • Accessing the data from the iphone was very cumbersome.
  • Storing our iphone photos to the disk meant hooking up the iphone and the usb disk to a laptop and transferring data
  • The USB disk could potentially crash and lose all the precious data

Initially i looked at store based NAS solutions. Something that had built in redundancy (like Raid-1). I looked at both Iomega and Buffalo products. These were affordable and allowed you to plug in your own hard disks. But the more i read about them, it seemed like they had lots of issues. And neither had a good solution for syncing photos with the iphones.

I had a dual-atom intel motherboard, a 1TB hard-disk ,a pico-psu power supply and an OEM copy of windows7 professional edition 64-bit lying around. This pushed me to make my own NAS box. The requirements were.

  • Should be quiet. Very important
  • Should be scalable to at-least 4 hard disks
  • Have redundancy so that if one harddisk crashes, other should be re-usable.
  • Run without much supervision for most of the time
  • Periodically back up my google drive to the local hard-disk
  • I should be able to transfer my photos from my iphone directly to the NAS-box
  • Box should be off most of the time, only to be woken up when needed
  • Should be able to act as an itunes server to stream movies to my apple-TV
  • Should be able to access the media on the NAS-Box (photos, music, movies etc) from the iphone/ipad
  • I should not have to jailbreak my iphone or my apple TV for the features needed.

I initially looked into ‘FREENAS’ to see if i could use it instead of  Windows-7. However FREENAS had no support specifically for the iphone sync and the itunes streaming. So i stuck with the Windows-7 solution.

Here’s what i used

  • Hardware
  1. An older mini-ITX Dual Atom intel motherboard (D945GCLF2)
  2. 1.5TB seagate barracuda harddisk for sharing
  3. 2TB seagate barracuda harddisk for backup
  4. PICO-PSU 120watt powersupply with power brick
  5. Sarbent PCI-RAID card
  6. Wireless logitech keyboard, mouse
  7. A 500GB 2.5″ disk for the Windows-7.
  • Software
  1. Windows-7 Professional 64-bit
  2. SyncToy windows app for syncing
  3. PhotoSync companion for windows
  4. itunes software
  • Iphone/Ipad Apps
  1. PhotoSync app for sending photos to NAS-Box
  2. RemoteFiles app for accessing NAS-Box media
  3. mWOL app to wakeup the NAS-Box

So lets start with the hardware. A while ago i purchased a dual atom intel motherboard in a mini-itx formfactor. It was an impulse buy. I also bought a pico-psu to go along with the motherboard. The pico-psu really kept down the power supply footprint. The motherboard had only 2 SATA ports and did not support RAID. It had 1PCI port. So i bought a PCI-SATA board to hook up the additional Sata disks. The Windows 7 was installed on a separate 500gb laptop drive that connected to the motherboard SATA port. The backup harddisks were connected to the PCI-SATA board.

20130826-184332.jpg

Here’s how the system looked before i decided to make a custom wooden case for it.

20130826-184354.jpg

The case was made with pine wood from home-depot as the frame. I used pocket -screw system to build it. Dimensions were 9″x9″x9″ cube. Because i was using wood, the case would be bigger than if it were made of metal. But i wanted something that would blend in with my home entertainment system.

20130826-184406.jpg

The front and base panel added. The panels were 5mm thick luan plywood sheets again from home depot. There spray painted to be walnut mocha color. The base plate shown is going to hold the motherboard

20130826-184419.jpg

The case now populated with the ITX motherboard. I added a 120mm fan on vibration dampers to circulate air. Since wood is a poor conductor of heat, there could be a heat issue during the running time. The hard disks are mounted at the top. The 500gb laptop disk is mounted next to the motherboard. Since i had a mill i cut custom aluminum brackets to hold the drives.

20130826-184436.jpg

Here’s the 120mm fan before being mounted to the case.

20130826-184454.jpg

The backside of the case with the motherboard. To the left are the power socket and the power switch.

20130826-184514.jpg

The finished case with the panels screwed in. The panels are flush to each other as i used a laminate trimmer with flush bit to route the edges flush.

20130826-184523.jpg

The 2 tiny holes at the right are for the power and HDD led lights. The square hole is for the USB connector.

The mocha walnut color blended in well with the existing furniture.

Now for the software part. Initially i wanted to use RAID-1 for the data redundancy. However i read online that having hardware raid has its pros and cons. The pros being that it is fast and that the OS has no clue about the RAID details. The hardware handles the copying of the data simultaneously to the 2 disks. The con was that if the controller failed, the drives are useless as OS has no idea how the data was organized. So some chose software RAID. Windows-7 professional allowed disks to be configured into RAID systems. The advantage here being that you do not need a specialized RAID card to handle the disks. The OS would handle this. Also if the controller failed, just add a new one. Since the OS handled the RAID, we would be okay. The downside here being that configuring the windows-7 RAID is not easy. It was confusing to say the least. Also in case of disk failure, re-imaging the RAID disk to a new disk is painful. I gave it a dry run and the re-imaging took almost a day.

Moreover i figured RAID is useful only if you have mission critical data where any downtime is unacceptable. In my case all i wanted was that my data was safe in an another disk just in case one died. I did not need an exact replica of data in both disks right down to the sectors. So i dropped using RAID. I still had redundancy. But not RAID.

So my system has 3 disks.

  1. A 500GB 2.5″ disk where the OS and all the windows programs are loaded into. I back up this disk to a thumb drive using clonezilla. Just in case the OS disk fails.
  2. A 1.5TB disk that is my storage disk. This disk is shared under windows-7. So all my devices in my home-network can see this disk. It can be mapped as a network drive. Of-course you must provide the login credentials to the machine.
  3. A 2TB hard disk that is my backup disk. This disk is NOT shared on my network. It is unreachable on the network. This serves as my backup disk just in case the shared disk fails.

How is data synced between the shared disk and backup disk ?

My Nas-Box basically operates in SLEEP and NON-SLEEP modes. The PC sleep timers are set to 30mins. The NAS box goes to sleep in 30mins of inactivity. I also enabled the motherboard’s WAKE-ON-LAN feature where the PC can be woken up by an ethernet packet. I also enable the wakeup-timers in the power menu. This enables the Nas-Box to turn ON at specified time as described in the windows scheduler.

I use the windows task scheduler to setup a wakeup task everyday at 3am.  I also use ‘windows synctoy‘ to setup rules for copying data from google-drive to backup drive and data from shared-drive to backup-drive. So everyday at 3am (I never usually am awake at this time), the Nas-Box wakes-up, runs the synctoy with rules that updates the backup drive from the shared-drive. It also copies the updates from the google-drive to the backup-drive. With the current setting i have a 24hr window during which new data can exist in the shared drive but not in the backup-drive, creating a hazard window. In the future i plan to wakeup the Nas-Box 3 times/day instead of just once to reduce this hazard window

synctoy

The ‘echo’ configuration was used to update all contents of E drive (shared drive) to D drive (backup drive)

How can all devices access the shared-drive ?

Since the Nas-Box is OFF most of the time, it needs to be ‘woken-up’ when needed. For the PC’s, i installed the ‘WOL Magic Packet Sender‘. This program sends the magic-packet to to wakeup the Nas-Box.

wol_packet_sender

Host-name is the IP address of the NAS-BOX. It is preferable to setup a static IP address for the nas-box.
MAC address field has the mac address of the ethernet port of the NAS-BOX.

For the Iphone/Ipad app, i use the Mocha-Wol app.

Since the shared-drive is ‘shared’ in windows, it can be accessed by any windows/Linux system on my home network. I am currently not interested in accessing this data from the internet. As for the Iphone and Ipad, i use the ‘remote file browser pro‘ app to access data. This is a paid app. But it opens most media. Pictures, songs and movies. Accessing your shared drive with this app is as easy as it gets.

How to send photos to the NAS-BOX from my Iphone or Ipad ?

My wife and I use our iphones to take a lot of photos.  Taking photos is great. Archiving them is painful. While the photostream is helpful here, it is always better to have a local storage for your photos and videos.

Transferring photos/videos from iphone to a PC is not that hard. There are lot of apps that do that. However most of these apps also require you to manually open a web-browser on the PC side and retrieve the photos from the idevice. I was looking for a solution where i should be able to ‘push’ the photos/videos from the iphone to the PC without having to access the PC. I found the ‘Photo-sync‘ app to be the best app. This app can do a lot. Transferring photos between idevices, from cloud services, from WIFI SD cards. But my favorite was its ability to send the photos from my iphone to my Nas-Box. To achieve this you have to install the app on your iphone and also a companion app on the Nas-Box. The companion app is a windows service that runs always. So when i need to transfer my photos from say my ipad to the Nas-Box, i do

  1. Use the Mocha-Wol app to wakeup the sleeping Nas-Box.
  2. Use the photo-sync app to select the photos i want to send over.
  3. The photo-sync app lists the machines it knows which can receive these photos. In my case, my nas-box is the only one. I select that.
  4. The photos are transferred with the folder name being the name of the ‘idevice’.

So finally i had a good working NAS BOX that did the basic job of backup, but also provided me with other features specific for my smartphone and smartphone centric media. So if you have a NAS requirement like mine, you might not find a store solution that fits your needs or if you, it might cost a lot. But if you are willing to do some DIY, you can make a great NAS machine that fits your needs fully.

Advertisements
About

I am a computer engineer living in the beautiful city of Austin,TX. While my day job is designing computer chips, I love to dabble in woodworking, metalworking, r/c and electronics.

Tagged with: , , , , , , , ,
Posted in Electronics
2 comments on “DIY Iphone friendly NAS server with custom built wooden box
  1. Frank says:

    This sounds like a pretty good plan. How has it been working since you wrote this blog post? Any problems, changes, or different programs being used now? I like the idea of running the machine like you have planned, and then backing it up with an Amazon Cloud program to push it to the cloud for double redundancy. Thanks for sharing!

    • rkovvur says:

      Well my machine is still going strong. It comes ON every morning at 3am and goes to sleep once the sync is done. I even host my Itunes videos from this machine for playing on my Apple TV.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Archives
Categories
%d bloggers like this: