OpenMediaVault-Plugin-Developers / openmediavault-zfs

OpenMediaVault plugin for zfs
74 stars 15 forks source link

Numerous filesystems set to a none mountpoint #19

Closed sanmadjack closed 8 years ago

sanmadjack commented 8 years ago

I'm doing a re-organization of my server, and with most of my filesystems unmounted I get this error:

Error #0: exception 'OMV\AssertException' with message 'The configuration object 'conf.system.filesystem.mountpoint' is not unique. An object with the property 'dir' and value 'none' already exists.' in /usr/share/php/openmediavault/config/database.inc:480 Stack trace:

0 /usr/share/openmediavault/engined/rpc/fstab.inc(119): OMV\Config\Database->assertIsUnique(Object(OMV\Config\ConfigObject), 'dir')

1 [internal function]: OMVRpcServiceFsTab->set(Array, Array)

2 /usr/share/php/openmediavault/rpc/serviceabstract.inc(124): call_user_func_array(Array, Array)

3 /usr/share/php/openmediavault/rpc/rpc.inc(84): OMV\Rpc\ServiceAbstract->callMethod('set', Array, Array)

4 /usr/share/omvzfs/Utils.php(204): OMV\Rpc\Rpc::call('FsTab', 'set', Array, Array)

5 /usr/share/openmediavault/engined/rpc/zfs.inc(197): OMVModuleZFSUtil::fixOMVMntEnt(Array)

6 [internal function]: OMVRpcServiceZFS->getObjectTree(Array, Array)

7 /usr/share/php/openmediavault/rpc/serviceabstract.inc(124): call_user_func_array(Array, Array)

8 /usr/share/php/openmediavault/rpc/rpc.inc(84): OMV\Rpc\ServiceAbstract->callMethod('getObjectTree', Array, Array)

9 /usr/sbin/omv-engined(516): OMV\Rpc\Rpc::call('ZFS', 'getObjectTree', Array, Array, 1)

10 {main}

Seems it's trying to use the "none" from mountpoint as an actual mount point

luxflow commented 8 years ago

oh it should be handled by omv core since omv core limit dir or fsname to be uniquqe I ask votdev but i assume it take some time

sanmadjack commented 8 years ago

I added

if($object["dir"]=="none") {
continue;
}

To line 195 in Utils.php and so far it appears to be functioning properly, at least all my filesystems show up in the ZFS tab and only the mounted ones are in the device drop downs now. I haven't tested it extensively, and I don't know enough about OMV's internal filesystem workings to be able to say this won't cause an issue elsewhere.

luxflow commented 8 years ago

i think you cannot make omv shares for that filesystem try checkout it

sanmadjack commented 8 years ago

I successfully created an omv shared folder for my tank/home (which is mounted as /home), and I successfully shared that via samba.

luxflow commented 8 years ago

hmm it seems you are right it is nonsense to make omv share for mountpoint none i will patch soon or you pr

luxflow commented 8 years ago

fixed in 3.0.5 thx @sanmadjack