Upgrade OMV 4 to 5: A Painful Path

OpenMediaVault, as a popular NAS solution, has released "Usul" for months. Somehow there is no built-in ways to upgrade between major releases. The actual best upgrade solution is a clean installation.

· 5 min read
Upgrade OMV 4 to 5: A Painful Path

OpenMediaVault, as a popular NAS solution, has released usul for months. Somehow there is no omv-release-upgrade or other built-in ways to upgrade between major releases. Based on Debian upgrade process, a basic upgrade path could be figured out by simply changing repositories version. But there are actually many more jobs to be done.

Regular Debian Upgrade Process

Unlike OMV 4 "Arrakis" that runs on Debian 9 "Stretch", OMV 5 "Usul" requires Debian 10 "Buster". This means the base system is also needed to be upgraded at the same time.

# sed -i 's/arrakis/usul/g'   /etc/apt/sources.list.d/openmediavault.list
# sed -i 's/stretch/buster/g' /etc/apt/sources.list
# apt update
Change release codename in source lists

Then upgrade everything but keep local configuration.

# apt -y --auto-remove --allow-downgrades --no-install-recommends upgrade
# apt -y --auto-remove --allow-downgrades --no-install-recommends dist-upgrade
Upgrading all packges to next release

After dealing with all the prompts and a graceful reboot, OMV 5 is now running on Debian 10.

Everything goes well so far. But wait!

Nginx 502 Error

When accessing the web panel, I got multiple errors thrown. I immediately ran omv-firstaid to clean web panel cache, but after that it completely died with nginx returning HTTP 502.

I searched for this problem and find the solution is rather easy - reinstalling OpenMediaVault packages (as on a Debian box).

SOLVED Upgrade from OMV 4 to OMV5 - openmediavault
Hello,I have found another to make the upgrade and it worksrm /etc/apt/sources.list.d/omv-extras-org.listvi /etc/apt/sources.list.d/openmediavault.list-Write in it deb https://packages.openmediavault.org/public usul main-empty other lines- Upgrade debian…
# apt -y purge openmediavault
# apt install -y --auto-remove --allow-downgrades openmediavault
# omv-confdbadm populate

Now run omv-firstaid and it would not kill OMV anymore. Then the web panel should be accesible now.

Database Conversion and Migration

The first time I logged into its web panel, I noticed that Samba service was enabled but not running with a red dot sign. I went directly to the configuration page, disabled and enabled Samba service, then clicked "save" button. A series of operations gave me nothing but a dialog box with error messages:

The property 'localmaster' does not exist in the model 'conf.service.smb'.

There is a smiliar issue in project repository on GitHub.

The property options does not exist in the model conf.system.network.interface · Issue #282 · openmediavault/openmediavault
While installing the omv5 package on a fresh Debian Stretch system. Running # omv-confdbadm populate. Got error; The property 'options' does not exist in the model 'conf.system.network....

Since the database backend has been changed during the upgrade from version 4 to 5, some migration processes are required. This type of errors could be led by missing migrations. To solve the problem, we just go through them manually:

# omv-confdbadm migrate conf 5.0.0
# omv-confdbadm populate

Error "hostname: Name or service not known”

The web panel works now, except every time I log in will see an error message "hostname: name or service not known" for the first time.

To solve the problem, open /etc/nsswitch.conf and add myhostname to hosts section.

...
hosts:          files mdns4_minimal [NOTFOUND=return] dns myhostname
...
/etc/nsswitch.conf

It should now be fixed, and could be verified by running hostname --fqdn in terminal.

Plugins versus Containers

Coming into the fifth version, OpenMediaVault keeps most of the plugins but drops nearly all the applications including transmission and syncthing. Luckily these could be also served via adding omv-extras and installing Docker.

Why should you use or not use dockers - openmediavault
Hi all , so the question is why should I use dockers ? Is there any advantage ?

OMV provides Docker plugin in version 4, too. But there are some changes regarding user interfaces of the containers and virtual machines application. The old openmediavault-docker-gui is gone, and replaced by Portainer. The latter is a frontend for managing Docker and docker-compose. Virtualbox is no longer provided in Debian Buster, so KVM is the replacement and Cockpit is introduced as the web UI for virtualization, web terminal and some other enhancement.

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

After omv-extras source is configured correctly, go to the "OMV-Extras" section in the web panel and install Docker as well as Portainer. Cockpit could also be installed in this section.

What has to be admited that that is a tendency in conversion to containers. FreeNAS also migrates to container solution by running a virtual Linux Docker machine. This brings flexibility and convience in maintaning. But for home users, this is a huge loss in convenience and usability.

Missing /sharedfolders/

From the OMV 5 release notes, shared folders are not automatically mounted to /sharedfolders/ by default because it "makes too many problems".

Disable the ‘/sharedfolder/’ feature by default on new installations because it makes too much problems. It can be enabled by setting the environment variable to OMV_SHAREDFOLDERS_DIR_ENABLED="YES". Finally run the command omv-salt stage run prepare to apply the modified default values and omv-salt deploy run systemd to create the unit files.

The Status Quo

Parts of my OMV 5 installtion might still not work. but it now provides around the same services as OMV 4 did. Though missing (and will not get) some essential plugins, it runs smoothly on Debian Buster. Meanwhile, OMV 4 has gone into end of life status, but that might be the only reason to upgrade to version 5.

If you are a newcomer that starts with OMV 5, you are lucky. But you still need to remember: when OMV 6 releases, and OMV 5 comes to an end, then a fresh install with configuration backup would still be a more practical way rather than upgrade.