Proxmox ZFS to OMV

  • Hi all,


    I know the question have been asked a lot of time but I never feel comfortable with all answers I saw.


    I'm running OMV as a VM on Proxmox.

    I've just created a ZFS pool ("tank") in proxmox and want to give that full FS to OMV.

    I successfully did this using virtFS (9p) passthrough. On the OMV VM config file on the host (proxmox), I add this line :

    Code
    args: -fsdev local,security_model=passthrough,id=fsdev0,path=/tank/data -device virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=dataZFS

    and can successfully mount it on OMV with this :

    Code
    sudo mount -t 9p -o trans=virtio,version=9p2000.L,msize=512000 dataZFS /mnt/data

    Performances are quite as good from guest (OMV) as from host (Proxmox).


    Unfortunately, I stuck now on OMV side to be able to use this directory (/mnt/data) as shared because it's not recognize as a drive ?!

    I could mount it somewhere else if it's relevant (/media ? /srv ?) ?

    I can use remotemount add on, who doesn't know 9p FS...

    I wondering about using root share add on ?


    What would you suggest to do here ?

    (from fstab, with good options to mount in the right order, to ability to create shares in this virtFS remote folder)


    Thanks a lot.

    Regards

    • Offizieller Beitrag

    Just use the sharerootfs plugin and then you can use /mnt/data to create shared folders.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


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


    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!

  • Thanks aaron, that's what I was thinking of.


    Any advise on the fstab way to mount this ? "_netshare" and so on to be sure service dependencies are in the right order ?

    I guess I will have troubles with this :/

  • I'm asking myself if it's not easier to make OMV as a container and use bind mount in place of virtFS... :/

    Should probably be more straight forward...

    Just have to use the same "sharerootfs" as suggested and no issues with fstab mount... :)

    Well, except the privileged vs unprivileged container choice...


    I remember have read that you also are using proxmox & OMV ?

    What solution did you use to use both ?


    Thanks.

    • Offizieller Beitrag

    I wouldn't use fstab. I would make a systemd mount file and either set a Before= dependency in the mount file for the services that need it or add overrides to the services to wait for the mount.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


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


    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

    I'm asking myself if it's not easier to make OMV as a container and use bind mount in place of virtFS

    OMV doesn't work in containers.

    I remember have read that you also are using proxmox & OMV ?

    What solution did you use to use both ?

    I do. My VMs aren't file servers though. So, I just create virtual disks. But, I am working on a kvm plugin and I will replace proxmox on the host with OMV and the plugin. New openmediavault-kvm plugin

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


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


    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!

  • OMV doesn't work in containers.

    I do. My VMs aren't file servers though. So, I just create virtual disks. But, I am working on a kvm plugin and I will replace proxmox on the host with OMV and the plugin. New openmediavault-kvm plugin

    OK, so the container way to do is not a good idea... ;(


    When you say your VM are not file servers, what are you using OMV for ?!

    Proxmox is the host and OMV is the guest ? Right ? But OMV is not a file server for you ?


    I saw the plugin to replace Promox by OMV...

    Well, It would be a big (r)evolution for me... BTW, Not sure to go this way...


    It's proxmox job to deal with VM/CT, not OMV (in my point of view).

  • I wouldn't use fstab. I would make a systemd mount file and either set a Before= dependency in the mount file for the services that need it or add overrides to the services to wait for the mount.

    Thanks, will look for this.

    I'm not wondering about the systemd but about identifying the before list...


    Well, we'll see.


    Thanks a lot for your (very) fast and clear responses.

    • Offizieller Beitrag

    When you say your VM are not file servers, what are you using OMV for ?!

    Proxmox is the host and OMV is the guest ? Right ? But OMV is not a file server for you ?

    Manually configured Ubuntu : ) At least until I have the plugin working well. My OMV boxes are mostly for plugin development.

    I saw the plugin to replace Promox by OMV...

    Well, It would be a big (r)evolution for me... BTW, Not sure to go this way...

    It shouldn't be that big of a deal. Proxmox and the plugin are both using KVM.


    It's proxmox job to deal with VM/CT, not OMV (in my point of view).

    But many people (including myself) want the VM host and storage provider (OMV) in one box while avoiding the exact issue you are running into now. Because the plugin uses libvirt to manage KVM VMs, it is easy to create a plugin to manage VMs and you can use the many libvirt tools like virsh and virt-manager. Many people are already using portainer to manage docker. The only thing missing from OMV that proxmox provides is LXC management.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


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


    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!

  • Hi,

    Follow of my use case, I think I successfully implemented virtFS.

    On my OVM VM, connected in SSH, I can see all my folders/files through the 9p mount.


    BUT, and I really don't understand why, my shares doesn't include every folders... some are missing, depending of the share.

    Even on OMV WebUI, if I go to create a new "Share folder", in the path selection, all folders are not there ?!


    Any idea please ?

  • More strange, Windows and Linux don't see the same number of folders...

    Lets take a shared folder as an exemple...


    # On my ZFS, it contains 951 subfolders (ls | wc -l)

    # On OMV mount (9p), it contains 951 subfolders also


    On OMV WebUI, I have a "shared folder" for this folder.

    If I try to edit it, I don't see every subfolders (don't know if webUI is only limiting the number of result or so...)


    I have an SMB on this sharefolder that I can use on windows or linux


    # On Windows, I see 765 subfolders

    # On Unix (2 different VM), I see 506 subfolders


    Same user ; Looked at the permissions, same for all ; no ACL. (I even use the reset permission utility to remove ACL and restore every perms...)

    Really strange.



    Next, if I try to create a new sharefolder for on a missing subfolder (manually typing the path), when I apply, I have this error :

    Code
    Failed to execute command 'export 
    PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; 
    export LANG=C.UTF-8; setfacl --modify group:users:--x /mnt/data 
    2>&1' with exit code '1': setfacl: /mnt/data: Operation not 
    supported


    Hope this will help do diagnose something and point me to the right way

    • Offizieller Beitrag

    Seems like a permissions issue. No idea if 9p supports ACLs.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


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


    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!

  • I do not intend to use ACL.

    By the while, the error displayed is related to ACL.. is it the default behaviour of OVM ?

    How could it work for several folders and not for some ?

    I looked at folder/files with getfacl, and they are the same ones (default as made by a chmod) between a working and not working folder/file in a share.


    What can I look at to troubleshoot this ?

    In smb.conf, all the folder should be shared... Why some files are not visible and even with differences between a windows and a linux client ?

    • Offizieller Beitrag

    is it the default behaviour of OVM ?

    OMV will uses ACLs for a filesystem if that backend has ACLs enabled in the code. zfs does have ACLs enabled - https://github.com/OpenMediaVa…ystem/backend/zfs.inc#L11 but since you are passing through zfs, maybe proxmox does not enable ACLs on zfs? It is configurable with zfs if I remember correctly.



    How could it work for several folders and not for some ?

    Permissions can easily affect that.


    Why some files are not visible and even with differences between a windows and a linux client ?

    Are you using the same user and username to connect to the shares?


    What can I look at to troubleshoot this ?

    Not sure. This setup is a bit painful to think about zfs -> omv -> smb -> windows and linux clients. I don't use zfs. So, not sure where to look.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


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


    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!

  • Just to share for those who are interested...


    The missing subdirectories are in reality accessible by using "cd subdirectory" (with exact name) on an SMB Client. So, it's as if some directories have not "read access" but only "execute access".

    After looking in ssh (from where I can see every folders/subfolders without any issue, so it's not a "9p" issue for me) the permissions and others ACL on all the directories/files (previously reset via OMV plugin... but did it applied everywhere ?! Not sure), I can't find a single difference...

    So, I don't know why I have this strange behavior.


    By the while, I manage to get it work using a dirty solution => mergerfs !

    I put my 9p folder /mnt/data (the one mounted from the underlying Proxmox ZFS) in mergerfs. Yes, he's alone...

    Next, I used the created mergerfs to set my shares and voila... It works "normaly' => I can see all my folders.

    Any idea/explanation on why it's working with mergerfs an not with shareroot plugin ?!


    I just have OMV throwing me some errors on some shares when I apply config (same error as in #11).

    It looks like it's only for the shares that are not at the root.

    If I share "/dir", I have no error (OMV doesn't try to put any ACL, I think ?!)

    If I share "/dir/subdir", I have the error (OMV tries to put a "execute" only ACL on "dir" from group users... Why ?! Also, I don't know why it's not working because it should ; And, finally, look at my 2nd phrase in this post...)


    Well, it's not really a wonderful way of doing things but, without help, I don't know what to look at to understand why I have these kind of issues and how to do it a better way.


    As every reads I made about passing ZFS to VM, neither Proxmox, neither OMV (or others...) wants to make it easy to work and every one is staying at his position... "blabla Proxmox on a baremetal" & "blabla NAS on a baremetal"...


    Adding 9p on remotemount plugin won't be possible ?


    I'm going to look a way to activate SMB shares directly from Proxmox (ZFS Shares). Should be more "natural"...

    • Offizieller Beitrag

    Adding 9p on remotemount plugin won't be possible ?

    I'm sure it could be added. I can look but not sure how much effort I will be putting toward OMV 5.x plugins with OMV 6.x on the horizon. You can always mount 9p from the command line and then use the sharerootfs plugin to make shared folders.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


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


    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!

  • I'm sure it could be added. I can look but not sure how much effort I will be putting toward OMV 5.x plugins with OMV 6.x on the horizon. You can always mount 9p from the command line and then use the sharerootfs plugin to make shared folders.

    Thanks.

    As mentionned in all this thread, I have this 9p mounted through fstab. From my point of view, it works perfectly from OMV in SSH.


    Using sharerootfs is not working for me (see the issues I have in OMV GUI and attached services : SMB in my case).


    Using mergerfs makes it work...

Jetzt mitmachen!

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