OMV 6 to 7 Upgrade Summary - successfully upgraded

  • This is not a question post, but a summary, for myself, for Chinese users, and for OMV.


    As a long time user of OMV, I have been using it from 5 to 7, and have gradually grown from a novice to a veteran.

    When OMV 7 was released, I paid attention to it for a while, but I didn't upgrade it because I was quite busy at that time, and recently I had the time, so I started to upgrade it.


    The process of upgrading was really bumpy, and it took me a whole day of work yesterday (haha, yes, I did the upgrade remotely from my home during work hours). I encountered a lot of problems, and the only platform I had to turn to for help was OMV's Forum.


    First of all, I'd like to summarize a few key points about upgrading:

    1, don't apt upgrade! (When I was paying attention to OMV 7, I noticed that this version is based on Debian 12, so I thought I should upgrade Debian OS first, which was my problem, after trying apt upgrade for 4 times, I gave up and used the more aggressive method, omv-upgrade. (I didn't expect it to work, haha, again, I apologize for my stupidity.)

    2, users in China must first apt update before upgrading to confirm that the current network can normally access GitHub and other blocked sites, if you can't access it's okay, use the ladder to go there, I use v2rayN, and then configure the proxy in Debian, don't need to configure the global proxy, but rather the apt and wget ones. It's not necessary to configure a global proxy, but an apt and wget one.


    The configuration commands on the OMV server are as follows (yes, you read that right, the https proxy has to be written as http protocol as well):


    For apt

    Code
    #echo 'Acquire::http::proxy "http://192.168.31.177:10808";' | tee -a /etc/apt/apt.conf
    #echo 'Acquire::https::proxy "http://192.168.31.177:10808";' | tee -a /etc/apt/apt.conf

    For wget

    Code
    #echo 'https_proxy=http://192.168.31.177:10808' | tee -a /etc/wgetrc
    #echo 'http_proxy=http://192.168.31.177:10808' | tee -a /etc/wgetrc
    #echo '#check_certificate = off' >> ~/.wgetrc


    Change my IP address to the address of your computer running v2rayN, then paste it directly to the prompt and execute it!


    3, the real upgrade steps, just three commands:


    Code
    omv-salt stage run deploy
    omv-upgrade
    omv-release-upgrade

    It doesn't matter if you make a mistake, go to the following command to remedy the situation:


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


    4, even if omv-salt reports no errors, you may encounter an error message similar to the following after upgrading:

    Code
    [ERROR   ] Command '['dpkg-divert', '--add', '--local', '--no-rename', '--divert', '/tmp/_etc_default_avahi-daemon', '/etc/default/avahi-daemon']' returned non-zero exit status 2.

    Don't worry, after trawling through tons of threads, I found the following command for a foolproof solution:


    Code
    dpkg-divert --local --no-rename --remove /etc/default/avahi-daemon

    If you are smart, you can see the pattern, move the path of etc mentioned in the ERROR to the back of remove parameter of the above command, and execute as many ERRORs as there are, I have executed 13 of them.



    All the above commands need root user to operate, if you are not a root user, please add your own sudo.



    5, it is still recommended that you deploy OMV in a virtual machine, so that it is really convenient to take snapshots before upgrading to make backups, you can try it at will.



    Well, the above are some lessons learned from this upgrade, I hope it helps. Finally, I would like to make a suggestion for OMV:


    Put the update requirements and FAQ of each version in a prominent place on the official website and OMV Forum, so that you don't have to search the vast OMV Forum based on keywords (I personally usually use to solve problems by myself and search by myself, instead of posting a question, and I think there must be a lot of people who want to do the same thing as I do, just like the post you see here. (I just registered today, not yesterday).


    Finally, thank you OMV team members for your dedication in providing such a quality software, and thank you for your patience in replying in the forums on weekdays to help more people.



    Since I found some newbie users from China while searching the forum posts, I thought it would be better to post the original Chinese text so that I can help them more easily.



    中文版:


    这不是一个问题贴,而是一个总结,为自己总结,为中国用户总结,为 OMV 总结。


    作为 OMV 多年的老用户,从5一直用到7,逐渐的从一个新手成长为了一个老手。

    OMV 7 发布的时候关注了一段时间,由于当时比较忙,就没有升级,而最近正好有时间了,于是才开始着手升级。


    升级的过程真的是很坎坷,花费了我昨天一天的工作时间(哈哈,是的,我在上班的时间偷偷远程到家里操作的升级)遇到了很多的问题,而我唯一的求助平台只有 OMV 的 Forum。


    在这里首先总结一下升级的几个关键点:

    1,不要 apt upgrade!(我之前关注 OMV 7的时候有注意到该版本基于 Debian 12,所以我以为首先要升级 Debian 操作系统,这是我的问题,在尝试了多达 4 次的 apt upgrade之后我放弃了,改用我以为更激进的方法,直接 omv-upgrade 来操作,没想到居然是可以的,哈哈,再次为我的愚蠢向大家道歉)

    2,中国地区的用户在升级之前一定要先 apt update 一下,确认当前网络能否正常访问 GitHub 等其他被封锁的网站,如果无法访问也没关系,使用梯子过去即可,我自己用的是 v2rayN,然后在 Debian 中配置代理即可,不需要配置全局代理,而是 apt 和 wget 的就可以。


    OMV 服务器上的配置命令如下( 是的你没看错,https 的代理也要写成 http 协议):

    For apt

    Code
    #echo 'Acquire::http::proxy "http://192.168.31.177:10808";' | tee -a /etc/apt/apt.conf
    #echo 'Acquire::https::proxy "http://192.168.31.177:10808";' | tee -a /etc/apt/apt.conf

    For wget

    Code
    #echo 'https_proxy=http://192.168.31.177:10808' | tee -a /etc/wgetrc
    #echo 'http_proxy=http://192.168.31.177:10808' | tee -a /etc/wgetrc
    #echo '#check_certificate = off' >> ~/.wgetrc

    将我的 IP 地址改为您运行着 v2rayN 的电脑的地址,然后直接贴到提示符后执行即可


    3,真正的升级步骤,只需要三条命令:

    Code
    omv-salt stage run deploy
    omv-upgrade
    omv-release-upgrade

    出错了也没关系,上如下的命令进行补救:

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

    4,即便是 omv-salt 无任何报错,在升级之后也有可能会遇到类似如下的错误信息:

    Code
    [ERROR   ] Command '['dpkg-divert', '--add', '--local', '--no-rename', '--divert', '/tmp/_etc_default_avahi-daemon', '/etc/default/avahi-daemon']' returned non-zero exit status 2.

    不要担心,在翻阅了大量的帖子,发现了如下命令可以万能解决:

    Code
    dpkg-divert --local --no-rename --remove /etc/default/avahi-daemon


    聪明的你一定能看出规律,将 ERROR 中提及的 etc 的路径,移动到上面的命令 remove 参数的后面即可,有多少个 ERROR 就执行多少条,我是执行了13条。



    以上命令操作皆需 root 用户操作,如果非 root 用户,请自行添加 sudo



    5,还是建议大家把 OMV 部署在虚拟机中,这样在升级之前做快照进行备份真的是太方便了,可以任意的尝试。



    好了,上面都是此次升级的一些经验教训,希望帮助到大家。最后,我还想为 OMV 提建议:


    在官网和 OMV Forum 的比较醒目的位置放置一个每一个版本的更新需求,及 FAQ,这样就不用在浩瀚的 OMV Forum 中基于关键字去检索了(我个人在遇到问题的时候通常习惯自己解决,自己搜索,而不是去发帖咨询,我想,想我一样的人一定也不在少数,就像您看到的这篇帖子,也是我今天刚注册的,而非昨天)


    最后,感谢 OMV 团队成员的付出,提供了这样优质的软件,同时,也感谢你们平日里在论坛中耐心的回复,帮助到了更多的人。

  • KM0201

    Approved the thread.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!