Install OMV 2.1 in OpenVZ CT under Proxmox

  • Hey,


    I've got a setup with one System SSD and two HDD's, one for Data, one for Backup, no RAID. On the SSD I installed Proxmox in which I've created a OpenVZ Container with a template for a minimal debian 8 installation.
    Following the instructions here I installed OMV 2.1.1 on top of that by replacing kralizec with stoneburner in the first step described. During the installation/unpackaging of the the omv-installation I am asked something about the configuration of mdadm:


    Code
    If the system's root file system is located on an MD array (RAID), it needs to be started early during the boot sequence. If it is located on a logical volume (LVM), which is on MD, all constituent arrays need to be started. 
    
    
    If you know exactly which arrays are needed to bring up the root file system, and you want to postpone starting all other arrays to a later point in the boot sequence, enter the arrays to start here. Alternatively, enter 'all' to simply start all available arrays. 
    
    
    If you do not need or want to start any arrays for the root file system, leave the answer blank (or enter 'none'). This may be the case if you are using kernel autostart or do not need any arrays to boot.


    As I wrote above, I don't have any RAID, so I left the field blank resulting in the error message:

    Code
    [FAIL] Assembling MD arrays...failed (failed to load MD subsystem).


    Choosing "all" results in the same error message.


    Actually, I don't really know if this is my main problem, but I just wanna make sure you know of it.


    After the installation finishes I am able to connect to the OMV GUI, that's fine. I have created a bind mount according to this, so I should be able to access a folder on my first HDD that is meant for OMV. But in the OMV GUI, if I go to the point filesystems, I get the following error:


    There is something written about "Array", so I thought it might be related to the initial error I got during the installation process (that's why i mentioned it).
    On the other hand, I also recognized that I don't see any HDD information inside the GUI, which is due to the virtualization, I guess. So I am wondering if there are some key points that I missed or maybe even some restrictions that cannot be overcome in my setup. If not, how can I solve this problem?


    I am really thankful for any help. Let me know what else you need.


    Best regards

    • Offizieller Beitrag

    I have a small personal cloud server running in openvz with omv. My provider doesn't give me secondary disks. So I use the rootfs space.
    i fake an entry of Fs in the config.xml, also I add the shared folders manually in the config. This is critical since some plugins need shared folders (like MySQL)


    so i have no experience with extra disks. How do you see the disks inside openvz?
    if fdisk cant display them, hardly the fs
    backend of omv will work.

  • How do you see the disks inside openvz?


    I created a bind mount for the CT and thats the output of

    Code
    df-h

    :


    So, I see the mounted folder /mnt/Data. But

    Code
    fdisk -l

    gives me nothing. It must be possible to get this into the WebGUI of OMV. That would already be fine for me. And if there is way to make my two HDD's show up to further manage them through OMV would be the next nice thing to have....but I'm a little bit worried here...


    I have read somewhere here about the way to tweak the config.xml file, but I rather wouldn't do that.
    I also read somewhere here the /etc/hosts and resolv were the solutions for some other problems. But those threats always end when its getting interesting and a solution is rarely presented. So, actually I'm quite lost here... :)


    Is there anything else I can do?

  • I just read in another thread about one guy who had the same error with

    Code
    omv-initsystem

    as I did, namely

    Code
    run-parts: /usr/share/openmediavault/initsystem/60rootfs exited with return code 1


    Except that his script exited with return code 2 and mine does exit with return code 1.
    @votdev asked him to post the output of the script added with an set -x. So here's my output of that, too. Hope it helps..


    My /etc/fstab inside the container is:

    Code
    proc  /proc       proc    defaults    0    0
    none  /dev/pts    devpts  rw,gid=5,mode=620    0    0
    none  /run/shm    tmpfs   defaults    0    0


    ... and "mount" gives me:

    • Offizieller Beitrag

    As an idea (not sure because of kernel module) you can try in the host to run iscsitarget and run the initiator inside the container, omv should see the block device. This a nas it wants real disk, follow the config.xml modification is not that hard, just make a backup to avoid problems.
    You can try and fake a disk with a loop
    device, but in my setup my provider doesn't give me loop or fuse module, so I don't know if that's a limitation of openvz.

    • Offizieller Beitrag


    Thanks, this helps. The problem is that there is no /dev/root device.

  • Zitat

    Also I found this explaining how to pass block devices to container download.swsoft.com/virtuozzo/…/en/lin/VzLinuxUG/328.htmmaybe that can help


    That did help a little, I guess. After executing this command my Container can see /dev/sdb, /dev/sdb1 and /dev/sdb2. This is good, right? /dev/sdb is my first HDD and that's what OMV wants, doesn't it?
    So I mounted /dev/sdb2 into a folder inside the CT and df -h also lists it.


    ...But inside the OMV GUI, if I go to filesystems, I still get the error message:

    • Offizieller Beitrag

    And how do I solve this problem??


    Is not a problem, go to /usr/share/openmediavault/initsystem you'll see all the scripts 60rootfs just checks the root device as non spin disc to add the appropiate flags at fstab. You can move that script out of there. Also i would move out 80resolvconf, interfaces, hostname,mdadm and sysctl. There might not all be necessary.

  • And then....? After moving all suggested scripts out there I tried "omv-initsystem" again. This gives me no error anymore.
    However, in the WebGUI -> Filesystems, I still get the same error message as posted above....


    And now? Anybody can help me, please?
    Thanks a lot...

  • Additionally, it seems that my guest doesn't have an internet connection. Weird... I set "routed mode (venet)" in Proxmox. Another guest I have is using the same configuration without a problem, so I guess it's related to the installation of OMV somehow...

  • The disk is formatted, yes. Two partitions, ext4.

    if blkid doesn't work but you can still mount those disks with cli


    Although blkid doesn't show anything, lsblk shows the disk and the two partitions inside the CT if I pass these to the CT using your suggested method with passing block device to CT. If I just create the bind mount, neither blkid nor lsblk shows anything. So, I guess, the first method is the one to be used, i.e. passing /dev/sdb and its partition /dev/sdb2 into the CT and the mount /dev/sdb2. That is all working...

    You'll need to add the entry in config.xml


    That's the next thing to do, I guess. So.. :) ..how do I do that? Where in this file do I have to add it, and what?


    Thanks a lot, so far.... Although I still got a lot of things that are not working (DNS, I can ping IP, but no hostname), you already helped me in understanding what is going on here. Thanks for your patience.

    • Offizieller Beitrag

    the file is at /etc/openmediavault/config.xml


    backup the file just in case


    read through the file in a real system maybe a VM. Look at the information in mnent tags for filesystems. You'll get the idea how they make reference using and internal uuidin between other services.


    first mount the disk in a similar way omvbdoes, with uuid

Jetzt mitmachen!

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