Setting Up Open Media Vault as a Home NAS

Jarret B

Well-Known Member
Staff member
Joined
May 22, 2017
Messages
454
Reaction score
519
Credits
19,511
Open Media Vault is a Network Attached Storage (NAS) server based on Debian Linux. With this integrated Operating System (OS), you can share media to any other device on the network.

This is not a hardware solution, but a software solution that you can run on a system and share attached media, whether internal or external storage devices.

Sharing Methods

You can share storage devices on the network using multiple types of sharing methods:
  • Network File System (NFS)
  • Samba
  • File Transfer Protocol (FTP)
  • Secure Sockets Layer (SSL)
  • Rsync
There is more that Open Media Vault (OMV) can do, but we will concentrate more on the file sharing side of it to be used as a NAS in a small networking environment, such as a home network.

NOTE: There are articles about Proxmox that will show the use of a NAS as an external storage source for specific data. By using OMV, we can cover how to add storage to the Proxmox Server. Even if you use a different NAS method, the configuration needed on the Proxmox Server is still the same, no matter the NAS.

For this article, we will go over installing OMV on a physical system and setting up shares.

Installation

The main thing to note about OMV is that made as part of Debian, so you must download it as an ISO. You cannot simply install OMV on an existing Debian system.

To begin with, you need to download the ISO from 'https://www.openmediavault.org/download.html'. There are two options here. The first one is the stable version (currently 7.4.17) and the old stable version (currently 6.5.0). I will use 7.4.17 since it is the most current stable version.

Download the ISO you prefer, and if needed, you can also get the SHA256 hash and check the ISO to verify it is complete and not corrupt during the download.

After you download the file and verify if you want, you need a program like Balena Etcher to extract the ISO and place the files on a flash drive to boot from on a system.

Use a system that will have the following specs, or better:
  • CPU - x86_64, x86, ARM
  • RAM - 4 GB or more
  • Storage - SSD drives, multiple needed for RAID, hard disks work too
  • NIC - fast speed preferred - wired, Wi-Fi
When it gives you multiple choices, the first option is the best. For example, prefer SSD drives over hard disks since SSD devices are faster.

Speed is the key to better performance when sharing files, especially if the number of users may be high.

NOTE: Be aware that Debian overwrites and loses any data on the disks, especially the drive being used for installing OMV onto it.

Boot from the flash drive you created from the ISO. After it boots, we see an installation screen similar to Figure 1.

Figure 01.JPG

FIGURE 1

After Debian loads the installer, it asks you the following, just like setting up Debian:
  • Select a language
  • Select your location
  • Configure the keyboard
There are more steps to go through, but there are some spots between these options where components are installed. After you set the keyboard configuration, the setup will start loading network settings and finding DHCP settings. After it configures DHCPv4, it will attempt to set up DHCPv6. If it cannot, the screen will remain blue with a gray line at the bottom. Should you press a button on the keyboard, you will see it appear at the bottom in the gray line. If this occurs, you need to be ready to disconnect the network cable and press CTRL+C. This will restart the network configuration. Once you see that the system is detecting settings for DHCPv6, remove the network cable. DHCPv6 detection should fail, and you will then see a screen, like in Figure 2, to set the Hostname.

Figure 02.JPG

FIGURE 2

NOTE:
Wait a few seconds to see if the Hostname query appears. If not, you may need to try a few times to get the network to work properly. If you unhook the network for the entire process, then it does not detect the network and it does not install DHCPv6.

Leave the Hostname as it is, or change it as needed. Press 'Enter' to continue when you have set the name.

The next screen will ask for the Domain Name for your network. The default is 'local'. Once you make your choice, press 'Enter'.

The next two screens will let you set and verify the password for the 'root' user on the system.

NOTE: There is a Web User Interface (Web UI) that you can use remotely on the network to administer the OMV system. To log into the Web UI, you will use the root user and password.

The installation presents you with screens asking for more information:
  • Configure the clock
  • Partition disks - warns about selecting the proper disk
  • Partition disks - lets you choose the disk to erase and install Debian onto
The installer will format the selected disk, copy the Operating System onto it and perform the installation according to the choices you previously made.

It asks you to select the package manager by first selecting your country. After you choose the country, it asks you to select a repository from the country you chose. We will look into setting a better choice, but for now, just choose the first one.

Next, the system prompts you for the proxy. Enter the information if you have one. If you have no proxy, then press 'Enter'.

