OpenMediaVault NAS with Samba on Raspberry Pi

OpenMediaVault NAS with SAMBA(SMB) on Raspberry Pi

What is NAS?

  • Network-Attached Storage, commonly known as NAS, is a dedicated storage system that provides centralized file storage and sharing across a network
  • Unlike traditional storage solutions, such as external hard drives or USB flash drives, NAS connects to a local area network (LAN) and operates independently, making files accessible to multiple users simultaneously
  • NAS systems often support various redundancy options, such as RAID (Redundant Array of Independent Disks), which can safeguard data against drive failures

What is OpenMediaVault?

  • OpenMediaVault (OMV) is a Linux distribution specifically created for network-attached storage (NAS) purposes
  • It provides a reliable and feature-rich solution for managing storage resources in home or enterprise environment
  • It allows effortless management of disks, RAID arrays, and file systems, providing flexible storage allocation and expansion options
  • Built-in monitoring tools allow users to track system performance, disk health, and network usage. Email notifications can be set up to receive alerts for critical events

What is SAMBA (SMB)?

  • SMB, short for Server Message Block, is a network protocol that facilitates file and printer sharing, as well as inter-process communication between computers in a network
  • Samba is an open-source implementation of the SMB/CIFS protocol suite. It enables file and print services between different operating systems, bridging the gap between Windows and non-Windows systems. It allows non-Windows systems, such as Linux, macOS, and Unix, to seamlessly interact with Windows-based networks using SMB
  • SMB and Samba empower users to access shared resources, collaborate, and streamline workflows, regardless of the operating systems they use

Prerequisites

  • A Raspberry Pi with Raspberry Pi OS Lite installed on it (Please note OpenMediaVault only supports the lite version, i.e., A Port of Raspberry Pi OS with no Desktop Interface)
  • Refer here for detailed instructions on how to setup Raspberry Pi (Ubuntu Server on Raspberry Pi 4)
  • The only difference in the above article is that instead of Ubuntu we will need to install Raspberry Pi OS Lite (This is only a matter of preference, however OMV can be installed on any Debian based operating system. The steps for the installation remains the same)
Raspberry Pi OS Lite

Installing OpenMediaVault on Raspberry Pi

1. Before we begin with the installation, let us update the packages

sudo apt update && sudo apt upgrade

2. Now, we can begin installing OpenMediaVault. We will be using the install script which can be found here – InstallScript and running it with bash

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

3. Note, that if you are connected via SSH, you may lose connection to the Pi during the install. Let us now reboot the Pi

sudo reboot

Setting Up OpenMediaVault

1. Login to the OpenMediaVault homepage by using the IP address/hostname of your Raspberry Pi

# To get the IP address
hostname -I

2. You should now be able to see the login page of OpenMediaVault

OpenMediaVault

3. Login using the below credentials. You should now be able to see the home screen/dashboard

username: admin
password: openmediavault
OpenMediaVault

4. The default password can be changed by clicking on the user icon on the top right

OpenMediaVault

5. Navigate to the Dashboard by clicking on the Dashboard icon

OpenMediaVault

Setup Dashboard in OpenMediaVault

1. As seen previously, the dashboard does not display any meaningful information at this point. Let us enable some widgets to get some information on our dashboard. To enable it, click on the user icon on the top right corner and select dashboard

OpenMediaVault

2. Click on save, and now you should be able to see the widgets on the dashboard

OpenMediaVault

Setting up a Shared Folder for the NAS

1. In order to setup a NAS, we will need to create a filesystem on which our shared folder will reside. Now is a good time to connect your external harddisk/any media that you want to mount to your NAS. Navigate to the file systems section in order to view the connected medias. In our case, an external hard disk has been connected to the Pi via the USB port

OpenMediaVault

2. Click on the mount icon, if your hard disk already has partitions created. If you want to start fresh, you can click on the + icon to create a new partition on the disk (Note: Creating new partition will work only when the hard disk is wiped empty). For the sake of this tutorial, we will be mounting our existing hard disk partition

OpenMediaVault

3. Select your hard disk in the file system dropdown and click on save. (The usage warning threshold is used if email notifications are configured on OMV). Once saved, apply the changes and you should be able to see your disk mounted.

OpenMediaVault
OpenMediaVault

4. Now, we will need to setup the shared folder which can be then shared via SMB. Navigate to the shared folders section, and click on the + icon to create a shared folder

OpenMediaVault

5. Enter the required details and click on save and apply the configuration changes same as before (shown in step 3). The access permissions can be chosen according to the requirement. In the later part we will be looking into how we can create users on OMV. For now, we are restricting the access to administrator and users.

OpenMediaVault

6. You should now be able to see the Shared Folder created

OpenMediaVault

7. We will now be enabling SMB to allow sharing of this mount over our network. Navigate to the Settings section under SMB/CIFS tab, and make sure SMB is enabled. Click on Save and apply the configuration changes

OpenMediaVault

8. Now navigate to the Shares section in the SMB/CIFS tab and create a share using the shared folder we created earlier as shown below. For the sake of simplicity, we will not be diving deep into the options available here, but feel free to play around according to your requirements. Click on save and apply the configuration changes

OpenMediaVault
OpenMediaVault
OpenMediaVault

Managing Users

To add users to your OMV, Navigate to the users section. New users/groups can be added and controlled from here

OpenMediaVault

Congratulations!!! You have now successfully created a NAS on your Raspberry Pi which can be accessed throughout your network!

66910cookie-checkOpenMediaVault NAS with Samba on Raspberry Pi

Leave a Comment

Your email address will not be published. Required fields are marked *