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.
- Setup SSH
- Move files system from the SD card to USB thumb drive
- Setting up the USB drives and Samba
- Mounting the USB drives by UUID
- Formatting the USB drive as ext3
- Updating Raspbian
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.