This is an addendum article to my youtube tutorial you may see above. DIY project of creating custom RAID storage using an old HDD enclosure, four SATA 2.5″ HDDs and controller available as an independent PCB easy to adapt for custom solutions.
This project was inspired by my beautiful Macally HDD aluminium enclosure which refused to work one day. The internal IC gone faulty and after several attempts it turned out the repair was impossible due to main chip failure.
Recycling such nice designed piece of hardware would be a waste, so I decided to utilise it somehow. And because I was in need of purchasing some RAID storage, I thought it would be great to construct one by my own.
CONSIDER THIS PROJECT AS A GENERAL GUIDE OR AN IDEA
There is variety of hardware solutions covering various interfaces: eSATA, USB3, network. You can create similar project even using SAS expander but keep in mind an additional controller is required. Consider solution which fits your computer best. As a hackintosh workstation user I have decided to use eSATA interface as my system is equipped with such ports. Note SATA is getting old today but many systems still supports it and you can buy the hardware inexpensive.
Project is directed at any level DIY ethusiasts. Intermediate skills of cutting metal, drilling, tapping threads and soldering are required. Components are widely available on the market. Electrical connections are easy to establish using original parts with some custom modifications.
Depending whether you’re quick or precise: 10÷20 work hours.
PARTS & TOOLS
These are main components we need to put in the box. Enclosure internal space should be large enough to contain four disks and the controller module. Verify it precisely. I’ve compared another enclosures and fitting whole stuff was impossible in some of them!
- Old disk enclosure (Macally G-S350 SUAB here)
- 4x 2,5” SATA HDD (any capacity)
- 1x SATA RAID Controller Lycom ST-158 (or similar)
- 1x 5V DC power supply and matching connector
- 4x SATA data cable angled up (2x 15cm + 2x 20cm)
- 1x eSATA data cable
- 4x SATA power cable
- 1x female x4 goldpin connector (floppy disk drive type)
- 4x female x2 goldpin connector
- 1x ~2A bistable switch
- 2x alu plate 1mm thick 10x20cm
- 2x 5V LEDs (red & green)
- 20x M3 5mm bolts (cone head)
- drill with 2mm / 3mm / 10 mm / 12 mm bits
- philips screwdriver #1 & #2
- small metal saw
- small metal file (flat)
- carpet knife
- wire cutter
- wire stripper
- sandpaper set (80 / 200 / 600)
- silver / any other spray paint
Project required an independent SATA controller on PCB small enough to fit in the enclosure. For that reason Lycom ST-158 5-port RAID controller was selected. It’s based on very popular JMB393 chip. Many RAID solutions from Stardom, Syba, SansDigital utilise this chip.
This is bracketed version of the unit. Fortunately, bracket can be easily detached.
Similar controllers are also provided by other manufacturers (eg. Addonics HPM-XA). You may require variant with straight or angled disk connectors.
Main controller requires 5V DC power supply and you can use pretty anything here with ~2A current efficiency. I used the “Kycon” type connector & power adapter from other old enclosure:
To properly connect all hardware you will need 4x SATA cables, 1x eSATA cable, 1x floppy-disk-like 4pin power connector (goldpin), some additional single wires, 2x 5V LED and any bistable switch. Electrically, all we have to do is provide the power supply for controller and disks, and add on/off switch into the circuit.
Here is the brief scheme of required wiring:
To get suitable eSATA connector you should purchase an eSATA PC bracket, like this:
Use any 2,5″ SATA hard disks you want excluding those of higher thickness (e.g. WD Velociraptors). For optimal array health and performance use drives of same type. You may find some hardware recommendations and storage advices in my ORBITS STORAGE ARCHITECTURE article.
When all parts and tools are get together, you can start work now.
Very first thing is disassembly of the genuine unit. To open Macally enclosure you need to unscrew back plate and slide out internal chassis. We have to get rid of all internal elements: disk drive, the circuit plate and also the power button. All internal space is now available.
II. INTERNAL MODS
As the internal space is very tight, we need to provide possibly most room for internal parts. You may see there are some bottom plate bumps we have to level.
Internal chassis can be disassembled into two basic elements. Use a vice to flatten surfaces of the steel part.
After flattening, bend it slightly to achieve previous, straight form. Re-assembly internal chassis.
III. NEW DISK MOUNTS
Now we need to provide new disk mounts. Base of the new mounts will be an aluminium plates cut to fit the internal space. We should prepare bottom and top plate which held the drives in a “sandwich” layout.
Start with the top one. In this case, form of the plates follows internal structure which allows us to use existing mounting points to screw it into the chassis. Measure desired dimensions and shape of the plate.
Top plate should be prepared with the same manner.
Thin aluminium plate is very cunning material as you can cut it precisely by the knife or scissors. It allows you to form even complicated shapes with no special tools required.
You should always have some in your workshop as it is ideal for creating custom grips, brackets and any other handy stuff for various DIY projects.
IV. CONTROLLER MODULE
Now it’s time to mount the controller module. To attach it we need to prepare two custom spacers. I use old multimeter leads as they have ideal diameter. Cut it to desired length and use corresponding length screws. From the opposite side, module is screwed to the chassis. While marking mounting points, consult providing cable space from all sides.
V. POWER WIRING
To make power supply wiring we need to use four SATA MOLEX power cables and one floppy-like goldpin connector. Cut the molex cables at measured point and solder them serial. Finally I made two separate sets for more flexible connection. Next we need to hack module power connector as it will be incorporated into the circuit with the hard disks.
VI. NEW LED INDICATORS
You always want to know whether your storage is health, I guarantee you. That’s why RAID module has built set of indicator outputs for display an array status and we’re gonna use them.
Although there are connectors for each single disk status, we use only two, for the whole array (it has separate output). Green one for the POWER ON status and red one for the ERROR. I used two 3mm 5V LEDs.
LED wires should be long enough to easy connect them to the board. Indicators will be placed behind the original switch “window” in the front of the case as you will see next.
Use any “milky” PVC package to form the window plate. I used the yoghurt cup bottom here to make 14 mm diameter circle. Cut desired shape with scissors. Glue it carefully to the back of a front plate using small amount of epoxy glue. Stay focused and precise here. It’s very easy to leave glue marks which will be visible from the outside.
Place the LEDs just behind the new window and form it to follow enclosure shapes. I locked it with the mount screw and piece of sticky tape.
VII. BACK PLATE RECAST
As our enclosure will feature totally different set of back connectors, we need to recast the original back plate. First thing is to cover original holes, then cut the new one.
Use thin alu plate to cut the desired shape as a back enforcement. Please note I left one original hole unmodified because power switch fit it almost perfectly. Using epoxy glue mount alu plate to the inner side. Next cut some tiny shapes to fill the holes, then fill them all from the outside.
When the glue is set we have to sand it to achieve sameless plain surface. This step is time consuming, so prepare yourself for long friction movements ;)
This is the eSATA female connector we’re gonna attach to the back plate. Easiest way to get it is to purchase some standard PC eSATA bracket. Cut corresponding hole in the backplate, next drill two holes for mount screws.
As a power source I use solution from some cheapo 3,5″ HDD enclosure, covering 5V/12V DC power supply with Kycon connector and corresponding SMD female port. It requires 12mm diameter hole so there is some drilling work needed.
After the paint work our backplate looks cool and funky.
Assembling our storage unit may be quite tricky so apply yourself a dose of patience. There is very tiny space available. Put all efforts to clean arrange of all elements. Avoid any potential wire crack.
Mount bottom disk plate and connect all cables. Then, connect all SATA cables to the RAID module and attach it firmly. Prepare all wires to/from power switch to be ready for final assembly.
If everything related to bottom plate is connected, repeat the steps while mounting top plate. Completed sandwich set-up uses existing original layout of mounting holes and looks quite factory-like.
Last step is assemble of the back plate. Finish the wires with elegant goldpin connectors or solder them to. Use epoxy glue to fix the power socket and the switch. If required, cut some disturbing eSATA port parts.
When everything is ready, connect the wires, mount the backplate and screw the bolts. Our custom storage unit is almost ready to use.
IX. RAID SETUP & MANAGEMENT
ST-158 is a PnP device so you don’t need extra drivers to use it, but we have to setup it before use. However, when you turn on the unit unconfigured, systems reports there is space of one HDD available.
Now is the best moment to pick suitable RAID level. Chip manufacturer provides some fancy-looking but nifty utility to create and manage arrays. This utility is available for many platforms, which you can review here.
Once array is created, now one can initialise disk in the system utility and create a new logical volume.
RAID LEVEL RECOMMENDATIONS
Module is very easy to setup because there is multi-OS management software available. It allows to create RAID 0 / 1 / 10 / 5 level arrays from up to 5 drives.
I don’t recommend use of RAID5 with this controller due to its poor efficiency in this mode. While RAID 0 / 10 configurations allow almost full saturation of the SATA II bandwidth (~250 MB/s), RAID 5 barely exceeds 120MB/s here. Refer to this topic for an additional reading.
ST-158 has also PM (Port Multiplier) function. Multiplicating it within the “tree” architecture gives you the ability to create really large arrays.
ST-158 is equipped with onboard dip switch for setting desired RAID level but it seemed not to be working at all. Use management software to create desired level of your RAID.
Software for Windows, Mac & Linux is available here (under the SUPPORT tab):