The system should download some files and set up everything necessary. Once the installation is complete, the system will reboot. Remove the flash drive you used to start the install and let the system boot from the drive you installed the system to during installation.

A GRUB menu should appear and automatically choose the OMV as the boot system.

After everything loads, the system will stop at the prompt for a username, as shown in Figure 3.

Figure 03.JPG

FIGURE 3

Here, we see some important information. The server IP Address is '192.168.1.220', which will vary depending on your network and DHCP Server. From a remote system, you can open a web browser and type in the address. After loading the page, you’ll see a site similar to Figure 4. Here, as it said in Figure 3, the username is 'admin' and the password is 'openmediavault'. We can change this too, but for now, this can get into the Web UI.

Figure 04.JPG

FIGURE 4

NOTE:
The Web UI has no ability to give you a Command-Line Interface (CLI). If you need to run commands in the shell, then you can log into the server itself or SSH into the server. Use the command 'ssh root@<ip-address-of-OMV>'. The system prompts you for the root password after you accept the keys the first time you connect.

Configure Repositories

As I had stated previously, we will set up a general repository for downloading updates, but we need to look into making the option better. By this, I mean to find a faster repository.

So, log in to the OMV Server as root (not the Web UI) and use the password you set during installation.

To find a faster repository, we need to get a configuration tool, but we need an updated list from the existing repository:

Code:
apt update

Once it updates the file list from the repository, you can install the tool we need:

Code:
apt install netselect-apt

If it shows a 'changelog', press 'q' to quit the editor to allow the install to complete.

After it installs the tool, you can start the tool. The tool will test all the repositories and find the ten fastest. It will then update the local list of repositories to use when performing updates:

Code:
netselect-apt

Since you logged in as 'root', you do not need to use the 'sudo' command.

After the tool's task is complete, you can exit back to the login prompt.

Update the System from Web UI

After logging into the Web UI, you’ll see a screen similar to Figure 5.

Figure 05.JPG

FIGURE 5

Here, we can see in the top right corner, there is a bell with a '1' above and to the right of it. This shows there is 1 notification. If you click on the bell, you can see the notifications listed, if there are any. My notification is that there is a system update available. You can click on the notification to go to the section of the Web UI to manage the issue.

Otherwise, you can go to the option 'System -> Update Management' in the left pane. In the right pane, select 'Updates'. You should now get a screen like Figure 6.

Figure 06.JPG

FIGURE 6

In Figure 6, you can see that my system has 114 updates available. If you click on the down-arrow icon, where it shows there are 114 updates, the system gives a pop-up to ask you to confirm that you want to proceed. Click on the 'Confirm' checkbox and then click on the 'Yes' button. The updates should now occur in a window, showing you the progress.

Any time you perform a function that will change the system, it shows the confirmation screen. Whenever it displays information in a terminal window, do not close it until you see the line saying 'END OF LINE'. Select the 'Close' button.

The Web UI should refresh and then a yellow box appears, as in Figure 7. It wants you to verify before applying the changes. Click on the check mark at the right of the yellow box to apply the changes.

Figure 07.JPG

FIGURE 7

Configure the Web UI


Select 'Dashboard' in the left pane. There should be an 'Information' box in the right pane with 'The dashboard has not yet been configured. To personalize it, please go to the settings page.'. Click on the link for 'settings page'. Here, you can select which widgets will appear on the 'Dashboard'. Keep in mind that the more widgets you use, the more resources you take from the system. When you have made your choices, click 'Save' at the bottom of the list.

If you want to change the password for the 'admin', then click on the person icon in the top right of the Web UI. When you hover the mouse over the icon, it should say 'User Settings'. Click on it, then choose 'Change Password'. You will then need to type I the new password and verify it. Click on 'Save' when done.

Adding Shares

We assume extra disks are connected to the OMV server; whether internal or external doesn't matter. The only difference is that you cannot use drives connected by USB in software RAID.

In the Web UI, go to 'Storage' and then 'File Systems', as shown in Figure 8.

Figure 08.JPG

FIGURE 8



Here, you can see that no extra disks have been set up for sharing. Click on the '+' above the empty list and select a file format for the disk you want to add. The choices are:



  • BTRFS
  • EXT4
  • F2FS
  • JFS
  • XFS


