OMV配置避坑

omv折腾笔记

关于’sharedfolders’

最近把omv升级到了5.5.14,总体来说很顺利。需要注意的是sharedfolders被默认关闭了,想要打开需要自己修改配置。
官方说明:https://github.com/openmediavault/openmediavault/commit/ce86619414c70c62847c2d24144c41d57ed4a5d8

可以自己修改配置打开此功能,编辑/etc/default/openmediavault,将OMV_SHAREDFOLDERS_DIR_ENABLED="NO"改为YES,然后运行

1
2
omv-salt stage run prepare
omv-salt deploy run systemd

熟悉的共享文件夹又回来了。不过我后来又把它关闭了,因为开着它,在有docker服务的情况下,添加共享文件夹的时候会发生错误。

无法删除已经不存在的硬盘

如果硬盘没有从系统里卸载而直接拔除 ,文件系统里会一直有这个丢失的硬盘,而且日志也会报错,无法直接从webui里删除掉,看着很不爽。这时候只能进配置文件手动删除它了。
编辑/etc/openmediavault/config.xml,将有关此硬盘的字段全都删除掉,特别要注意上下文的相关行,删错了xml会报错。然后执行:

1
2
3
omv-salt deploy run fstab
omv-salt deploy run hdparm
omv-salt deploy run monit

刷新网页就可以了。

omv5相关源都换为国内源

废话不多说,直接贴文件了。

/etc/apt/source.list

1
2
3
4
5
6
7
8
9
10
deb http://mirrors.aliyun.com/debian/ buster main
deb-src http://mirrors.aliyun.com/debian/ buster main

deb http://mirrors.aliyun.com/debian-security buster/updates main contrib non-free
deb-src http://mirrors.aliyun.com/debian-security buster/updates main contrib non-free

# buster-updates, previously known as 'volatile'
deb http://mirrors.aliyun.com/debian/ buster-updates main contrib non-free
deb-src http://mirrors.aliyun.com/debian/ buster-updates main contrib non-free

/etc/apt/sources.list.d/omvextras.list

1
2
3
4
5
deb https://mirrors.bfsu.edu.cn/OpenMediaVault/openmediavault-plugin-developers/usul buster main
deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/debian buster stable
deb http://linux.teamviewer.com/deb stable main
deb https://mirrors.bfsu.edu.cn/OpenMediaVault/openmediavault-plugin-developers/usul-testing buster main
deb https://mirrors.bfsu.edu.cn/OpenMediaVault/openmediavault-plugin-developers/usul-extras buster main

/etc/apt/sources.list.d/openmediavault-kernel-backports.list

1
2
3
#deb https://deb.debian.org/debian buster-backports main contrib non-free
deb http://mirrors.aliyun.com/debian buster-backports main contrib non-free

/etc/apt/sources.list.d/openmediavault.list

1
2
3
4
5
# deb https://packages.openmediavault.org/public usul main
deb https://mirrors.bfsu.edu.cn/OpenMediaVault/public/ usul main
deb https://mirrors.bfsu.edu.cn/OpenMediaVault/public/ usul-proposed main
deb https://mirrors.bfsu.edu.cn/OpenMediaVault/public/ usul partner

改完之后apt update,速度立马上去了。