Error when trying to apply changes for added shared folders

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Error when trying to apply changes for added shared folders

      Hello,

      I keep getting this error when trying to save new shared folders and respective smb settings as follows:

      Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; systemctl restart 'sharedfolders-userfiles.mount' 2>&1' with exit code '1'

      Error #0:
      OMV\ExecException: Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; systemctl restart 'sharedfolders-userfiles.mount' 2>&1' with exit code '1': Job for sharedfolders-userfiles.mount failed.
      See "systemctl status sharedfolders-userfiles.mount" and "journalctl -xe" for details. in /usr/share/php/openmediavault/system/process.inc:182
      Stack trace:
      #0 /usr/share/php/openmediavault/system/systemctl.inc(86): OMV\System\Process->execute(Array, 1)
      #1 /usr/share/php/openmediavault/system/systemctl.inc(160): OMV\System\SystemCtl->exec('restart', NULL, false)
      #2 /usr/share/openmediavault/engined/module/sharedfolders.inc(66): OMV\System\SystemCtl->restart()
      #3 /usr/share/openmediavault/engined/rpc/config.inc(194): OMVModuleSharedfolders->startService()
      #4 [internal function]: OMVRpcServiceConfig->applyChanges(Array, Array)
      #5 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
      #6 /usr/share/php/openmediavault/rpc/serviceabstract.inc(149): OMV\Rpc\ServiceAbstract->callMethod('applyChanges', Array, Array)
      #7 /usr/share/php/openmediavault/rpc/serviceabstract.inc(565): OMV\Rpc\ServiceAbstract->OMV\Rpc\{closure}('/tmp/bgstatusAm...', '/tmp/bgoutputZ6...')
      #8 /usr/share/php/openmediavault/rpc/serviceabstract.inc(159): OMV\Rpc\ServiceAbstract->execBgProc(Object(Closure))
      #9 /usr/share/openmediavault/engined/rpc/config.inc(213): OMV\Rpc\ServiceAbstract->callMethodBg('applyChanges', Array, Array)
      #10 [internal function]: OMVRpcServiceConfig->applyChangesBg(Array, Array)
      #11 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
      #12 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('applyChangesBg', Array, Array)
      #13 /usr/sbin/omv-engined(536): OMV\Rpc\Rpc::call('Config', 'applyChangesBg', Array, Array, 1)
      #14 {main}

      The folder it makes reference to here is a parent folder (userfiles) to the shared folders added beneath. It is unclear to me why when saving the settings the parent folder would be unmounted. The parent folder itself is also shared with a single user (myself as an admin). When adding sub folders through OMV to that parent folder I get this error every time. It takes a restart of the OMV server to subsequently allow the changes to then be saved.... until the next time.

      Running "systemctl status sharedfolders-userfiles.mount" after the fact results in the following:

      systemctl status sharedfolders-userfiles.mount
      ● sharedfolders-userfiles.mount - Mount shared folder userfiles to /sharedfolders/userfiles
      Loaded: loaded (/etc/systemd/system/sharedfolders-userfiles.mount; enabled; vendor preset: enabled)
      Active: active (mounted) (Result: exit-code) since Tue 2019-04-30 13:59:22 EDT; 18min ago
      Where: /sharedfolders/userfiles
      What: /dev/md127p1
      Process: 6115 ExecUnmount=/bin/umount /sharedfolders/userfiles (code=exited, status=32)
      Tasks: 0 (limit: 4915)
      CGroup: /system.slice/sharedfolders-userfiles.mount

      Apr 30 13:59:22 nas1.domain.local systemd[1]: Unmounting Mount shared folder userfiles to /sharedfolders/userfiles...
      Apr 30 13:59:22 nas1.domain.local systemd[1]: sharedfolders-userfiles.mount: Mount process exited, code=exited status=32
      Apr 30 13:59:22 nas1.domain.local systemd[1]: Failed unmounting Mount shared folder userfiles to /sharedfolders/userfiles.

      Any assistance on this would be much appreciated. ^^
    • Are you using docker? I've ran into a similar error several times. When I looked into it a bit further, logs were constantly referencing my docker shares. I posted a thread but didn't really get any responses. For me it seems to have stopped after a recent update. Not really sure what was causing it or what was updated.

      Next time you get the error (assuming you're running docker, and are in a position where you can run this)...

      SSH your server and log in as root (you'll need an SSH client or local access.. not a docker like wetty.. you'll see on that in a second).

      Stop all docker containers... docker stop $(docker ps -a -q)

      Add/Remove whatever share you intend. If your problem is the same as mine, you should now be able to add/remove shares w/o error.

      Start all docker containers... docker start $(docker ps -a -q). Again if your problem is the same as mine, once you restart docker, you can't add/remove shares anymore. I'm assuming this must be a fairly unique problem, since I don't see a lot of threads on it.
      Air Conditioners are a lot like PC's... They work great until you open Windows.

    • Is this a simple path statement error, I've tested this but to use use your shared folder.

      Access Rights Management -> Shared Folders -> Add -> <Name of Share> -> Select Device -> Path -> /userfiles/<Name of Share>

      then select permissions, save and apply.
      Raid is not a backup! Would you go skydiving without a parachute?
    • I have just run systemctl on one of my own shares;

      this line on yours Process: 6115 ExecUnmount=/bin/umount /sharedfolders/userfiles (code=exited, status=32)

      on mine ends with status=0/success with a line under that mounting the share.

      Have you tried deleting the userfile share, do a reboot then recreate it, ensure that that works by setting an smb share, then creating your new share/s under that parent.
      Raid is not a backup! Would you go skydiving without a parachute?
    • hdokes wrote:

      KM0201, In this case I'm not running docker. This is a packaged install of OMV through the ISO install.

      Geaves, It is a simple path statement using the method you showed however as you see in the error msg it is the userfiles folder that it is trying to un-mount.
      I meant the omv docker add on.
      Air Conditioners are a lot like PC's... They work great until you open Windows.