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