How to set up your own NAS server
One of the most underrated business resources that catches up with most small and medium businesses is storage. Everything from storage and availability to management and security needs to be carefully considered.
This is where network attached storage (NAS) comes into play. Simply put, a NAS is a server that creates a data repository of centralized, shared storage accessible over a network.
Although you can buy NAS devices from storage vendors like Western Digital, Seagate, QNAP, Synology, and others, you can also assemble your own with a little effort. Doing this not only gives you more bang for your buck, but also helps create a scalable system that can easily grow with your needs.
OpenMediaVault (OMV) is one of the best Open source DIY NAS solutions available. The project targets home users and small businesses and in addition waiters, can also be installed on multiple Arm based single board computers, such as the Raspberry Pi 4.
Here is our handy tutorial for anyone who wants to run OMV on a Raspberry Pi.
OMV is simple to deploy and manage, thanks to its well-designed browser-based user interface, making it suitable even for non-technical users. It supports all common deployment mechanisms including multiple software RAID levels, and you can access the data in it using all common network protocols like SSH, SMB / CIFS, FTP, Rsync, etc.
The server also has an extensive permissions system to control access to shared volumes and folders.
Before jumping into the software aspect, you should first make sure that you have the right hardware for your NAS server. OMV has rather modest requirements and, as we mentioned, can even be run from SBC.
Of course, for a small business with dozens of users accessing data at the same time, you’ll need something with a lot more processing power. We would not recommend anything less than a multicore processor and 8 GB of RAM.
You’ll also need multiple drives, and OMV supports traditional hard drives, as well as SSDs. You will need one of at least 4 GB for installing OMV and several more for storage. Keep in mind that you will not be able to use the unused space on the installation drive to share files.
Installing OMV is fairly straightforward. Download the ISO from the project website, transfer it to a USB disk, and follow the basic steps.
Pay attention to the partitioning step, which is not as involved as in a typical Linux distribution installation, as OMV is designed to support the entire disk. However, since multiple disks are connected to the NAS enclosure, make sure to select the correct installation target during this step.
This takes care of the installation. You can now remove the installation media and restart the computer. It will boot into the OMV installation and drop you into the login shell. Log in using root and the user and password you specified during installation.
Remember to run the omv-first aid script to perform essential post-installation steps, including the ability to change admin interface login credentials.
On startup, OMV will also display the IP address of this machine. You can enter this address in a web browser on any computer on the network to access the OMV web interface.
Since you can manage all aspects of OMV remotely, once you are done installing it, you can disconnect the monitor and keyboard and run this computer as a headless NAS server.
The default login credentials for the web interface are administrator: openmediavault.
On a blank installation, OMV will invite you to configure the dashboard, by activating all or some of the widgets available in the Settings> Dashboard page.
The navigation panel on the size side of the screen is divided into several sections. The System menu allows you to configure several aspects of the NAS server, such as web administrator password, server date and time, configure scheduled tasks, enable plug-ins and keep the system up to date. .
You must first format the disks before you can use them. Head toward Storage> Disks to display all attached disks. Select the drive and click on the Wipe button. After erasing a drive, head to Storage> File Systems to create a file system on the drive, if you plan to use the disks individually.
However, the best option is to link multiple drives to a RAID device for increased fault tolerance. Although it defaults to RAID 5, OMV supports all common RAID levels.
Head toward Storage> RAID management and click on the Create button to start the process. select the disks you want to use in the RAID as well as the RAID level. Then enter the name you want to use for the RAID device in the space provided and click the button Save button. If you do not have the minimum number of disks required for the selected RAID level, OMV will not allow you to continue.
Wait for the RAID to initialize before creating a file system. To use the physical disks or the RAID array, you must create a file system.
Head toward Storage> File Systems and click on the Create button. In the dialog box that appears, select the device you want to format using the drop-down menu.
The menu lists the individual drives that you have erased as well as any RAID devices. Use the drop-down menu to select a file system for the drives / NAS. OMV supports EXT4, EXT3, XFS, and JFS file systems.
Regulate data access
Before you can store data on the NAS device, you will need to create one or more users.
Head toward User management> Users to add or import users. When you add an individual user, you can also add them to an existing group. By default, all users are added to the user group. You also have an option to prevent a user from making changes to their own account.
Then you will need to add at least one shared folder. Depending on how you plan to use the NAS, you can create multiple folders with different user permissions as needed.
To add a folder, go to Storage> Shared folders and use the drop-down menu to select the folder volume.
Pay close attention to the Permissions setting. By default, OMV only allows the administrator and any users you added to read and write data to this folder, while others can only read its contents.
This is a fairly safe default for most installations, but you can select a more restrictive or liberal permission setting from the drop-down list.
Even if you select the Default permissions setting when creating folders that allow all users to read and write data in the folder, you can fine-tune access permissions and prevent certain users or groups from accessing or modify the contents of a particular folder.
To do this, after adding a user, return to Storage> Shared folders, select the folder to which you want to control access and click the button Privileges button. This will open a window with a list of all the users you have added along with checkboxes to control their access to that folder.
Finally, activate a network service that users will use to access shared folders from the Services section and register the folders shared with the service from the Shares tab. Your users can now access these shared folders on your network.
That’s all there is to it !. You should now be able to access all of the shared folders you created on the NAS device from any computer on the network, whether they reside on an individual drive or on a RAID array.
You can either use the built-in network function of your file manager to access network shares or enter the IP address of the NAS device in the location box, for example: smb: //192.168.3.111.
You will be prompted to enter a username and password before you can access the folders. Enter the credentials of the user who has the appropriate permission to access the folder.
Once verified, OMV will mount the shared folder. You can now upload files to the shared folder or delete them, if you have permission, just like in a regular folder.
We’ve just explored OMV’s basic NAS features here. But OMV is very nimble and we encourage you to visit its Plugins section to get a taste of some of its improvements.