====== OpenMediaVault (OMV) ====== At the time being, this page is merely a cook book regarding setting up an OMV (2.1) server, it hopefully will get more structured as time goes by... ===== Create USB Install Key ===== Download the latest (2.1 as of 20151105) .iso image of OMV from [[http://sourceforge.net/projects/openmediavault/|the OpenMediaVault Sourceforge's page]]. "Burn" it to a USB key. Boot the target machine with the created USB key.\\ **NOTE:** Make sure the **target media for installation** (HD, SSD, USB Key) **is recognized by the system as /dev/sda**, one might need to "play" with the BIOS boot options and/or physical plug order to achieve this. This is because the OMV installer won't let you choose a different target than **/dev/sda to install the grub loader**.\\ You can check and identify the available media using the "advanced options > Hardware Detection Tool (HDT)" option prior to launching the effective system install. ===== Proceed to OMV Installation ===== Follow the various installation steps. At the final reboot, remove USB Keys and make an .iso copy of the newly created OMV system. Identify the device using //**lsblk**// then //**dd**// to iso file: > lsblk ... sdb 8:16 1 7.2G 0 disk ├─sdb1 8:17 1 6.9G 0 part ├─sdb2 8:18 1 1K 0 part └─sdb5 8:21 1 351M 0 part ... > sudo dd if=/dev/sdb of=/path/to/omv-base.iso ===== OMV Base Config ==== Once the machine has rebooted using the newly created OMV system, log in to the system and check the DHCP allocated address of the system using //**ip addr show**//. Then login using the WebGUI with credentials admin:openmediavault. === Fixed IP === **NOTE:** for a "production" system it might be time to set a fixed IP to a NIC. === SSH server === First thing we'll do is go to the "Services > SSH" panel and activate the SSH service. === Session timeout & Admin password === In "System > General Settings" set Session timeout to your preference (20 here) Next we'll change the admin password in "System > General Settings > Web Administrator Password". === Date & Time === Activate NTP server in "System > Date & Time" (be.pool.ntp.org) === System update === One can use the WebGUI "System > Update Manager", but we'll prefer loging in via ssh and using //**apt-get update**// then //**apt-get upgrade**//, so we get a better view of the process advancement and possibly of errors... === Additional packages === We'll install a couple of useful CLI packages: > apt-get install htop ranger tmux === System Backup === As we'll start to "experiment" with potentially system breaking plugins, let's create a new iso copy we could revert to in case of major problem (see dd command above). ===== Plugins ===== ==== OMV-Extras (2.2) ==== The first plugin we need to install is the [[http://omv-extras.org/simple/index.php?id=how-to-install-omv-extras-plugin|OMV-extras plugin]], as it will open us the access to all the fancy plugins we long for. Once again we'll choose the CLI installation to have a better view of the process: > wget http://omv-extras.org/openmediavault-omvextrasorg_latest_all.deb > dpkg -i openmediavault-omvextrasorg_latest_all.deb ... dpkg: dependency problems prevent configuration of openmediavault-omvextrasorg: openmediavault-omvextrasorg depends on apt-transport-https; however: Package apt-transport-https is not installed. ... Let's try to fix this by installing the //**apt-transport-https**// package: > apt-get install apt-transport-https ... You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: apt-transport-https : Depends: libcurl3-gnutls (>= 7.16.2) but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution). Trying to fix things further: > apt-get -f install Seems to do the trick... Reload OMV WebGUI, the "System > OMV-Extras.org" icon is present, let's go to this panel and activate the following: * OMV-Extras.org * Download Managers * ZFS * Plex Save > Apply (takes a while !) Now to "System > Plugins" panel => we have a lot more plugins available. ==== Flash Memory (1.9) ==== As we're using a USB key for the system root, we'll try Flash Memory, an implementation of fs2ram...\\ Select it in the plugins list and "+ Install". Go to "Storage > Flash Memory", read the Note. > cp /etc/fstab /etc/fstab.bak > nano /etc/fstab # # / was on /dev/sda1 during installation # Added noatime,nodiratime for fs2ram UUID=ce637d63-64eb-4101-a244-b9b3b3ab556b / ext4 noatime,nodiratime,errors=remount-ro 0 1 # swap was on /dev/sda5 during installation # commented out for fs2ram # UUID=5d2353f0-9a25-439d-affb-074096ff301c none swap sw 0 0 CTRL-x y Enable button in WebGUI (Save - Apply) > reboot ==== ZFS (0.6.4) ==== Now let's try to install the ZFS plugin.\\ "System > Plugins", check openmediavault-zfs 0.6.4 => "+ Install". (takes a lot of time) Problem occur: ... update-rc.d: using dependency based boot sequencing insserv: There is a loop between service umountfs and zfs-import if stopped insserv: loop involving service zfs-import at depth 5 insserv: loop involving service zvol at depth 4 insserv: There is a loop between service umountfs and zfs-import if stopped insserv: loop involving service umountfs at depth 4 insserv: loop involving service networking at depth 3 insserv: loop involving service umountroot at depth 6 insserv: exiting now without changing boot order! update-rc.d: error: insserv rejected the script header dpkg: error processing openmediavault-zfs (--configure): ... Read [[http://forums.openmediavault.org/index.php/Thread/7633-HOWTO-Instal-ZFS-Plugin-use-ZFS-on-OMV/?pageNo=8&s=d786c61a35386dc5db83932c6306417c4045e280|this thread]]. It is advised to: * Install only zfs related packages (not the plugin) * Fix the problems (errors) as described above by @subzero79 * Install the latest omv-extras plugin * Do an "Apt Clean" in omv-extras when the ZFS testing repo is selected * Install the latest version of the plugin (0.6.4.2) === OUR PROCESS === In OMV GUI: * Update Manager > Apply all updates * Install [[#omv-extras_22|OMV-Extra plugin]] * Update Manager > Upgrade OMV 2.7 * OMV-Extras.org > Activate ZFS repository > Save > Apply (Took a couple of minutes !?) * Update Manager > 8 ZFS related updates: * grub-common 2.02-beta2.9-ZOL11-7aa9f6-wheezy * grub-pc 2.02-beta2.9-ZOL11-7aa9f6-wheezy * grub-pc-bin 2.02-beta2.9-ZOL11-7aa9f6-wheezy * grub2-common 2.02-beta2.9-ZOL11-7aa9f6-wheezy * libnvpair1 0.6.5.2-2-wheezy * libuutil1 0.6.5.2-2-wheezy * libzfs2 0.6.5.2-2-wheezy * libzpool2 0.6.5.2-2-wheezy * CHECK ALL > Upgrade From the CLI, [[http://zfsonlinux.org/debian.html|install ZOL]]: > apt-get install lsb-release > wget http://archive.zfsonlinux.org/debian/pool/main/z/zfsonlinux/zfsonlinux_6_all.deb > dpkg -i zfsonlinux_6_all.deb > apt-get update (took ages !? -> duplicate sources lists: omv-extras-org-stoneburner.list && zfsonlinux.list) > apt-get install debian-zfs Back to OMV GUI: * OMV-Extras.org > Apt Clean * Check for new updates (Update Manager) * Install the zfs plugin via the Plugin page of OMV The ZFS icon should appear in the **Storage** section of the OMV menu. === Pool Setup === First set power management features on each physical disk in //**Storage > Physical Disks**//. * 1 - Minimum power usage with standby (spindown) * Disabled * 20 minutes Wipe all disks. __Storage > S.M.A.R.T.__: * Interval 3600 * Standby > Devices: Monitor all pool disks __Storage > ZFS__ To determine the physical block size of HDs: > hdparm -I /dev/sda | grep -i physical Add pool: * Name: Storage * Type: RAID-Z1 * Devices: sda + sdb + sdc + sdd * Mountpoint: * Device alias: By Id * Set Ashift: 12 To activate compression: > zfs set compression=on Storage available: on | off | lzjb | gzip | gzip-[1-9] | zle | lz4 To check compression perfs: > zfs get compressratio Storage ===== DDNS ===== ==== DuckDNS ==== [[http://www.duckdns.org]] > apt-get install curl > mkdir duckdns > cd duckdns > nano duck.sh echo url="https://www.duckdns.org/update?domains=basecamp-w49&token=92e01e3a-7b3c-40b7-9210-e76e9daec03b&ip=" | curl -k -o ~/duckdns/duck.log -K - > chmod 700 duck.sh > crontab -e > */5 * * * * ~/duckdns/duck.sh >/dev/null 2>&1 Ctrl-x y Test the script: > ./duck.sh > cat duck.log ===== Home Theater Plugins ===== At this stage we'll [[:omv:hometheater|install the SABnzd, Sick Beard, Plex and Coach Potato plugins]]. ===== OpenLDAP (in VirtualBox) ===== We'll first have to [[:omv:virtualbox|install and configure the VirtualBox plugin]] in order to start building our OpenLDAP VM. We aim at deploying an OpenLDAP server to manage authentication mechanism, following [[https://www.howtoforge.com/how-to-install-openldap-server-on-debian-and-ubuntu|this how-to guide on HowToForge]]. The procedure is also described [[:vms:openldap|on this page of the wiki]].