<blog:entry xmlns:xh="http://www.w3.org/1999/xhtml" xmlns:blog="http://www.adamretter.org.uk/blog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.adamretter.org.uk/blog http://www.adamretter.org.uk/blog/entry.xsd" status="published" id="a0de6ed4-e48a-43d1-8523-d6698a20b5b6">
    <blog:article timestamp="2009-06-02T23:00:00.000+01:00" last-updated="2009-07-07T17:59:00.000+01:00" author="Adam Retter">
        <blog:title>Choosing Software and Hardware for my DIY NAS</blog:title>
        <blog:sub-title>DIY NAS - Part 2 of 3</blog:sub-title>
        <blog:article-content>
            <xh:p>In deciding to build my own NAS, after having identified my requirements in <xh:a href="http://www.adamretter.org.uk/blog/entries/diy-nas-requirements.xml" title="In need of Open Storage (DIY NAS part 1 of 3)">Part 1</xh:a>, I set about searching for the perfect hardware and software combination...</xh:p>
            <xh:p>There are plenty of open source operating systems available that offer multiple options for reliable storage, including both hardware and software supported RAID. To avoid getting into the situation of outdated/unsupported hardware again, I have decided not to use any sort of hardware assisted RAID, instead I will use the software RAID support provided by the operating system itself.</xh:p>
            <xh:p>Many of these operating systems support a vast array of system hardware, however I did not want to just reuse a standard PC/Server because of its large power requirements and physical size when compared to commercial NAS systems aimed at the SMB (Small and Medium Business) Market.</xh:p>
            <blog:mini-title>Software</blog:mini-title>
            <xh:p>
                <xh:a href="http://www.linux.org" title="Linux">Linux</xh:a>, <xh:a href="http://www.freebsd.org" title="FreeBSD">FreeBSD</xh:a> and <xh:a href="http://www.openbsd.org" title="OpenBSD">OpenBSD</xh:a> all offer options for software RAID. There are also a number of distributions specifically designed for NAS appliances such as <xh:a href="http://www.openfiler.com" title="OpenFiler">OpenFiler</xh:a> (based on Linux) and <xh:a href="http://www.freenas.org" title="FreeNAS">FreeNAS</xh:a> (based on FreeBSD), however I have settled on <xh:a href="http://www.opensolaris.com" title="OpenSolaris">OpenSolaris</xh:a> because of <xh:a href="http://opensolaris.org/os/community/zfs/" title="OpenSolaris ZFS Community">ZFS</xh:a> and its RAIDZ feature. Also worthy of a mention is the very interesting and well suited looking <xh:a href="http://www.nexenta.com" title="Nexenta NexentaStor">NexentaStor</xh:a> (based on OpenSolaris), but the added goodness is not open source, so I will consider it no further.</xh:p>
            <xh:p>A few reasons why I chose OpenSolaris and ZFS -</xh:p>
            <xh:ul>
                <xh:li>OpenSolaris is based on <xh:a href="http://www.sun.com/solaris" title="Sun Solaris">Solaris</xh:a> (it feels solid, just like Solaris)</xh:li>
                <xh:li>OpenSolaris has CIFS and NFS support built in</xh:li>
                <xh:li>ZFS RAIDZ and RAIDZ2 provide better than RAID functionality</xh:li>
                <xh:li>ZFS has 256 bit checksumming and <xh:a href="http://opensolaris.org/os/community/zfs/demos/selfheal/" title="ZFS self healing demo">self healing</xh:a>
                </xh:li>
                <xh:li>ZFS does not suffer from the RAID-5 write hole</xh:li>
                <xh:li>ZFS snapshots</xh:li>
            </xh:ul>
            <xh:br/>
            <xh:p>Looking at ZFS and the reliability of disk failures I decided to go for a RAIDZ2 approach, which requires at least 4 disks.<xh:br/>
        RAIDZ2 is an advancement of the traditional RAID-6. It writes a double-parity and parity is distributed across the disks. In this configuration approximately 50% of your total disk space is available for file storage and the other 50% is used for parity information. In RAIDZ2 with four disks, continuous operation is ensured even with the failure of two of the disks.</xh:p>
            <xh:p>Simon Breden has written <xh:a href="http://breden.org.uk/2008/03/02/a-home-fileserver-using-zfs/" title="A Home Fileserver using ZFS">some excellent blog entries on building a home fileserver using  ZFS</xh:a>, he has informed my decisions and I think perhaps he explains the salient points more eloquently. A article of Simon's on the advantages of using ZFS is <xh:a href="http://breden.org.uk/2008/03/02/home-fileserver-i%E2%80%99ll-use-zfs/" title="Home Fileserver: I'll use ZFS">here</xh:a>
            </xh:p>
            <blog:mini-title>Hardware</blog:mini-title>
            <xh:p>My first and by far hardest task was finding a suitable chassis for my DIY NAS. I wanted it to hold at least four disks for storage, and one disk for its operating system – so a total of 5 disks... and it needed to be physically small, this is my home not a data-center.</xh:p>
            <xh:p>
                <xh:img class="left" src="blog/images/norco_ns-520.jpg" alt="Norco NS-520 NAS Chasis - front/side view"/>Originally after much searching, I found the <xh:a href="http://www.norco.cn/ArticleShow.asp?ArticleID=66&amp;BigClassName=Storage%20Array%20(inc%20NAS)&amp;SmallClassName=Network%20Attached%20Storage" title="Norco NS-520 NAS Chasis">Norco NS-520</xh:a>, which looked absolutely perfect; it supported 6 disks, came with a Mini-ITX motherboard, Celeron-M processor, 512MB RAM, 180W PSU and was physically small (277x187x230mm). Unfortunately the cheapest option was shipping it directly from the manufacturers in Shenzhen, China at $687 =~ £464.82. The cost seemed high (and would of been higher after import duty and VAT) and the maximum power consumption was more than I had hoped for.</xh:p>
            <xh:p>
                <xh:img class="right" src="blog/images/chenbro_es34059.jpg" alt="Chenbro ES340059 NAS Chasis - front view"/>The only other NAS chassis that I eventually found was the <xh:a href="http://www.chenbro.com/corporatesite/products_detail.php?sku=79" title="Chenbro ES34059 NAS Chasis">Chenbro ES34069</xh:a>, again it ticked all the boxes; it supported 5 disks, accepted a Mini-ITX motherboard, had a small 120W PSU and was physically small (260x140x260mm). It was also available from a UK reseller for £205.85 inc.VAT. Cheaper than the Norco (even after adding a motherboard, CPU and RAM) and the maximum power consumption was lower :-)</xh:p>
            <xh:p>For the Chenbro chassis I needed to source my own Mini-ITX motherboard. The main requirement was that it support at least 4 SATA disks for my storage and an additional IDE/SATA disk for the operating system and have a low power consumption. Finding a motherboard with a low-power CPU and at least 4 SATA ports turned out to be a tough task, I found only two –</xh:p>
            <xh:ul>
                <xh:li>
                    <xh:a href="http://www.via.com.tw/en/products/embedded/ProductDetail.jsp?productLine=1&amp;motherboard_id=550" title="VIA EPIA SN Mini-ITX Motherboard">VIA EPIA SN</xh:a> 18000 EG – VIA 1.8GHz C7 32bit CPU / 26W  - £178.25 from mini-itx.com (inc. VAT)</xh:li>
                <xh:li>
                    <xh:a href="http://www.msi.com/index.php?func=proddesc&amp;prod_no=1614&amp;maincat_no=388&amp;cat2_no=599&amp;cat3_no=601" title="MSI IM-945GC Mini-ITX Motherboard">MSI IM-945GC</xh:a> – Intel Atom N330 1.6GHz Dual Core 64bit CPU / 24.33W Max - <xh:a href="http://www.orbitmicro.com/global/ms-9832-05s--ms-9832-030--p-10191.html" title="MSI IM-945GC for sale at orbitmicro.com">$169.00 from orbitmicro.com</xh:a> (£191.13 after currency exchange, import VAT and handling charges)</xh:li>
            </xh:ul>
            <xh:br/>
            <xh:p>I chose MSI's Intel Atom board as it offered considerably more processing power at lower power consumption, it is also 64 bit unlike the VIA - there are rumoured problems with ZFS on 32 bit systems.</xh:p>
            <xh:p>I would also like to take a moment to congratulate MSI on their excellent pre-sales technical support, a quick call to their UK office and within a day their Taiwan office had emailed me the power consumption specifications for the motherboard :-)</xh:p>
            <xh:p>The complete bill of materials and estimated power consumption follows. The remaining items were chosen for their suitability with the chasis and motherboard and/or for their low power consumption.</xh:p>
            <xh:table frame="void" cellspacing="0" border="0" rules="none" class="bom" style="margin: 2em;">
                <xh:colgroup>
                    <xh:col width="107"/>
                    <xh:col width="550"/>
                    <xh:col width="67"/>
                </xh:colgroup>
                <xh:thead>
                    <xh:tr>
                        <xh:th colspan="3">
                            <xh:h2>Bill of Materials</xh:h2>
                        </xh:th>
                    </xh:tr>
                    <xh:tr>
                        <xh:th>Supplier</xh:th>
                        <xh:th>Part Description</xh:th>
                        <xh:th>Cost</xh:th>
                    </xh:tr>
                </xh:thead>
                <xh:tbody>
                    <xh:tr>
                        <xh:td>mini-itx.com</xh:td>
                        <xh:td>Euro C5 Power Cord</xh:td>
                        <xh:td class="currency">£3.00</xh:td>
                    </xh:tr>
                    <xh:tr>
                        <xh:td/>
                        <xh:td>2.5” to 3.5” IDE Hard Disk Adapter</xh:td>
                        <xh:td class="currency">£7.50</xh:td>
                    </xh:tr>
                    <xh:tr>
                        <xh:td/>
                        <xh:td>Sony Optiarc AD-7590A-01 Trayload Slimline DVD+-RW Drive</xh:td>
                        <xh:td class="currency">£37.50</xh:td>
                    </xh:tr>
                    <xh:tr>
                        <xh:td/>
                        <xh:td>2GB DDR2 667 DIMM for EPIA SN / Atom / JNC62K and Socket LGA775 Boards</xh:td>
                        <xh:td class="currency">£29.00</xh:td>
                    </xh:tr>
                    <xh:tr>
                        <xh:td/>
                        <xh:td>Chenbro 4-in-1 Card Reader (SD/Mini-SD/MMC/MCS)</xh:td>
                        <xh:td class="currency">£9.50</xh:td>
                    </xh:tr>
                    <xh:tr>
                        <xh:td/>
                        <xh:td>Chenbro ES34069 Mini-ITX Home Server/NAS Chassis</xh:td>
                        <xh:td class="currency">£179.00</xh:td>
                    </xh:tr>
                    <xh:tr class="additionalCost">
                        <xh:td/>
                        <xh:td style="border-top: 1px solid rgb(0, 0, 0);">SHIPPING</xh:td>
                        <xh:td class="currency" style="border-top: 1px solid rgb(0, 0, 0);">£12.00</xh:td>
                    </xh:tr>
                    <xh:tr class="additionalCost">
                        <xh:td/>
                        <xh:td style="border-bottom: 1px solid rgb(0, 0, 0);">VAT</xh:td>
                        <xh:td class="currency" style="border-bottom: 1px solid rgb(0, 0, 0);">£41.63</xh:td>
                    </xh:tr>
                    <xh:tr class="subTotal">
                        <xh:td/>
                        <xh:td>Sub Total</xh:td>
                        <xh:td class="currency">£319.13</xh:td>
                    </xh:tr>
                    <xh:tr>
                        <xh:td colspan="3">
                            <xh:br/>
                            <xh:br/>
                        </xh:td>
                    </xh:tr>
                    <xh:tr>
                        <xh:td>
                            <xh:a href="http://www.cclonline.com" title="CCL Computers">CCL Computers</xh:a>
                        </xh:td>
                        <xh:td>4 x 1TB Western Digital Caviar Green 3.5” SATA 3Gb/s Hard Disk (WD10EADS)</xh:td>
                        <xh:td class="currency">£247.96</xh:td>
                    </xh:tr>
                    <xh:tr>
                        <xh:td/>
                        <xh:td>80GB Seagate Momentus 5400.3 2.5” IDE Hard Disk (ST980815A)</xh:td>
                        <xh:td class="currency">£35.85</xh:td>
                    </xh:tr>
                    <xh:tr class="additionalCost">
                        <xh:td/>
                        <xh:td style="border-top: 1px solid rgb(0, 0, 0);">SHIPPING</xh:td>
                        <xh:td class="currency" style="border-top: 1px solid rgb(0, 0, 0);">£5.21</xh:td>
                    </xh:tr>
                    <xh:tr class="additionalCost">
                        <xh:td/>
                        <xh:td style="border-bottom: 1px solid rgb(0, 0, 0);">VAT</xh:td>
                        <xh:td class="currency" style="border-bottom: 1px solid rgb(0, 0, 0);">£43.35</xh:td>
                    </xh:tr>
                    <xh:tr class="subTotal">
                        <xh:td/>
                        <xh:td>Sub Total</xh:td>
                        <xh:td class="currency">£332.37</xh:td>
                    </xh:tr>
                    <xh:tr>
                        <xh:td colspan="3">
                            <xh:br/>
                            <xh:br/>
                        </xh:td>
                    </xh:tr>
                    <xh:tr>
                        <xh:td>
                            <xh:a href="http://www.pcworld.co.uk" title="PC World">PC World</xh:a>
                        </xh:td>
                        <xh:td style="border-bottom: 1px solid rgb(0, 0, 0);">Power Cable Y Splitter (4-pin Molex to 4-pin Molex + 4-pin Floppy)</xh:td>
                        <xh:td class="currency" style="border-bottom: 1px solid rgb(0, 0, 0);">£3.39</xh:td>
                    </xh:tr>
                    <xh:tr class="additionalCost">
                        <xh:td/>
                        <xh:td style="border-bottom: 1px solid rgb(0, 0, 0);">VAT</xh:td>
                        <xh:td class="currency" style="border-bottom: 1px solid rgb(0, 0, 0);">£0.51</xh:td>
                    </xh:tr>
                    <xh:tr class="subTotal">
                        <xh:td/>
                        <xh:td>Sub Total</xh:td>
                        <xh:td class="currency">£3.90</xh:td>
                    </xh:tr>
                    <xh:tr>
                        <xh:td colspan="3">
                            <xh:br/>
                            <xh:br/>
                        </xh:td>
                    </xh:tr>
                    <xh:tr>
                        <xh:td>
                            <xh:a href="http://www.orbitmicro.com" title="Orbit Micro">Orbit Micro</xh:a>
                        </xh:td>
                        <xh:td>MSI IM-945GC Mini-ITX Motherboard, Intel Atom 330 Dual Core 1.6GHz</xh:td>
                        <xh:td class="currency">$169.00</xh:td>
                    </xh:tr>
                    <xh:tr class="additionalCost">
                        <xh:td/>
                        <xh:td style="border-top: 1px solid rgb(0, 0, 0);">SHIPPING TO UK (USPS)</xh:td>
                        <xh:td class="currency" style="border-top: 1px solid rgb(0, 0, 0);">$57.69</xh:td>
                    </xh:tr>
                    <xh:tr class="subTotal">
                        <xh:td/>
                        <xh:td style="border-top: 1px solid rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0);">Sub Total $</xh:td>
                        <xh:td class="currency" style="border-top: 1px solid rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0);">$226.69</xh:td>
                    </xh:tr>
                    <xh:tr class="additionalCost">
                        <xh:td/>
                        <xh:td>VISA Exchage Rate @ 1.46082</xh:td>
                        <xh:td class="currency">£155.18</xh:td>
                    </xh:tr>
                    <xh:tr class="additionalCost">
                        <xh:td/>
                        <xh:td>Overseas Transaction Fee</xh:td>
                        <xh:td class="currency">£1.00</xh:td>
                    </xh:tr>
                    <xh:tr class="additionalCost">
                        <xh:td/>
                        <xh:td>Pracelforce Import VAT</xh:td>
                        <xh:td class="currency">£21.45</xh:td>
                    </xh:tr>
                    <xh:tr class="additionalCost">
                        <xh:td/>
                        <xh:td style="border-bottom: 1px solid rgb(0, 0, 0);">Parcelforce Handling fee</xh:td>
                        <xh:td class="currency" style="border-bottom: 1px solid rgb(0, 0, 0);">£13.50</xh:td>
                    </xh:tr>
                    <xh:tr class="subTotal">
                        <xh:td/>
                        <xh:td>Sub Total</xh:td>
                        <xh:td class="currency">£191.13</xh:td>
                    </xh:tr>
                    <xh:tr>
                        <xh:td colspan="3">
                            <xh:br/>
                        </xh:td>
                    </xh:tr>
                    <xh:tr class="total">
                        <xh:td colspan="2">TOTAL NAS COSTS</xh:td>
                        <xh:td class="currency">£846.53</xh:td>
                    </xh:tr>
                </xh:tbody>
            </xh:table>
            <xh:table frame="void" cellspacing="0" border="0" rules="none" class="bop" style="margin: 2em;">
                <xh:colgroup>
                    <xh:col width="120"/>
                    <xh:col width="120"/>
                    <xh:col width="120"/>
                    <xh:col width="50"/>
                    <xh:col width="140"/>
                    <xh:col width="140"/>
                </xh:colgroup>
                <xh:thead>
                    <xh:tr>
                        <xh:th colspan="6">
                            <xh:h2>Estimated Power Consumption</xh:h2>
                        </xh:th>
                    </xh:tr>
                    <xh:tr>
                        <xh:th>Part</xh:th>
                        <xh:th>Idle Power Consumption</xh:th>
                        <xh:th>Max Power Consumption</xh:th>
                        <xh:th>Quantity</xh:th>
                        <xh:th>Total Idle Power Consumption</xh:th>
                        <xh:th>Total Max Power Consumption</xh:th>
                    </xh:tr>
                </xh:thead>
                <xh:tbody>
                    <xh:tr>
                        <xh:td>MSI IM-945GC Motherboard</xh:td>
                        <xh:td>17.46W</xh:td>
                        <xh:td>24.33W</xh:td>
                        <xh:td>1</xh:td>
                        <xh:td>17.46W</xh:td>
                        <xh:td>24.33W</xh:td>
                    </xh:tr>
                    <xh:tr>
                        <xh:td>1 TB Western Digital Caviar Green Hard Disk (WD10EADS)</xh:td>
                        <xh:td>3.70W</xh:td>
                        <xh:td>6.00W</xh:td>
                        <xh:td>4</xh:td>
                        <xh:td>14.80W</xh:td>
                        <xh:td>24.00W</xh:td>
                    </xh:tr>
                    <xh:tr>
                        <xh:td>80GB Seagate Momentus Hard Disk (ST980815A)</xh:td>
                        <xh:td>0.80W</xh:td>
                        <xh:td>2.00W</xh:td>
                        <xh:td>1</xh:td>
                        <xh:td>0.80W</xh:td>
                        <xh:td>2.00W</xh:td>
                    </xh:tr>
                    <xh:tr>
                        <xh:td colspan="6">
                            <xh:br/>
                        </xh:td>
                    </xh:tr>
                    <xh:tr class="total">
                        <xh:td colspan="4">TOTAL ESTIMATED POWER CONSUMPTION</xh:td>
                        <xh:td>33.06W</xh:td>
                        <xh:td>50.33W</xh:td>
                    </xh:tr>
                </xh:tbody>
            </xh:table>
            <xh:p>Read more in <xh:a href="http://www.adamretter.org.uk/blog/entries/diy-nas-build.xml" title="Building my DIY NAS (DIY NAS part 3 of 3)">Part 3 - Building my DIY NAS</xh:a>.</xh:p>
        </blog:article-content>
    </blog:article>
    <blog:tags>
        <blog:tag>NAS</blog:tag>
        <blog:tag>RAIDZ</blog:tag>
        <blog:tag>OpenSolaris</blog:tag>
        <blog:tag>Chenbro</blog:tag>
        <blog:tag>MSI</blog:tag>
    </blog:tags>
</blog:entry>