...

Build Your Own NAS with Raspberry Pi 4 and Openmediavault: A Cost-Effective Solution for Backup Needs

If you’re looking for a small NAS with 2 drive bays, you can get one for less than $250 (e.g. QNAP). However, you can also build a “real” NAS yourself with a Raspberry Pi 4 and a powerful NAS software like openmediavault.

For backup purposes, you can build a NAS with approximately 10TB storage capacity. You’ll need the following components: a Raspberry Pi 4 with 4GB, a matching power supply and case, a 32GB SD card (Sandisk), an dual 3.5” Harddrive enclosure without RAID, and 2 WD RED 6TB HDDs. Of course, you can adapt these components to fit your needs.

Keep in mind that the Raspberry Pi currently doesn’t have SATA, so the drives are connected via USB 3.0. Therefore, you shouldn’t expect top transfer rates. However, the throughput is still quite decent at times, reaching over 100MB/s. It’s more than enough for backup purposes. Note that openmediavault doesn’t support RAID over USB, so you’ll have to address the drives individually. Also, don’t install any other software on the Pi, as openmediavault should be the only thing running on your NAS.

For the OS, you can use DietPi, which is based on Debian. DietPi is a lightweight and efficient OS, and openmediavault is a mature and reliable NAS software with many features.

Here’s how you can install it:

  1. Download the proper version of DietPi for your SBC and write it to the SD card using a tool like Belena Etcher.
  2. Boot the Raspberry Pi and go to the IP address via ssh.
  3. Access the Pi using root as the username and dietpi as the password. Update the system.
  4. Make sure to switch from Dropbear to OpenSSH Server for the installation of openmediavault to succeed. This will generate a new key, so you may receive an error after logging in again. You’ll need to change the known_hosts files in the .ssh folder accordingly.
  5. Further adjustments, such as language, time zone, or overclocking, are recommended. Finally, assign a fixed IP address after a reboot.
  6. Install openmediavault by entering the following command:

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

    The installation process is fully automatic and quite extensive, so it may take a while. It took me about 15 minutes. So be patient and then perform a reboot.

  7. Go to the IP address of the Pi in your browser. Log in with admin as the username and openmediavault as the password. Then, follow the appropriate settings and configurations.

Enjoy building your own NAS!