I would like to use my Raspberry Pi as a file server (NAS/SMB).
Will I be able to attach a SATA/RAID controller?
You can build a NAS using...
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:
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!
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.
Since the chip does not have SATA support. Your only option is to connect a SATA HD enclosure through the USB port.
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.
Raspberry Pi is limited in bandwidth due to the USB ports and Ethernet sharing a single 480mbps USB2 host port.
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.