Thursday, July 4, 2013

Raspberry PI NAS

I have been excited about playing around with a Raspberry PI and I had some free time so I purchased a unit. I bought a Raspberry PI model B along with some accessories from Adafruit Industries. Adafruit tests the accessories with the Raspberry PI so it eliminates the hunting for compatible accessories.

My intent for the NAS was to create a low cost / low power device to store a backup of digital pictures. My setup is:
Raspberry PI NAS

There are many websites that already exist for setting up a Raspberry PI NAS so I will not duplicate the steps here; however, these are some very helpful links.
After combing through all of the information out on the web I first formatted the two USB drives as NTFS. This was so the drives could be easily plugged into a Windows (or Mac) should the Raspberry PI fail. After some initial tests I was not thrilled with the throughput writing to the USB drive. I did notice that the ntfs-3g driver was CPU intensive (~40%). After reformatting the USB drive as ext3 I reran the test at 900 MHz and was pleasantly surprised at the write time performance increase.

RPI w/ NTFS @ 900 MHz - 2.35 MB/s (18.8 Mb/s)
RPI w/ NTFS @ 900 MHz - 2.63 MB/s (21.04 Mb/s)
RPI w/ ext3    @ 900 MHz - 6.26 MB/s (50.08 Mb/s)

Due to the limitations of the USB bus on the Raspberry PI you will not see anything near the theoritical maximum throughput but I was more than happy to achieve 6.26 MB/s (50.08 Mb/s) throughput writing to the USB drive.

A cronjob can be used to rsync the contents of the first USB drive to the second drive (instructions in Setting up the USB drives and Samba). The second frive provides some added reliability for the data storage. You could also use a third USB drive and manually mount it, rsync, un0mount and store the drive in off-site or on-site fire / water safe storage.

To move the files from a Windows machine to the RPI NAS rsync for Windows can be used. Mac has rsync packaged with OSX which will make easier to copy data to the PI without the need for a third party application. 

As always YMMV but for a small, low cost, low power consumption NAS the Raspberry PI with two USB drives suits my backup needs.


  1. Thank you for the post! Do you think you would be able to have a second off site Pi-NAS that you could rsync to via the internet? Have you found ways to do this?

  2. Having a knowledge about anything is an important and to do this, you are required with its information tools. To deal with a concept of information internet is considered to be the best source. Working with an internet demands speed, which is checked by a Speed Test, a test used to check the speed of an internet.

  3. Great article. It helps to explain complicated things to people who are not competent and explicate why this is important.
    electronic data room

  4. NAS remains for Network Attached Storage and these kinds of capacity frameworks have turned out to be increasingly famous as answers for the consistently expanding requests for more hard drive limit. how to choose NAS Device for Plex

  5. As a computer data storage that links to a computer network, a cheap NAS becomes a necessity for homeowners who require large data storage device and business owners who are in need of a network for file sharing.hard drive recovery

  6. This is on account of there are a few distinct sorts of web hosting. Each compose has its very own preferences and inconveniences. managed server hosting service

  7. So you need to stream recordings, music and different documents out to alternate PCs on your home system however you're not exactly beyond any doubt how you need to go about it. hard drive recovery