OpenMediaVault-Plugin-Developers / openmediavault-zfs

OpenMediaVault plugin for zfs
74 stars 15 forks source link

ZFS device(s) not listed in devices dropdown #45

Closed teeminus closed 2 years ago

teeminus commented 6 years ago

Hi!

I created an issue for omv yesterday, because I can't create new shares on my ZFS device anymore. The issue got closed because it seems to be caused by the ZFS plugin (see last post of the issue).

When I set up my NAS a few month I used OMV v4.0.X with the ZFS plugin v4.0 to create the ZFS pool and all shares. After setting up the NAS I updated all system packages on a regular basis (but not the kernel).

Yesterday I tried to create a new shared folder but the device dropdown menu in the "Add shared folder" popup is empty. The device name for all previous created shares is set to "n/a" in the shared folder overview.

When I try to edit an existing shared folder, I get the following error message:

"Failed to execute XPath query '//system/fstab/mntent[uuid='3f8ede54-1dc4-47be-ab28-eedd97a3ab6d']'."
Error #0:
OMV\Config\DatabaseException: Failed to execute XPath query '//system/fstab/mntent[uuid='3f8ede54-1dc4-47be-ab28-eedd97a3ab6d']'. in /usr/share/php/openmediavault/config/database.inc:78
Stack trace:
#0 /usr/share/openmediavault/engined/rpc/sharemgmt.inc(231): OMV\Config\Database->get('conf.system.fil...', '3f8ede54-1dc4-4...')
#1 [internal function]: OMVRpcServiceShareMgmt->get(Array, Array)
#2 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
#3 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('get', Array, Array)
#4 /usr/sbin/omv-engined(536): OMV\Rpc\Rpc::call('ShareMgmt', 'get', Array, Array, 1)
#5 {main}

Some basic infos about my system:

root@omv:~# uname -a
Linux omv 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u5 (2017-09-19) x86_64 GNU/Linux
root@omv:~# dpkg -l | grep openmediavault
ii  openmediavault                      4.1.4-1                                 all          openmediavault - The open network attached storage solution
ii  openmediavault-domoticz             3.0                                     all          Domoticz plugin for OpenMediaVault
ii  openmediavault-keyring              1.0                                     all          GnuPG archive keys of the OpenMediaVault archive
ii  openmediavault-omvextrasorg         4.1.0                                   all          OMV-Extras.org Package Repositories for OpenMediaVault
ii  openmediavault-zfs                  4.0.2-1                                 amd64        OpenMediaVault plugin for ZFS
root@omv:~# dpkg -l | grep zfs
ii  libzfs2linux                        0.7.6-1~bpo9+1                          amd64        OpenZFS filesystem library for Linux
ii  openmediavault-zfs                  4.0.2-1                                 amd64        OpenMediaVault plugin for ZFS
ii  zfs-dkms                            0.7.6-1~bpo9+1                          all          OpenZFS filesystem kernel modules for Linux
ii  zfs-zed                             0.7.6-1~bpo9+1                          amd64        OpenZFS Event Daemon
ii  zfsutils-linux                      0.7.6-1~bpo9+1                          amd64        command-line tools to manage OpenZFS filesystems

Kind regards Teeminus

ryecoaaron commented 6 years ago

Seems like your pool(s) weren't imported at boot. Please post on the forum for better help.

sebakerckhof commented 5 years ago

@teeminus I'm currently experiencing the same issue. Did you eventually figure it out?

teeminus commented 5 years ago

@sebakerckhof Yes, I found a permanent solution for the problem. But I unfortunatelly don't remember the details of the solution and I recently upgraded my NAS to an other distribution with native ZFS support.

One thing I remember is that I didn't came up with the solution myself. When I remember this correctly, I found a script on the internet that had to be executed at boot time to unmout the network shares and mount them to the correct source location. And I think I due to the manual fix the OMV ZFS plugin (at least on the OMV webfrontend) was not useable anymore.

Sorry, thats all I remember and I don't know if I remember everything correctly, I might have mixed up some intermediate steps while trying to fix the problem.

Tsaukpaetra commented 4 years ago

I fixed it on my OMV 5.2.0 system by tagging zfs.target in the openmediavault-engined.service file, a la:

After=local-fs.target network.target zfs.target

A potential problem this may cause (that I have not tested!) is if your pools never mount, the OMV Web UI may never start!

Seems to work for me though, ymmv.

teeminus commented 2 years ago

I am closing this issue as it is quite outdated...