[HOWTO] Instal ZFS-Plugin & use ZFS on OMV

  • That isnt a problem. We can just create a 1.x branch and make the main branch 2.x. Then if there is a fix that applies to both, you just need to apply it twice. I can create branch unless you want to.


    If you could fix the branches, I would be very thankful. Still feel like a newbie when working with github :)

    • Offizieller Beitrag

    1.x branch created. All changes from now on will be against 2.x branch. I don't think we should have to deal with 1.x branch anymore since 2.x is such an easy upgrade.

    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!

  • Mixed feedback to the new plugin and the new zfs on linux version...


    I'm still working/testing with the vm-disks from freenas and added them to omv2 now. The trunk is imported on a restart.


    I can't mount the filesystem created on freenas but I can create a new filesystem on the raidz1 trunk and make shares there.


    I noticed there is a different default-flag on freenas for 'aclinherit' which is 'passthrough' and on omv 'restricted'. Also 'compression' is 'lz4' by default in freenas, but that's probably not the point.


    Thank you @nicjo814!!!

    OMV 2.1.1 with backport-kernel 3.16
    Antworten/ Answers/ Réponse: deutsch - english - français und/and/et Linux :)

  • Could you provide some error log? Is there any error being displayed?


    No errors are displayed. From a GUI perspective it arrears to complete, but there are no zpool created. It however does create the custom mount point I specified.


    I installed the omv-extra that is the latest on their website, which does not say anything about omv version two. Is this the problem?

  • Has there been any thought to ZFS' `sharenfs`and `sharesmb` options? OpenMediaVault's tools for NFS and Samba sharing are great and I've integrated with them quite well but there's a problem. I have a filesystem layout that looks like this:


    Code
    root@ezra:~# zfs list
    NAME                USED  AVAIL  REFER  MOUNTPOINT
    Data               3.82T  1.46T  43.9G  /data
    Data/Backups       13.0G  1.46T  13.0G  /data/Backups
    Data/Homes          948G  1.46T   270K  /data/Homes
    Data/Homes/user1    234M  1.46T   234M  /data/Homes/user1
    Data/Homes/user2   7.87G  1.46T  7.87G  /data/Homes/user2
    Data/Stuff          749G  1.46T   749G  /data/Stuff
    Data/Shared        2.10T  1.46T  2.10T  /data/Shared
    Data/Websites       170K  1.46T   170K  /data/Websites


    Prior to ZFS, I simply had all of the home directories in one /data/Homes and exporting it via NFS worked great. Now, however, trying to take advantage of ZFS' behavior with respect to inherited file system settings and features, like snapshots, I wanted to give each user their own fs so they could manage their own snapshots and what not.


    The problem is, when I only share "/data/Homes" via the NFS tools, I get an empty directory on the clients. This seems to be because NFS will only export one filesystem at a time. Even if I change the bind mount in `/export/Homes` to `mount -o rbind`, this still happens, even though I can navigate the filesystem hierarchy locally through `/export/homes` fine.


    I managed to make this work with ZFS's `sharenfs` capability like so:


    Code
    ./cmd/zfs/zfs set sharenfs=sec=krb5:krb5p:krb5i,rw=@10.1.42.0/24,no_subtree_check,insecure,nohide Data/Homes


    (Note that I had to build zfs from source to make this work as the version that's installed from the repos doesn't parse out the Kerberos options properly.)


    After doing this, I got the following exports:


    Code
    root@ezra:~# exportfs -v
    /data/Shared    10.1.42.0/24(rw,wdelay,nohide,insecure,root_squash,no_subtree_check,mountpoint,sec=krb5p:krb5i:krb5,rw,root_squash,no_all_squash)
    /data/Homes/user1
                    10.1.42.0/24(rw,wdelay,nohide,insecure,no_root_squash,no_subtree_check,mountpoint,sec=krb5:krb5p:krb5i,rw,no_root_squash,no_all_squash)
    /data/Homes/user2
                    10.1.42.0/24(rw,wdelay,nohide,insecure,no_root_squash,no_subtree_check,mountpoint,sec=krb5:krb5p:krb5i,rw,no_root_squash,no_all_squash)
    /data/Homes     10.1.42.0/24(rw,wdelay,nohide,insecure,no_root_squash,no_subtree_check,mountpoint,sec=krb5:krb5p:krb5i,rw,no_root_squash,no_all_squash)


    Now, everything works great. The `nohide` option causes the NFSv4 clients to traverse the differing exports transparently and all is great. The question, then, is what to do about OpenMediaVault's GUI? I see two options:


    1. Modify the way the NFS portion handles any shared folder that is flagged as the Home Directories share. If any directory that is an immediate child of the home directory share is on a different filesystem from the home directory share itself, create a new exports entry for it.
    2. If any of the shares being exported is a ZFS filesystem, use `sharenfs` instead.


    I don't know if I like integrating NFS support directly into the ZFS plugin because it's a bit counterintuitive to have to edit shares from there. It seems option 2 is most robust however the zfsonlinux people have stated that `sharenfs` and `sharesmb` are a bit brittle and are going away over the next few years in favor of "The ZED".


    So...what do folks think is a good direction for this issue?

  • I haven't been following this recently. Just wondering if there has been any progress on making this work for 2.0?


    I'm running version 0.6.4 on my OMV 2.x machine. What issues are you facing? Could you please verify that you are running 0.6.4, since the previous version (0.6.3.5) has been confirmed NOT to work on 2.x.

  • Zitat

    I'm running version 0.6.4 on my OMV 2.x machine. What issues are you facing? Could you please verify that you are running 0.6.4, since the previous version (0.6.3.5) has been confirmed NOT to work on 2.x


    I hopping that v2 fixes the issue I'm having here [HOWTO] Instal ZFS-Plugin & use ZFS on OMV about the timeout if there are too many zfs datasets.


    I'll give it V2 a short when I get a chance.


    Edit:
    I'm happy to report that I've spin up a new virtual machine in virtualbox with the latest OMV version 2.1.13 and test created over 300 zfs datasets. I was still able to create new "Share Folders" unlike previously!


    I'm guessing that this have something to do with the new version 2.0 javascript framework?


    I will do more testing by creating zfs snapshots of those datasets to see how much I could push it!

  • 1. Modify the way the NFS portion handles any shared folder that is flagged as the Home Directories share. If any directory that is an immediate child of the home directory share is on a different filesystem from the home directory share itself, create a new exports entry for it.


    This kind of change to the OMV core would have to be handled by Volker, since he is the sole developer of the OMV core functionality.


    2. If any of the shares being exported is a ZFS filesystem, use `sharenfs` instead.


    This I think is a "no go" since that would mean that the OMV core would have to do "special magic" if a specific plugin is installed and I really don't think Volker would approve of such a solution (I may be wrong of course).


    I remember now having this kind of issues when developing the plugin, so I came to the same conclusion as you did (to use sharenfs instead).

  • [quote]
    I'm happy to report that I've spin up a new virtual machine in virtualbox with the latest OMV version 2.1.13 and test created over 300 zfs datasets. I was still able to create new "Share Folders" unlike previously!


    I'm guessing that this have something to do with the new version 2.0 javascript framework?


    I will do more testing by creating zfs snapshots of those datasets to see how much I could push it!


    I spoke to soon! after leaving OVM running overnight and coming back the next morning and try to create some new "Shared Folders". It come up with the "Communication errors" again for no apparent reason?? I even gave the server a reboot, however this did not help :( ahhhhhhh

  • Sorry, apparently this thread isn't sending me email notifications. I'll need to mess with something I suppose. In terms of the solution for sharing, I ended up implementing some changes to the plugin so it can support nested filesystems without having to muck with core here: https://github.com/OpenMediaVa…openmediavault-zfs/pull/1.


    Since I'm relatively new to ZFS and the plugin, I'm a little hesitant to just push a change like that without some discussion. In terms of working on more of the ZFS plugin, that really depends on how much time I end up having :-/. Do you prefer me contributing straight to the main repo instead of issuing pull requests? I tend to prefer PRs as it's easier to discuss a batch of changes.


    I'll likely be putting some work in on various OMV plugins as I find time and, as long as I don't encounter an intractable issue with ZFS, I imagine there'll be some more work on this one too.


    I think I do already have access to OMV-Plugin-Developers, I'm just a bit timid to just push work straight to those repos at the moment.


    I really want to fix the weirdness with that textbox (https://github.com/OpenMediaVa…enmediavault-zfs/issues/2). I spent about 30 minutes on it and gave up for the moment.

Jetzt mitmachen!

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