Files
oam/knowledge base/openmediavault.md
2023-11-18 19:48:55 +01:00

6.0 KiB

OpenMediaVault

NAS solution based on Debian Linux.

Table of contents

  1. TL;DR
  2. First access
  3. Make other users administrators
  4. Remove access for the default admin user
  5. Wake On Lan
  6. Power management
    1. CPU governor
    2. Disk power options
  7. OMV-Extras
  8. ZFS
  9. Further readings
  10. Sources

TL;DR

Default web UI login: admin:openmediavault
The root password is the one set during installation.

# Make other users administrators.
gpasswd -a 'me' 'openmediavault-admin'
usermod -aG 'openmediavault-admin' 'me'

# 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'

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

# Disable the kernel's backports sources.
mv -v \
  '/etc/apt/sources.list.d/openmediavault-kernel-backports.list' \
  '/etc/apt/sources.list.d/openmediavault-kernel-backports.list.disabled'

First access

Default web UI login: admin:openmediavault
The root password is the one set during installation.

Make other users administrators

Just add the user to the openmediavault-admin group:

gpasswd -a 'me' 'openmediavault-admin'
usermod -aG 'openmediavault-admin' 'me'

Remove access for the default admin user

Only do this after you created another user and made it an admin.

From the safest to the less safe option:

  1. Lock the account:

    chage -E0 'admin'
    
  2. Remove it from the openmediavault-admin group:

    gpasswd -d 'admin' 'openmediavault-admin'
    deluser 'admin' 'openmediavault-admin'
    
  3. Delete it completely:

    userdel -r 'admin'
    deluser 'admin'
    

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

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.
  • Spindown 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/hdparm xpath.

  • 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 spindown 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 spindown time is set, nor it disables the spindown option when a value higher than 128 is selected for APM.

OMV-Extras

From the CLI, as the root user:

  1. Install OMV-Extras:

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

ZFS

  1. [Install OMV-Extras].

  2. Pick one:

    • Disable the kernel's backports APT sources and stick to the mainline one.
      Linux backport kernels are released quickly enough to leave the userland incomplete at times. This often happens 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-kernel plugin and use it to install the Proxmox kernel.
      Debian does not build ZFS kernel modules into any of their kernels by default due to licensing conflicts. This 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.

  3. Install the openmediavault-zfs plugin.

  4. Create pools and such.
    You might need to wipe the disks first.

ZFS provides ACL support, but it is not enabled by default.
Just enable property in the pool or dataset.

Further readings

Sources

All the references in the further readings section, plus the following: