Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to use my Raspberry Pi as a file server (NAS/SMB).

Will I be able to attach a SATA/RAID controller?

share|improve this question
You'd be better off mounting a network drive. – Andrew Larsson Jun 18 '12 at 17:26
up vote 29 down vote accepted

You can build a NAS using...

  1. USB Hub
  2. Sata <> USB
  3. SATA Replicator / SATA Hardware Port Multiplier

    • This is how you can chain the multipliers to RAID, RAID'ed RAID's. You can go 4 multipliers deep and choose from a few raid options. At the Start of the Chain where the blue arrow is your combined terabytes of storage, redundant in the way you configured it to be.

    enter image description here

    • This is the standard usage where you can plug 5 hard drives and RAID them in a certain way then connect that as a physical drive in 1 SATA port or USB SATA Interface.

enter image description here

You just have to connect the Blue arrow to a SATA to USB converter. As long as you run at USB 2 speeds through out you can make quite a mean beefy NAS drive using a Pi.

To power the unit there is a standard plug (good old 1.44" Floppy Drive Connector) It is used in all PC's power supplies for accessories now a days. In this picture is a MOLEX converter. It is the smaller connector. The voltages are:

  • YELLOW - 12V
  • RED - 5V

You need to check how many amps it needs. But if you going to power 5X3.5" Hard drives then a 250Watt power supply will be the best option for powering everything, even the Raspberry form the 5V line!

enter image description here

Good luck :)


Specifically useful for Raspberry Pi 2+ and a nice alternative to untrustworthy RAID systems.

Instead of using the RAID function on these boards, configure each drive in JBOD and use ZFS to create volumes. ZFS is very stable and guarantees you wont loose a 'bit' of data before it tells the system its done. Most RAID controllers, like these possibly, usually tell the system the data is written, then flushes data to the drive, which may become corrupt during flush and then absolutly tells nobody, 'dirty' little secrets.. ZFS, firsts writes, verifies and then says everything is OK. Plus, you can always move your drives into a FreeNAS setup and import the volumes easily as if nothing has happened.

Remember though, the bandwidth is limited to USB2 speeds.

A great speed, and fairly well balanced setup is 4 HDD's setup as 2x2 mirrored. It gives you half the capacity with 1 to 2 redundancy. ie 4 x 1TB gives you 2TB total, but wait... ZFS talks to each drive separately, write speeds of 1 drive (~50mb/s) ... read speed of 2 drives (~100mb)!!!!

A blazing fast combination would be mirror 1 X 4. ie 4 x 1TB gives you 1TB BUT, read speeds of up to 200mb/s!!! Write speeds of 1 drive still.

share|improve this answer
I'm interested in this design, but I'm not up on current HD technology - what are those raid controllers? Are they standard PCI sata host adaptors? How are they powered? – Stevo Feb 11 '13 at 20:43
@Stevo Hi- I updated the answer. The actual device might not need much power. But the hard drives will need a good old power supply. So you can just use that to power everything. 250-350 watt PSU are quite cheap. PS - Thanks for following me on twitter. – ppumkin Feb 11 '13 at 23:22
I'm not quite sure I understand how one could achieve "200mb/s"... considering the ethernet port is limited to 100 Mbps. – Nathan Osman Aug 28 '15 at 5:43
Add a Gigibit USB LAN and you can get ~250Mbps out – ppumkin Aug 28 '15 at 6:56

Since the chip does not have SATA support. Your only option is to connect a SATA HD enclosure through the USB port.

share|improve this answer
Considering the cost of those enclosures vs. the cost of the RasPi, it is probably not worth it. – finnw Jun 16 '12 at 12:54
I was wondering whether this could be done via another chip and SPI/I2C/UART communication, but I couldn't find a suitable chip. – Alex Chamberlain Jun 16 '12 at 14:15
Re: cost of enclosures, I am using a 'dock', which is a stand for an internal hard drive. The 'naked' internal drive than goes into a rubber sleeve. Total cost was $35, plus the drive. – cmc Nov 26 '12 at 3:31

If you dare, you can implement PCI-E x1 with six pins: SM_SCL, SM_SDA (go to I2C bus as SMBus signal), PCIE_IRQ (open drain, shared by all cards), PCIE_CLK (Derive into differential signal with external circuitry, shared by all cards), PCIE_Tx (Derive into differential externally, one per channel) and PCIE_Rx (Derive from differential signaling externally, one per channel)

Hardware part us easy, but bit-banging PCI-E protocol can be problematic since not all cards can be slowed down that much.

share|improve this answer

Raspberry Pi is limited in bandwidth due to the USB ports and Ethernet sharing a single 480mbps USB2 host port.




share|improve this answer

To build a custom SATA controller for the GPIO pins would not be a simple job, but may happen, one day. Then the Pi could be used as a NAS.

A NAS device would also be a great solution as the Network port is faster than USB.

share|improve this answer
That's not what the GPIO was designed for - it is designed for a for very low frequency, non-realtime stuff (in general). – Alex Chamberlain Oct 10 '12 at 17:10
You may find some hacking with GPIO and SATA here johandraaisma.nl/raspberryproject – Igor Dec 20 '12 at 1:01
Although... on the Raspberry Pi, the network port is kind of a subdevice through the usb system so its not necessarily faster. – Eshwar Jan 19 '13 at 20:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.