Building your own NAS on a Raspberry Pi
2 min read

Building your own NAS on a Raspberry Pi

So you need storage. There are couple of ways to do this. I am always about saving money that's for sure.
Building your own NAS on a Raspberry Pi

So you need storage. There are couple of ways to do this. I am always about saving money that's for sure. The other day I was in my computer room and looking at about 9 2tb Drives and decided to build my own NAS. Some of you may want your on SAN that can be done as well. But we will focus on a NAS here today.

The older I get the lazier I get and for you folks out there this is a fact. I don't care who you are, the older yo get the lazier you get.

So to keep from having to do everything via cli I use OMV 5. I like it it's simple to use and it's intuitive. OMV 6 Alpha is out but it has a ways to go yet  to be ready for prime time.

So let's get this started:

At the Console

1 - sudo raspi-config
2 - ip a
3 - sudo touch /boot/ssh
4 - sudo reboot

Configure the NAS

5 - sudo timedatectl set-timezone America/New_York
6 - sudo nano -c /etc/hostname

If Raspberry PI use #7

7 - sudo nano -c /etc/dhcpcd.conf

If Ubuntu Server or OMV ISO #7a

7a - sudo nano -c /etc/netplan/
8 - sudo nano -c /etc/hosts
9 - sudo reboot
10 - sudo apt update
11 - sudo apt -y full-upgrade

The next line installs OMV

12 - wget -O - https://raw.githubusercontent.com/OpenMediaVault-Plugin-Developers/installScript/master/install | sudo bash
13 - sudo fdisk -l

The next line installs OMV Extras

14 - sudo wget -O - https://github.com/OpenMediaVault-Plugin-Developers/packages/raw/master/install | sudo bash
15 - http://ip.add.ress
16 - login: admin password: openmediavault

Check your disks are actually seen by the OS

17 - sudo df -h
18 - sudo fdisk -l

In OMV GUI

:Navigate to storage
19 - General Settings -> Web Administrator Password -> Change_Your_Pass_Word -> Click Save Button
20 - logout and log back in with new password
21 - on the left go to plugins -> search for union -> Click the check box -> click the install button
22 - Click on disks -> wipe -> scan
23 - Click on filesystems ->
24 - login to the Web GUI
25 - Click on Disks
26 - Check for your disks

if you don't see them
27 - Click on scan
28 - Now goto File Systems
29 - Click the Create button
30 - Click select device -> /dev/sdb1
31 - Give it a label (ex: disk1)
32 - Choose your filesystem I used EXT4
33 - next click mount

34 - Goto UnionFileSystem
35 - Click add
36 - give your new storage a name (ex: extStor)
37 - click all the drives you want to add to this store
38 - Click save

39 - Goto Services and turn on the services you want, I use SMB/CIFS, NFS only.
40 - Then goto Shared Folders and click add
41 - Name your folder (ex: DOCS)
42 - Select the device, you can select and individual drive or select store device
43 - Select your path
44 - Permissions unless you are in a restricted enviornment: I would select everyone read/write
45 - Click save

46 - Goto Services
47 - SMB/CIFS
48 - SHARES
49 - Click Add
50 - Select Shared Folder
51 - Public Select no if you want to keep it private
52 - Click Apply
53 - Everything else I leave alone.

You can apply this same principle to any other OS just use your head. It is literally common sense. If you need assistance you can get a hold of me via the contact page on this site. (hint: at the bottom of the page)

Thank you for your time and patience. If you have any relevant articles on things you have done with a PI join us and contribute.