OMV inside of a container

  • Hi,


    As you can see it's my first post here so please excuse my question was answer previously, searched but didn't find anything.


    So my home project is creating a NAS storage on my RPi4 with the following setup:

    • 1 RPi4 4G
    • Ubuntu as an OS
    • Docker installed
    • On top of a container i want to install OMV
    • Other containers supporting different projects

    I searched all over the web and i couldn't find a solution for this.
    Is it doable?
    Am i wasting my time?
    If it's doable, can you point me to a guide?


    I would also like to mention that my linux skills are low to average, i understand how lightweight virtualization works and i work as a Network Engineer.


    Thank you in advance.

    • Offizieller Beitrag

    Is it doable?

    Nope. OMV doesn't work in a container. I fail to understand why you Ubuntu as the OS (and I am a big Ubuntu fan) if you intend to use it for a NAS?

    i understand how lightweight virtualization works

    Docker isn't virtualization. It uses the host's kernel and you can see all docker processes from the host.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    waiting to get any test results from the community.

    Using LXC in proxmox, OMV installs nicely and the web interface is working BUT...


    The sharerootfs plugin reports this error when installing: WARNING: No root filesystem has been found.



    The Physical Disks tab reports this error but not sure where it gets /dev/sda from


    Device '/dev/sda' does not exist.


    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    To make it short: findmnt --first-only --output-all --nofsroot --json "/"

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • On my side I'm trying to install OMV inside an LXC container on my Turris Omnia router with 2 SATA HDD that I want to dedicate to OMV.

    I started with a Debian Buster container.

    I have managed to expose the two block devices inside the container.


    I'm stuck during installation of OMV because of what seems a stupid issue:


    Code
    Updating service units ...
    Failed to preset unit: Unit file /etc/systemd/system/systemd-networkd.service is masked.
    /usr/bin/deb-systemd-helper: error: systemctl preset failed on systemd-networkd.service: No such file or directory
    dpkg: error processing package openmediavault (--configure):
     installed openmediavault package post-installation script subprocess returned error exit status 1
    Errors were encountered while processing:
     openmediavault
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    root@nas:~# 


    I tracked it down to this line :

    https://github.com/openmediava…nmediavault.postinst#L124


    which fails because systemd-netword is masked in the container :

    Code
    root@nas:~# systemctl status systemd-networkd
    ● systemd-networkd.service
       Loaded: masked (Reason: Unit systemd-networkd.service is masked.)
       Active: inactive (dead)


    which comes from the default Debian LXC images : https://github.com/lxc/lxc-ci/…/images/debian.yaml#L1023


    Does OMV really need this service ? Do you know any way I can bypass this ?

    Maybe at least trick OMV by replacing it by a no-op unit ?

  • On my side I'm trying to install OMV inside an LXC container on my Turris Omnia router with 2 SATA HDD that I want to dedicate to OMV.

    I started with a Debian Buster container.

    ......

    Does OMV really need this service ? Do you know any way I can bypass this ?

    Maybe at least trick OMV by replacing it by a no-op unit ?

    I wanted to do the same thing and got a bit further.

    On the host :

    sudo lxc config set Container-ID security.nesting true

    Then in the guest I did among others :

    sudo apt-get install openmediavault-sharerootfs

    sudo apt-get install --reinstall systemd

    sudo systemctl unmask systemd-networkd

    sudo apt-get -f install

    sudo reboot

    And that solved the problem with installing OMV.

    But then a new problem pops up when disabling some services in the web admin interface, and wanting to use the apply the changes buttons.
    OMV seems to depend on Avahi daemon, and that turns out to be a

    more serious problem. See github.com/lxc/lxd/issues/2948

    When commenting out the entry with

    rlimit-nproc=3

    in /etc/avahi/avahi-daemon.conf

    starts fine, however OMV seems to want to fiddle with that file and overwrites it again, making Avahi daemon fail again.

    If you make this file immutable with chattr from the host system, OMV again throws errors.

    So, I'm stuck there right now.

  • votdev any chance this could be fixed in V6?

    omv 6.9.6-2 (Shaitan) on RPi CM4/4GB with 64bit Kernel 6.1.21-v8+

    2x 6TB 3.5'' HDDs (CMR) formatted with ext4 via 2port PCIe SATA card with ASM1061R chipset providing hardware supported RAID1


    omv 6.9.3-1 (Shaitan) on RPi4/4GB with 32bit Kernel 5.10.63 and WittyPi 3 V2 RTC HAT

    2x 3TB 3.5'' HDDs (CMR) formatted with ext4 in Icy Box IB-RD3662-C31 / hardware supported RAID1

    For Read/Write performance of SMB shares hosted on this hardware see forum here

    • Offizieller Beitrag


    votdev any chance this could be fixed in V6?


    openmediavault does not write this value into the config file anymore since 5.5.15, see https://github.com/openmediava…d95ce96726716087759a6109c.


    You can force the re-deployment of the configuration with omv-salt deploy run avahi if that has not happened already.

  • treescherry  jmk  kze does the change remove the issues you encountered?

    omv 6.9.6-2 (Shaitan) on RPi CM4/4GB with 64bit Kernel 6.1.21-v8+

    2x 6TB 3.5'' HDDs (CMR) formatted with ext4 via 2port PCIe SATA card with ASM1061R chipset providing hardware supported RAID1


    omv 6.9.3-1 (Shaitan) on RPi4/4GB with 32bit Kernel 5.10.63 and WittyPi 3 V2 RTC HAT

    2x 3TB 3.5'' HDDs (CMR) formatted with ext4 in Icy Box IB-RD3662-C31 / hardware supported RAID1

    For Read/Write performance of SMB shares hosted on this hardware see forum here

  • success was reported in other tread RE: Install OMV on Google Cloud or AWS ?

    omv 6.9.6-2 (Shaitan) on RPi CM4/4GB with 64bit Kernel 6.1.21-v8+

    2x 6TB 3.5'' HDDs (CMR) formatted with ext4 via 2port PCIe SATA card with ASM1061R chipset providing hardware supported RAID1


    omv 6.9.3-1 (Shaitan) on RPi4/4GB with 32bit Kernel 5.10.63 and WittyPi 3 V2 RTC HAT

    2x 3TB 3.5'' HDDs (CMR) formatted with ext4 in Icy Box IB-RD3662-C31 / hardware supported RAID1

    For Read/Write performance of SMB shares hosted on this hardware see forum here

    • Offizieller Beitrag

    success was reported in other tread

    He said he installed in a GCP VM not a container.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • installed in a GCP VM not a container.

    Ooops my fault. We used GCP only for container workloads so inference kicked in:(

    omv 6.9.6-2 (Shaitan) on RPi CM4/4GB with 64bit Kernel 6.1.21-v8+

    2x 6TB 3.5'' HDDs (CMR) formatted with ext4 via 2port PCIe SATA card with ASM1061R chipset providing hardware supported RAID1


    omv 6.9.3-1 (Shaitan) on RPi4/4GB with 32bit Kernel 5.10.63 and WittyPi 3 V2 RTC HAT

    2x 3TB 3.5'' HDDs (CMR) formatted with ext4 in Icy Box IB-RD3662-C31 / hardware supported RAID1

    For Read/Write performance of SMB shares hosted on this hardware see forum here

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!