DIY NAS: Setting Up OpenMediaVault on Raspberry Pi
My old D-Link DNS-320 NAS worked perfectly for years but recently broke. I needed a solution that was both quick and affordable—which is never easy. Fortunately, I had a Raspberry Pi 4 Model B lying around that I purchased a while ago and wasn’t using for anything important.v v My first step was to reinstall the OS. Since I’m using it as a NAS, I didn’t need a graphical interface. I downloaded the official Raspberry Pi Imager software and installed Raspberry Pi OS Lite (64-bit)—found under the Raspberry Pi OS (other) menu—onto my Pi’s SD card. I used a SanDisk Ultra MicroSD 64GB card I already owned, but a smaller one (16GB or so) would be more than enough.
During installation, you can pre-configure your Pi OS with settings like login credentials and WiFi access, so I did exactly that. Once the image was ready, I powered on the Pi with the card and accessed it via SSH using the name I chose during pre-configuration:
ssh nas-pi
As usual, the first thing to do after logging in is to make sure everything is up to date:
sudo apt update
sudo apt upgrade -y
The Pi was now ready to use, and the next step was to choose which NAS software to install. After researching open-source solutions, I decided to go with Open Media Vault (OMV) for this project. While other options like TrueNAS Core have great reputations, OMV seemed quicker to set up and required fewer resources. It may lack some advanced features, but for my needs, it felt like the best choice. I installed it using the official script:
wget -O - https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install | sudo bash
The setup takes a while and automatically reboots when finished, so I lost my SSH connection. I waited a few seconds for everything to start up, then accessed the OMV web UI from my other machine’s browser at http://<nas-ip-address>
. The default credentials are admin
(username) and openmediavault
(password), which allowed me to log in.
Next, I connected my NAS hard drives. My previous D-Link NAS setup used two 3TB hard drives in RAID-1 for data redundancy. The best way to connect both drives to my new NAS was with a dual SATA USB docking station from Tooq that I already owned. While it’s not ideal to connect RAID drives this way, it was my best option at the time. I placed both drives into the docking station and connected it to the NAS’s USB port. Then, using the OMV web app, I went to Storage > File Systems
and clicked the Mount
button.
After confirming the drives were recognized, it was time to share their contents. In the Storage > Shared Folders
screen, I added a new shared folder pointing to the root of the hard drive. If you’re setting this up yourself, you might want to share multiple folders and assign different permissions to different users, but my use case is simpler. I just need myself and others at home to access all NAS contents with read and write permissions, so I shared the root folder to keep things simple. Since everyone at home uses Windows machines, I also went to Services > SMB/CIFS > Settings
and made sure the Enabled
checkbox was on. Finally, went to Services > SMB/CIFS > Shares
and added a new share pointing to the same Shared Folder created previously.
I then configured users and permissions. Since I want everyone to have read/write access to everything, I logged back into the NAS via SSH and created a new group for this purpose:
sudo groupadd nas-writers
Then, using the OMV UI, I set up all the users I needed using the Users > Users
screen, making sure they were added to the nas-writers
group. With everything configured, it was time to test the setup.
To make accessing my NAS easier, I usually map a network drive. In Windows Explorer, I right-clicked on This PC
and chose Map Network Drive
. I entered the shared folder path and, when prompted, used the credentials I set up for my user in OMV.
Now I can see all my NAS contents, and I didn’t lose a single byte in the process. It couldn’t have worked out better!
In the future, I’ll consider a more robust solution—maybe purchasing a SATA HAT to connect the hard drives directly to the Raspberry Pi, replacing the USB connection. That would improve performance and help avoid unexpected connection issues between the Pi and the drives.
But for now, I’ll call it a day. See you in the next post!