2020-03-09-creating-an-open-source-nas.md

 1---
 2title: Creating an open source NAS
 3description: My process for building an open source NAS with a powerful single board computer and a couple of large HDDs
 4tags: Sysadmin NAS Backups
 5date: 2020-03-09 23:43 -0400
 6cover: /assets/posts/disk.png
 7draft: true
 8---
 9
10A few months ago, I decided that I needed a NAS. I didn't want anything
11proprietary because this was going to store all of my data, my mother's,
12possibly some friends', as well as backups for _all_ of my servers; I needed to
13know I had full control over every aspect of the system to ensure it was secure.
14To that end, I decided to build it with an SBC[^1] from
15[Pine64](https://www.pine64.org).
16
17# Parts
18
19- [ROCKPro64](https://store.pine64.org/?product=rockpro64-4gb-single-board-computer) -
20  $79.99
21- [NAS
22  Case](https://store.pine64.org/?product=rockpro64-metal-desktopnas-casing) -
23  $44.99
24- [SATA -> PCIe adapter & RAID
25  controller](https://www.amazon.com/N-ORANIE-Controller-HyperDuo-Multiplier-88SE9230/dp/B07KYP5RRL) -
26  $47.99
27- [6 TB WD Red Pro](https://www.newegg.com/p/N82E16822234344) - $203.99
28- [Heatsink w/
29  fan](https://store.pine64.org/?product=rockpro64-10mm-low-profile-heatsink-with-fan) -
30  $5.29
31- [Fan for the
32  case](https://store.pine64.org/?product=fan-for-rockpro64-metal-desktopnas-casing) -
33  $3.99
34- Power supply:
35  [US](https://store.pine64.org/?product=rockpro64-12v-5a-us-power-supply) or
36  [EU](https://store.pine64.org/?product=rockpro64-12v-5a-eu-power-supply) -
37  $12.99
38- [16 GB eMMC Module](https://store.pine64.org/?product=16gb-emmc) - $15.95
39- Any microSD card
40
41**Total:** $415.18
42
43To reduce the overall cost, you could go with a cheaper HDD; I got this one
44because I need reliability in the _very_ long run but a more inexpensive disk is
45perfectly suitable. Without accounting for the drive, the NAS is ~$215 and very
46reasonably priced compared to most other options.
47
48# Assembly
49
50Refer to [Pine64's wiki](https://wiki.pine64.org/index.php/NASCase) on
51assembling the case. I don't know if it was intentional or what but, for the
52HDDs, I was only given enough screws for one. For the cover, I still have three
53empty screw holes. It's not a huge deal but it would have been nice to have
54enough screws for everything.
55
56# Software
57
58I chose to go with [OpenMediaVault](https://openmediavault.org). However, I
59didn't use Pine64's image; there were a variety of errors when basic operations
60were run so I decided to use vanilla [armbian](https://www.armbian.com).
61Thankfully, they have an image for the
62[ROCKPro64](https://www.armbian.com/rockpro64/) and it worked flawlessly. The
63next step was getting OMV set up on it but, like a boss, they provide a script
64for that 😉
65
66```bash
67wget https://raw.githubusercontent.com/OpenMediaVault-Plugin-Developers/installScript/master/install
68chmod +x install
69sudo ./install
70```
71
72Additional setup info can be found in an [armbian
73guide](https://github.com/OpenMediaVault-Plugin-Developers/docs/blob/master/Adden-A-Installing_OMV5_on_Armbian.pdf)
74they've created.
75
76# Drivers
77
78This posed a huge problem for me. Neither the "official" ROCKPro64 OMV image nor
79armbian included the driver for my RAID controller so I had to figure that out.
80
81Huge shoutout to `fromport` in the `#openmediavault` channel on Freenode; they
82were a _massive_ help with getting the driver situation sorted out.
83
84Check out [Secluded.Site](https://secluded.site), my personal webpage; I'll be
85using it for posts like this in the future and will try to leave this space for
86official announcements (like when backups have been automated using this very
87NAS 😉).
88
89[^1]: Single Board Computer