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

  • This would be nice if you are able to do this. For my use case it would be good if they don't show up by default. I create the dataset via commmandline so would prefer not needing to go to the gui to untick all 300 of them!


    I have to consider that most people using OMV probably don't have this issue and are happy with how it works today. Thus I have to be careful to not make this an annoyance when I'm trying to solve the problem that you're having. I'm afraid it can be a bit of a challenge...

  • The mntent entries are needed when setting up fstab, though I don't think we want the zfs filesystems to be in fstab. I'm not creating mntents for the NFS exports that I'm adding and it seems to be ok with it.


    I would be more concerned with this being a confusing option for most users who don't have this issue. Perhaps you could add a user ZFS property that would either prevent a filesystem from being added or cause one to be added, kind of like I'm doing with the NFS autoshare PR? The settings panel I created lets the user define a ZFS property that, if present on the FS, will cause it to be automatically shared via /etc/exports if it's parent FS is already shared. If absent, it won't autoshare. If the property is left blank, every nested FS of a shared parent is automatically also shared.


    This allows you to re-use the existing properties UI and create sensible defaults for people who don't care about this issue.

  • Anybody having issues building the zfs kernel modules? I had a previously working system, and now when I try to install debian-zfs, I get this:


    (snip)


    When I install openmediavault-zfs, it fails because the zfs module cannot be found.
    I've purged all the packages and reloaded them, and for the life of me cannot figure out why this won't work. Thanks for any help.


    Well I fixed my problem, if anybody else has the same ones. I purged all zfs packages, then I purged spl-dkms, then I reinstalled spl-dkms, then I reinstalled all zfs packages. This time it built the module. Apparently there is an issue with the timing of the install of the spl-dkms package and the build failing.

  • I have to consider that most people using OMV probably don't have this issue and are happy with how it works today. Thus I have to be careful to not make this an annoyance when I'm trying to solve the problem that you're having. I'm afraid it can be a bit of a challenge...


    I already had in mind that I'm not 'most people' which is why I said 'preferred' :) (i.e I'm not expecting it to be default) I will be happy with whatever you can come up with that makes sense.

  • Hello, I also got some problem with ZFS since the last update and coming here for help. I have been trying to follow the procedure given by @nicjo814 on page 9, but got some difficulties.


    Zitat

    1. Remove the zfs plugin


    Done


    Zitat

    2. Fix the broken debian-zfs package (instructions from subzero79)


    Is it the /var/lib/dpkg/info/zfsutils.postinst thing described on page 8? My file currently looks like that, so I'm not really sure if I'm supposed to do anything:


    Zitat

    3. Upgrade the omv-extras plugin


    Ok, this may seem a bit stupid but... how do I do that? Do I just follow this procedure again? Do I need to uninstall it before?
    I tried to just redo the procedure without uninstalling it first, but I don't get anything when I upload the file. I just have "openmediavault-omvextrasorg 2.2" (already marked as installed), so I don't think that's what I am supposed to do.
    I tried to continue the procedure (did the Apt Clean), but I don't see openmediavault-zfs as long as a don't select "ZFS Testing" in OMV-Extras.org, so I think I screwed up the omv-extras update.


    I tried a "zfs import" and it actually worked (except the disks are not identified by id, but as /dev/sdb, sdc, etc), and after a reboot, the SMB shares actually work, just the web interface saying "No filesystem backend exists for 'zfs'" (not a surprise, given that the zfs plugin is still uninstalled).


    Thank you for your help (and your time, of course).

  • Thank you for your answer, but I'm not sure I understand correctly. So I should just re-check "ZFS Testing" and install the zfs plugin proposed that way?


    By the way, the plugin page shows me "openmediavault-omvextrasorg 2.2", but when I execute dpkg-query --show, it actually shows "openmediavault-omvextrasorg 1.34", is that because I upload the latest .deb, but didn't do anything further?

    • Offizieller Beitrag

    is that because I upload the latest .deb, but didn't do anything further?


    Probably, don't know really why you did downgrade omv-extras. But upgrading the packages should take you to 2.7 in extras.


    Yes install again the plugin. Try better the terminal with zfs repo enabled, leave the testing unmarked. zfs is now stable.


    apt-get install openmediavault-zfs

  • I didn't downgrade, I just installed it about 6 months ago using the web GUI as described here and didn't do anything else except regularly executing the "Update Manager" once every two weeks.


    So, tried to install it again using the terminal, but got weird message


    Another apt-get recommenced "apt-get -f install". So I did (which removed "openmediavault-omvextrasorg" apparently) followed by "apt-get update" and "apt-get upgrade" (but that installed nothing) and tried again to install the extras deb, but same error of unmet dependency.
    Weird thing is "dpkg-query --show" now lists "openmediavault-omvextrasorg 2.2", but this is marked as uninstalled in the "Plugins" page, and when I try to access the "OVM-Extras.org" page, I got an error "Failed to get configuration (xpath=//system/omvextrasorg)"


    Sorry to bother you with this, but thanks again for your time.

  • Yep, it solved the problem. Extras installed correctly and so did the zfs plugin.


    Thank you very much. I know I say it in every posts, but I mean it.


    A little detail, ZFS now identify the disks as sda, sdb. Tried export/import -d by-id, but didn't stay after a reboot, but I think I will be able to solve that by myself.


    Thanks again.

  • Is everyone upgrading their zpool? Im on v.8 I think. Just curious if OMV is purposly holding back the pool, or I just never upgraded the pool.


    im talking about

    Code
    zpool upgrade


    Edit: I think I answered my own question.

    Code
    zpool get version <pool name>


    returns a dash...so flags or custom version

    Code
    zpool get all <pool name> | grep feature@


    returns a bunch of flags.... guessing this is why its held back. Let me know if im wrong. (info credit to FreeNAS forums)

  • Just curious if OMV is purposly holding back the pool, or I just never upgraded the pool.


    Actually the plugin is "simply" a GUI on-top of ZFS on Linux so it doesn't "do" very much in itself. You have to manually upgrade the pool if you want to. I could maybe add such a feature to the GUI if it's desired...

  • Actually the plugin is "simply" a GUI on-top of ZFS on Linux so it doesn't "do" very much in itself. You have to manually upgrade the pool if you want to. I could maybe add such a feature to the GUI if it's desired...


    Gotcha thanks, I just wasnt sure if there was a reason that ZFS on Linux was not upgrading the pool as the packages upgraded (im new to ZFS, didnt realize pool updating was manual).

  • Quote from subzero79: “They also finally decided to place mount at S level. So you should consider removing the override.”
    Is this implemented in OMV yet and I noticed there was updates for zfs. Has anybody tested these yet?


    Yes, it appears to work - at the least I was able to get through the installation without it failing. It was a learning exercise for me to build a .deb file from the github repo so I thought I'd list out what I had to do


    Open an SSH and start a shell as root:


    1) download the latest openmediavault-zfs (0.6.4.2 is the latest right now) and build the 0.6.4.2 openmediavault-zfs .deb file. We need some build utilities too:


    Code
    cd ~apt-get remove openmediavault-zfs
    wget https://github.com/OpenMediaVault-Plugin-Developers/openmediavault-zfs/archive/master.zip
    apt-get install build-essential fakeroot debhelper unzip 
    cd openmediavault-zfs-master
    fakeroot debian/rules clean binary
    cd ..


    and now you have a 'openmediavault-zfs_0.6.4.2_amd64.deb' file - we'll use this later.


    2) remove the openmediavault-zfs package and any ZFS packages


    Code
    apt-get remove spl spl-dkms debian-zfs libzfs2 zfs-dkms zfsutils zfsonlinux libzpool


    3) verify you have the stoneburner-zfs and zfsonlinux repos defined and not duplicated:


    Code
    awk '/zfs/&&!/^#/' /etc/apt/sources.list.d/*
    
    
    deb https://dl.bintray.com/openmediavault-plugin-developers/stoneburner-zfs wheezy main 
    deb http://archive.zfsonlinux.org/debian wheezy main 
    deb [arch=amd64] http://archive.zfsonlinux.org/debian wheezy main


    I had three lines in two different files. Each one is unique, so 'apt-get update' won't complain later.


    4) install the latest ZFS packages again. At the time of writing this is spl packages @ 0.6.5-1-wheezy, zfs packages @ 0.6.5.2-2-wheezy, and debian-zfs at 7~wheezy


    Code
    apt-get update
    apt-get -f install


    (this came up clean)


    Code
    apt-get install zfsonlinuz debian-zfs zfsutils spl spl-dkms


    (it will include prerequisites automatically - I think you only need debian-zfs )


    I did a 'modload zfs' and a 'zpool list' to make sure the module was loading. I didn't bother importing my zpool yet. I also did an update-grub and update-initramfs -u after doing the modload because I'm paranoid.


    5) install the openmediavault-zfs


    Code
    dpkg -i openmediavault-zfs_0.6.4.2_amd64.deb


    6) reboot


    7) I had to do a zpool import -d /dev to find my zpool, then did a zpool import -d /dev zpoolname to import the pool. History taught me that the initramfs needs to be updated to remember the imported zpools (from a long time ago) so I did another update-initramfs -u just to be safe.


    hope this helps
    -Ed


  • Why did you need to build a .deb file I was talking about the new ZFS updates in the GUI.

Jetzt mitmachen!

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