Unable to edit or remove shared folder after removing hdd

    • OMV 4.x
    • Resolved
    • Unable to edit or remove shared folder after removing hdd

      Hi everyone.
      I'm having a problem with the shared folder: I can't edit or delete them after I had to take out the hdd.
      This is the error I'm recieving:

      Source Code

      1. Error #0:
      2. OMV\ExecException: Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin;
      3. export LANG=C.UTF-8; systemctl restart 'sharedfolders-Dati.mount' 2>&1' with exit code '1':
      4. A dependency job for sharedfolders-Dati.mount failed. See 'journalctl -xe' for details. in
      5. /usr/share/php/openmediavault/system/process.inc:182
      6. Stack trace:
      7. #0 /usr/share/php/openmediavault/system/systemctl.inc(86): OMV\System\Process->execute(Array, 1)
      8. #1 /usr/share/php/openmediavault/system/systemctl.inc(160): OMV\System\SystemCtl->exec('restart', NULL, false)
      9. #2 /usr/share/openmediavault/engined/module/sharedfolders.inc(66): OMV\System\SystemCtl->restart()
      10. #3 /usr/share/openmediavault/engined/rpc/config.inc(194): OMVModuleSharedfolders->startService()
      11. #4 [internal function]: OMVRpcServiceConfig->applyChanges(Array, Array)
      12. #5 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
      13. #6 /usr/share/php/openmediavault/rpc/serviceabstract.inc(149): OMV\Rpc\ServiceAbstract->callMethod('applyChanges', Array, Array)
      14. #7 /usr/share/php/openmediavault/rpc/serviceabstract.inc(565): OMV\Rpc\ServiceAbstract->OMV\Rpc\{closure}('/tmp/bgstatusbM...', '/tmp/bgoutputCw...')
      15. #8 /usr/share/php/openmediavault/rpc/serviceabstract.inc(159): OMV\Rpc\ServiceAbstract->execBgProc(Object(Closure))
      16. #9 /usr/share/openmediavault/engined/rpc/config.inc(213): OMV\Rpc\ServiceAbstract->callMethodBg('applyChanges', Array, Array)
      17. #10 [internal function]: OMVRpcServiceConfig->applyChangesBg(Array, Array)
      18. #11 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
      19. #12 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('applyChangesBg', Array, Array)
      20. #13 /usr/sbin/omv-engined(536): OMV\Rpc\Rpc::call('Config', 'applyChangesBg', Array, Array, 1)
      21. #14 {main}
      Display All
      How can I solve it?
      Intel G4400 - Asrock H170M Pro4S - Syba SI-PEX40064 Marvell 88SE9125 - 8GB ram - Corsair VS350W - 2X6TB Seagate Ironwolf - 4x2TB WD Enterprise
      OMV 4.1.17 - Kernel 4.18 backport 3 - omvextrasorg 4.1.2
    • There is a thread about this: Error when deleting shared folder

      In the end it seems you have to edit config.xml manually. Make a backup of that file first!!!

      From Post 43 of that thread:
      After removing a sharedfolder entry and filesystem entry in config.xml,
      you should execute to cleanup fstab and the sharedfolder bind mount
      units:
      omv-mkconf fstab
      omv-mkconf systemd
      Odroid HC2 - armbian - Seagate ST4000DM004 - OMV4.x
      Asrock Q1900DC-ITX - 16GB - 2x Seagate ST3000VN000 - Intenso SSD 120GB - OMV4.x
      :!: Backup - Solutions to common problems - OMV setup videos - OMV4 Documentation - user guide :!:
    • thanks!
      So this is what I should do:
      1) Delete every old sharedfolder from webui
      2) nano /etc/openmediavault/config.xml
      3) Delete every sharedfolder from config like thius:
      <sharedfolder>
      <uuid>4774b1ce-1008-4e8b-a9c5-983282dbe496</uuid>
      <name>Anime</name>
      <comment>Plex</comment>
      <mntentref>1bbe2dbe-c268-4f84-98d4-e3362147d5e9</mntentref>
      <reldirpath>Dati/Anime/</reldirpath>
      <privileges></privileges>
      </sharedfolder>
      4) omv-mkconf fstab
      5) omv-mkconf systemd

      6) Run Apply from webui?


      right?
      Intel G4400 - Asrock H170M Pro4S - Syba SI-PEX40064 Marvell 88SE9125 - 8GB ram - Corsair VS350W - 2X6TB Seagate Ironwolf - 4x2TB WD Enterprise
      OMV 4.1.17 - Kernel 4.18 backport 3 - omvextrasorg 4.1.2
    • Make a copy of config.xml first.
      Then check if there is another occurrence of "Anime" in config.xml. In nano you can use Ctrl+w to search. There should be no occurrence, but if you find one, better to post here where you found it.

      Where did you get point 6) from?
      Edit: If the first step works, you don't have to edit config.xml
      If you already know that the first step will not work, you don't have to do it. Then you also don't need step 6)

      Rest looks fine.

      Of course, only handle those folders which had been on the drive you removed.
      Odroid HC2 - armbian - Seagate ST4000DM004 - OMV4.x
      Asrock Q1900DC-ITX - 16GB - 2x Seagate ST3000VN000 - Intenso SSD 120GB - OMV4.x
      :!: Backup - Solutions to common problems - OMV setup videos - OMV4 Documentation - user guide :!:
    • Actually had to go throught point 4,5, and 6 since deleting from webui delete the shared folder from the config file :D Thanks a lot for the help!
      Intel G4400 - Asrock H170M Pro4S - Syba SI-PEX40064 Marvell 88SE9125 - 8GB ram - Corsair VS350W - 2X6TB Seagate Ironwolf - 4x2TB WD Enterprise
      OMV 4.1.17 - Kernel 4.18 backport 3 - omvextrasorg 4.1.2
    • Yeah of course. I thought that i was clear about what I did. That's a better explanation:

      1) Delete every old sharedfolder from webui
      2) nano /etc/openmediavault/config.xml
      3) Check if the sharedfolder are still there. If yes go to point 3.5, if not to 4.
      3.5) CAUTION: I DID NOT DID THAT SINCE THEY WERE ALREADY GONE. THIS
      Delete every sharedfolder from config like this:
      <sharedfolder>
      <uuid>4774b1ce-1008-4e8b-a9c5-983282dbe496</uuid>
      <name>Anime</name>
      <comment>Plex</comment>
      <mntentref>1bbe2dbe-c268-4f84-98d4-e3362147d5e9</mntentref>
      <reldirpath>Dati/Anime/</reldirpath>
      <privileges></privileges>
      </sharedfolder>
      4) omv-mkconf fstab
      5) omv-mkconf systemd
      6) Run Apply from webui
      Intel G4400 - Asrock H170M Pro4S - Syba SI-PEX40064 Marvell 88SE9125 - 8GB ram - Corsair VS350W - 2X6TB Seagate Ironwolf - 4x2TB WD Enterprise
      OMV 4.1.17 - Kernel 4.18 backport 3 - omvextrasorg 4.1.2
    • mipi wrote:

      Is this the recommended solution? Or is it a first approach? Have the same probs here (while applying a share) and I think applying shares is somewhat basic to a NAS, isn't it?
      I think that it should be better to remove shares BEFORE removing the hdd. This solution is only if you coudln't do it :)
      Intel G4400 - Asrock H170M Pro4S - Syba SI-PEX40064 Marvell 88SE9125 - 8GB ram - Corsair VS350W - 2X6TB Seagate Ironwolf - 4x2TB WD Enterprise
      OMV 4.1.17 - Kernel 4.18 backport 3 - omvextrasorg 4.1.2