Home Contact About Blog ClaudioBrt
NAS-SERVER WITH RASPBERRY PI AND OPENMEDIAVAULT
--

The Raspberry Pi is tiny, silent, and can connect to your home network. So it's no wonder that the Raspberry Pi NAS server is a popular Pi project. Lucky for us, using our Pies as NAS servers has never been easier. By using a Linux distro called OpenMediaVault, we can quickly and easily create a Raspberry Pi NAS server.

For those who don't know, NAS means Network Attached Storage. With NAS, you can store data on hard drives and other external storage devices via your LAN network, meaning you don't have to plug the USB storage directly into whatever device you're using at the moment. It's a convenient way to share files between devices and to back up multiple computers.

HOW TO TURN YOUR RASPBERRY PI INTO A NAS SERVER

This is a pretty easy project. We're going to get OpenMediaVault, install it on our Raspberry Pi, tweak a few settings, and plug in your external storage devices. For this project, you'll need a Raspberry Pi (I'll be using the Raspberry Pi 3 B+), the usual peripherals (screen, keyboard, mouse, microSD card), and a computer with an SD card reader. Naturally, you'll also need your USB media storage devices - preferably self-powered ones with plenty of storage space for all your stuff.

STEP 1: DOWNLOAD OPENMEDIAVAULT

Download the Raspberry Pi version of the operating system here. You want the one named OMV_4_Raspberry_Pi_2_3_3Plus.img.xz or something similar. (the numbers will change based on future updates)

StEP 2: FLASH THE OPENMEDIAVAULTDISK IMAGE TO YOUR MICROSD CARD

There are many ways to write images on microSD cards, but I will be using Etcher as it's available for macOS, Windows and Linux. It has a modern GUI and it's easy to use. Click Select image in Etcher, browse to the path where the image is saved and open it. Insert the microSD card into your computer and it should be automatically detected by Etcher, if no other storage devices are attached, otherwise just click Change and select the microSD card. Last step is to click on Flash! to begin writing data to the microSD card.

STEP 3: CONNECT EVERYTHING AND BOT UP YOUR PI

Now stick that microSD card into your Pi and connect your Pi to your local network with an Ethernet cable. You'll want to plug in your external storage devices, too. Then go ahead and plug in your Pi's power source. You'll find that there's no real installation process, and your Pi will spring to life with no trouble at all.

STEP 4: SET UP OPENMEDIAVAULT

When you boot up your Raspberry Pi NAS, OpenMediaVault will print your IP address:

To manage the system visit the openmediavault web control panel:
eth0: [IP address]

You'll see your IP address instead of the part in brackets, of course. Write that down and then head back to your computer. Open up the browser on your computer and type in your Pi's IP address. You should find yourself in the control panel for your new Raspberry Pi NAS. Log in with the following credentials:

-username = admin
-password = openmediavault

STEP 5: MOUNT YOUR DISKS

On the left-hand menu, click on File Systems (it'll be under the Storage heading). You'll see your USB storage devices in the Devices(s) column. Just select one and hit Mount, then Apply.

STEP 6: CREATE SHARED FOLDERS

In order to make your files available to your network we need to create shared folders, therefore go back at the main navigation menu and click Shared Folders . It'll be under Access Rights Management. Just hit Add to get started - you'll be able to name a folder, choose what storage device it lives on, and specify a path for it (I just used “/” which points to the root of the disk rather than a specific folder) . Click Save when you finished adding the folder/s.

STEP 7: ENABLE SMB

Now what we need to do is enabling SMB/CFIS so that other devices on our network can reach our shared folders. To do so so, go back at the main menu, click SMB/CFIS (under Services) and turn on the option labelled Enable. Then hit Save and when the page refreshes, Apply.

There are two tabs to the SMB/CFIS menu. We-ve been on Settings, but hop over to Shares by clicking the labelled tab. Click Add and then, in the drop-down menu, select the shared folder you created in the last step. Click Save, then repeat the process until all of your shared folders are added.

STEP 8: ADD USER/S

You can add multiple users to OpenMediaVault, meaning you can set different levels of permissions for each. To add a user, click User under Access Rights Management on that main left-hand menu. Hit Add, give your user a name and a password, and then hit Apply.

STEP 9: ACCESS YOUR FILES

We've covered everything you need to do on the OpenMediaVault side of things. Now let's talk about the PC (Windows, Linux) or Mac you're using to access these files. In all cases, you'll need to map the new shared drive from your computer.

On Windows, you'll need to use File Explorer. Click on This PC, then the Computer tab, then Map Network Drive.

You'll need to choose a drive letter from the drop-down box next to Drive. In the Folder field, type the path to the network drive. It'll be \\192.168.0.101(Pi’s IP Address)\[folder], where [folder] is the name of your shared folder. Hit Finish and log in with the credentials you created in Step 8. (The credentials will be required for macOS and Linux users as well)

On Mac, use Finder. Type Command + K and a window labelled Connect to Server will pop-up. Type smb:\\192.168.0.101(Pi’s IP Address)\[folder] into the Server Address field (you can also use the hostname “raspberrypi". Then hit Connect, choose the volumes you want, and hit OK.

On Linux, use Nautilus. Type Ctrl + L to get the address box at the top of the window. Type smb:\\192.168.0.101(Pi’s IP Address)\[folder] into the Address field . Then hit Enter, choose the volumes you want, and hit OK.

That's it! Your NAS is now fully up and running. Of course, this guide doesn't cover absolutely everything you can do with OpenMediaVault. To get the most out of the program, I'd encourage you to check out the OpenMediaVault wiki.

--
01100010 01111001 00100000 00100000 01000011 01101100 01100001
01110101 01100100 01101001 01101111 01000010 01110010 01110100