Skip to main content
  1. Blog/

Open Media Vault

·867 words·5 mins
Author
Kees Fluitman
I am a pedagog, hobbyist, allrounder and self-taught beginning software engineer. I am also a privacy advocate and enjoy privacy enhancing technologies.
Table of Contents

Even without knowing much about IT, we are constantly confronted by our dependency on data and digitalization. Every free app and every cloud solution give away valuable information about ourselves, often very personal. Amidst the chaos of open-source and self-hosting, I argue that a self-hosted solution can be reliable and future-proof, especially with the support of a local IT enthusiast.

Initially blind and ignorant to the complexities, embarking on this journey has been both challenging and exciting. I’ve opted to self-host almost everything on a 7-drive Unraid Server, using mid-range components I had lying around. I’ve become increasingly anonymous and learned much about Linux, backup, networking, and security. However, when my Unraid server encounters issues, I find myself in a bind.

I plan to delve into my Unraid server in another post, but for now, I’ll construct the argument that, with some help and knowledge, even a small server can offer great reliability. With today’s hardware availability, replacements in case of problems are not difficult. In my quest for solid functionality without resorting to pre-made NAS solutions like Synology, I sought something well-maintained, robust, and configurable. Initially, CasaOS seemed promising for their beginner-friendly GUI. However, its focus on aesthetics over functionality limited its configurability, leading to potential confusion and maintenance challenges. It was even challenging to configure the location of app data, docker, and thus, maintain a good habit for backup solutions. After much consideration, I chose “openmediavault 6.0,” a NAS system based on Debian, which offered an opportunity to learn about Debian and devise an effective backup strategy.

Openmediavault appealed to me for several reasons:

  • True to Linux, it offers extensive customizability through the GUI or command shell.
  • It has excellent backup integration.
  • The system supports a range of solid plugins to extend its functionality.
  • It offers robust Docker implementation (and I can use my own docker-compose files if preferred).
  • The GUI integrates various types of logging and basic monitoring.
  • Its customizable notification system supports email, webhooks, etc.
  • So far (after 2 weeks of use), it has never crashed and maintains low memory/CPU usage.

My Plan
#

My plan involves a solid 321-backup strategy, ensuring that any hardware or software crash is easily recoverable. The principle is to always have 3 copies of your data, on 2 different media, with 1 copy stored offsite. Best practices include:

  • Keeping the OS on a separate drive, so the OS backup is an image solely of the OS.
  • Storing app data and Docker data on another drive, allowing for smooth recovery without interference.
  • Keeping actual data on a third separate drive.

In this setup, if any of the drives fail, I have a copy of that specific data (OS, app data, or data) and can restore it as it was, fully functional with the other drives. For example, if the app data drive fails, Openmediavault will continue functioning, and my Docker instance will still run, as it’s installed on the OS drive. My ‘hard data,’ like photos or files, remains unaffected. I simply replace the drive, restore from Openmediavault’s backup functionality, and restart. Everything remains in sync, with all settings in the OS correctly pointing to the app data locations.

N|Solid

Hardware
#

I’ve chosen one of my old Intel NUCs. They were barely used and possess adequate CPU and memory power for generating and loading previews. Ideally, I’d run a VPN network like Tailscale, a DNS server like Adguard and Unbound, and other useful tools. However, these might require redundancy, as your internet access is compromised if your DNS server goes offline.

In the structure diagram, you can see that I run the OS itself on a USB drive. Openmediavault has effective ways to minimize the load on the USB drive, which is prone to failure if written to frequently. This leaves me with two SSD slots for app data and photos. I’ve explored numerous imaging backup solutions like fsarchiver, thoroughly tested with systemrescue. Additionally, I’ve dabbled with grub-install to address potential partition or boot issues. I’ve found that effective recovery depends on the new drive being at least as large as the old one, although it’s not an insurmountable problem if that’s not the case.

FSArchiver works at the file level. It can archive filesystems (ext4, ext3, xfs, btrfs, reiserfs, ntfs, etc.) that the running kernel supports with read-write access. It preserves all standard file attributes (permissions, timestamps, symbolic links, hard links, extended attributes, etc.), as long as the kernel supports them. It also supports all Windows file attributes (ACL, standard attributes, etc.) and can be used with LVM snapshots for consistent backups of all filesystems, including the root filesystem.

fsarchiver

A Difficult Choice
#

Even when considering deploying this setup for a friend, it remains a tough decision. An open-source NAS software with open-source applications, responsible for all data and photos?

I might still opt for a Synology server for them, for added peace of mind. However, the fact is that openmediavault is currently robust, manageable, and ideal for keeping OS, app data, and data cleanly separated and easily rebuilt. In contrast, my 5-bay drive Unraid server with 3 SSDs seems more daunting to rebuild in case of failure… this openmediavault idea might actually be more feasible!