The choice of which to use is up to you. In my example, I will choose 'EXT4'. Next, the screen shows your format selection and a drop-down list of drives. Choose the drive you wish to format with the selected choice. Click 'Save' and the system will format the device. Depending on your choice, as well as the size of the drive, this process can take a while.

Once you see the 'END OF LINE' message, you can select 'Close'. The next screen you see, Figure 9, lets you set the File System to mount. Since it is a drop-down box, select the drive you just formatted. The next line is a 'Usage Warning Threshold'. The default value is set to '85%'. When the drive gets filled to the amount set, it gives a notification that the drive is getting full. Click on 'Save' to save the configuration. Once the screen returns to the menu, the yellow box will appear to verify the changes you made. Click on the checkbox to approve the changes.

Figure 09.JPG

FIGURE 9

The Web UI should now show the added storage device and that it is 'Online'.

NOTE: Be aware that when you add a storage device and mount it, it places it into the '/etc/fstab' file. It lists the additional mounts made by OMV with '[openmediavault]' tags. Do not remove these tags.

Now that we have added a drive, let's share it.

Go to 'Storage' and then 'Shared Folders' in the left pane. The system lists any existing shares in the right pane. Click on the '+' sign to add a shared folder, and you should see a screen similar to Figure 10. Here, we can name the share, which I will call 'NFS-01'. From the drop-down list, choose the drive to share. The 'Relative Path' should mirror the share name you entered. Next, you can set basic permissions for the share:
  • Administrator: read/write Users: no access Others: no access
  • Administrator: read/write Users: read-only Others: no access
  • Administrator: read/write Users: read/write Others: no access
  • Administrator: read/write Users: read-only Others: read-only
  • Administrator: read/write Users: read/write Others: read-only
  • Everyone: read/write
Figure 10.JPG

FIGURE 10

NOTE:
The 'Relative Path' is the folder location on the drive you specify. So, each of these 'Shared Folders' is just that, folders that may or may not exist currently, but will be folders placed on the specified drive. If a folder exists, just change the 'Relative Path' to duplicate the folder name, and it is shared. Also note, you cannot add shares to the system drive where OMV is installed.

For this example share, I will use 'Administrator: read/write Users: read-only Others: read-only'. Click on 'Save' and then the checkbox in the 'Pending' section.

Now that it sets the folder up to share, we need to specify the way it is shared. For this example, we will add an NFS share. Click on 'Services' in the left pane and then 'Shares'. The right pane should show any existing NFS shares already in existence. Click on the 'plus sign' and you can add a new share type, as shown in Figure 11. In the 'Shared Folder', select the share that was previously set up. For the 'Client' option, you specify a single system or an entire network. For example, my network is '192.168.1.0/24' so I can specify any device on the network, or if I am going to share a folder to a server for storing a database, backups, etc, then I can specify the IP Address of the server itself. To set 'Permissions', we can select 'Read-only' or 'Read/Write'. The 'Permission' option is strictly based on your needs. The 'Extra Options' is put into the '/etc/exports' file, and the options specify how the share is accessed by systems. Usually, the defaults are fine. More details can be found at 'https://manpages.debian.org/trixie/nfs-kernel-server/exports.5.en.html'. Click on 'Save' and then click on the check mark to apply pending changes.

Figure 11.JPG

FIGURE 11

For SMB, or Samba shares, you can set up more permissions using Access Control Lists (ACL), set up Time Machine support, Transport Encryption and more. Each service share type will have its own options.

I am mainly covering the use of NFS for a future article, where we will need access to set up a NAS and use network share points to store data.

RAID

OMV does not enable software RAID by default on OMV. You need to click on 'System' and then 'Plugins'. In the right pane is a listing of plugins, but we can type 'openmediavault-md' in the search box. Once it shows the single plugin, click it and then select the down arrow icon to download the plugin. 'Close' the window once you see 'END OF LINE'. The plugin is now installed and enabled.

When you click on 'Storage', there should now be an option for 'Multiple Devices'. Here, you can choose multiple drives, as long as they are not USB drives, and set up a software RAID to set up a share that will support fault tolerance.

Conclusion

The article is a basic overview to get you started on installing and using a Network Attached Storage (NAS) device that is not an actual NAS hardware device.

We can use the shares for multiple reasons, including fault tolerance. As we will see in a future article, we can use the share for servers, such as Proxmox.

Keep in mind that the installation I covered was to place OMV on physical hardware, but we will see later how to install it as a Virtual Machine.
 


Follow Linux.org

Members online


Top