8.8 KiB
OpenMediaVault
NAS solution based on Debian Linux.
- TL;DR
- First access
- Suggested first steps
- Create users
- Make users OpenMediaVault administrators
- Disable the default
adminuser - Configuration backup
- Wake On Lan
- Power management
- OMV Extras
- Antivirus
- UPS
- ZFS
- Further readings
TL;DR
Default web UI login is admin:openmediavault.
# Make users OMV administrators.
usermod -aG 'openmediavault-admin' 'me'
gpasswd -a 'me' 'openmediavault-admin'
adduser 'me' 'openmediavault-admin'
# Allow users to connect via SSH.
usermod -aG '_ssh' 'me'
gpasswd -a 'me' '_ssh'
adduser 'me' '_ssh'
# Revoke WebUI access from the 'admin' user.
gpasswd -d 'admin' 'openmediavault-admin'
deluser 'admin' 'openmediavault-admin'
# Install plugins from the CLI.
apt install 'openmediavault-clamav' … 'openmediavault-nut'
# Install OMV-Extras.
wget -O - 'https://github.com/OpenMediaVault-Plugin-Developers/packages/raw/master/install' | bash
# Use ZFS.
# Requires OMV-Extras.
apt install 'openmediavault-kernel'
# Install the Proxmox kernel and reboot
apt install 'openmediavault-zfs'
zpool import -a
# Upgrade packages.
sudo omv-upgrade
# Move to the next release.
# Includes upgrading the OS to the next version.
# E.g.: Debian 11 -> 12 + OMV 6 -> 7
tmux new-session -As 'omv-release-upgrade' "sudo omv-release-upgrade"
Backup the current OMV configuration by backing up the /etc/openmediavault/config.xml file.
First access
The SSH and web UI servers are active by default on port 22 and 80 respectively.
The default web UI administrator login is admin:openmediavault.
This user cannot login locally, nor connect via SSH by default. It only can access OMV's web UI.
The root user's password is set during OS installation.
This user can connect via SSH by default.
Suggested first steps
- Create a custom user.
Make the new custom user a system administrator to avoid usingrootfor normal usage. - Make the new custom user an OpenMediaVault administrator.
- Change the
adminuser's password and disable it. - Disable SSH access for the
rootuser in Services > SSH.
Create users
Just do it as for any other GNU/Linux system:
useradd -mG 'users' 'me' && passwd 'me'
adduser 'me' && adduser 'me' 'users'
If the user needs administrator privileges, consider adding it to the sudo group:
usermod -aG 'sudo' 'me'
gpasswd -a 'me' 'sudo'
adduser 'me' 'sudo'
Make users OpenMediaVault administrators
Just add the users to the openmediavault-admin group:
usermod -aG 'openmediavault-admin' 'me'
gpasswd -a 'me' 'openmediavault-admin'
adduser 'me' 'openmediavault-admin'
Disable the default admin user
Only do this after you created another user and made it an OMV admin.
From the safest to the less safe option:
-
Lock the account:
chage -E0 'admin' -
Remove it from the
openmediavault-admingroup:gpasswd -d 'admin' 'openmediavault-admin' deluser 'admin' 'openmediavault-admin' -
Delete it completely:
userdel -r 'admin' deluser --remove-home 'admin'
Configuration backup
OMV's whole configuration is saved in the /etc/openmediavault/config.xml file.
Keep a backup of it somewhere outside the host running it.
Alternatively, consider using omv-regen as suggested in this thread.
Wake On Lan
The network interface must support this feature and it must be enabled in the BIOS.
WOL is not enabled by default in the kernel driver.
Enable the option under Network > Interfaces, in every NIC's settings you want to respond.
Power management
sudo apt install 'powertop'
sudo powertop --auto-tune
sudo powertop --calibrate
CPU governor
Enabling the Monitoring option under System > Power Management configures cpufrequtils.
For x86 architectures, this also sets the default governor to conservative. If the architecture is different, the
governor is set to ondemand.
Disk power options
By default disks have no power management configured.
Editing a disk under Storage > Disks will allow to set these options for it:
- Advanced power management.
- Automatic acoustic management.
Not all drives support this. - Spin down time.
- Write cache.
All the above options are configured using hdparm.
The APM values from the interface are resumed in seven steps.
To experiment with intermediate values:
-
Edit
/etc/openmediavault/config.xml. -
Find the
/storage/hdparmxpath. -
Change the values for the disk.
-
Run this command:
omv-salt deploy run hdparm -
Reboot.
-
Check if APM has been set:
hdparm -I "/dev/sdX"
When setting a spin down time, make sure the APM value is set lower than 128. It will not work otherwise.
The web framework does not narrow the APM options if the spin down time is set, nor it disables the spin down option
when a value higher than 128 is selected for APM.
OMV Extras
From the CLI, as the root user:
-
Install OMV-Extras:
wget -O - \ 'https://github.com/OpenMediaVault-Plugin-Developers/packages/raw/master/install' \ | bash
Antivirus
- Install the
openmediavault-clamavplugin. - Enable the service under Services > Antivirus > Settings.
- Apply pending changes.
The first run will take a long time.
UPS
- Install the
openmediavault-nutplugin. - Enable the service under Services > UPS.
- Apply pending changes.
ZFS
-
Pick one:
-
[preferred] Install the
openmediavault-kernelplugin and use it to install the Proxmox kernel.Debian does not build ZFS kernel modules into any of their kernels due to licensing conflicts, and doing it manually may result in an extensive build process during installation, which is prone to errors.
The Proxmox-Debian kernel has the ZFS kernel modules preinstalled by default. As kernel upgrades become available and are performed, the userland for the Proxmox kernel will always have the required packages to support ZFS. -
Disable the kernel's backports APT sources and stick to the mainline one.
Warning
Linux backport kernels are released quickly enough to leave the userland incomplete at times. This happens often with ZFS, resulting in broken package issues.
mv -v \ '/etc/apt/sources.list.d/openmediavault-kernel-backports.list' \ '/etc/apt/sources.list.d/openmediavault-kernel-backports.list.disabled'
-
-
Install the
openmediavault-zfsplugin. -
Create new pools, or import existing ones.
Note
One might need to wipe the disks before creating new pools.
ZFS does provide ACL support, but it is not enabled by default.
Just enable that property in the pool or datasets.