How to remove missing file system/device?
- uaytac
- Geschlossen
-
-
is there another way to remove these missing folders?
Yes, plug the drive back in, remove SMB shares, remove Shared Folders then unmount the drive, then remove it physically.
-
There should be another way without plugging the drive back :).
-
Remove the mntent entry from /etc/openmediavault/config.xml
-
Remove the mntent entry from /etc/openmediavault/config.xml
@votdev I have seen the need to remove a missing file system several times in the past here in the forum. Sometimes people replace a drive by a new drive and format the old drive in order to use it otherwise but forget to remove it first from OMV. Is it really the right way to have to make modifications to the OMV´s config database to solve such an issue? I think a normal user should not have to do this.
-
Is it really the right way to have to make modifications to the OMV´s config database to solve such an issue?
He changed the code so that Delete should work but it doesn't always. Especially when people disconnect a disk without removing everything attached to the filesystem. In that case, it is necessary to do the config edit.
-
In that case, it is necessary to do the config edit.
Yes, I agree. That is the current situation. Nevertheless I think there is room for improvement.
-
Nevertheless I think there is room for improvement.
I would not be fun to write the code to search the database for every thing related to that filesystem. It would be different if it was a relational database instead of xml. I doubt Volker is going to spend time on this.
-
I removed the mntent entry from /etc/openmediavault/config.xml. It is cleared the problem. Now When I try to add new shared folder. OMV gives the below error message.
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; omv-salt deploy run systemd 2>&1' with exit code '1': /usr/lib/python3/dist-packages/salt/modules/file.py:32: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
from collections import Iterable, Mapping, namedtuple
debian:
----------
ID: remove_sharedfolder_mount_unit_files
Function: module.run
Result: True
Comment: file.find: ['/etc/systemd/system/sharedfolders-AppData.mount', '/etc/systemd/system/sharedfolders-Downloads.mount', '/etc/systemd/system/sharedfolders-WorkFiles.mount']
Started: 13:50:28.427936
Duration: 3.135 ms
Changes:
----------
file.find:
- /etc/systemd/system/sharedfolders-AppData.mount
- /etc/systemd/system/sharedfolders-Downloads.mount
- /etc/systemd/system/sharedfolders-WorkFiles.mount
----------
ID: configure_sharedfolder_WorkFiles_mount_unit_file
Function: file.managed
Name: /etc/systemd/system/sharedfolders-WorkFiles.mount
Result: True
Comment: File /etc/systemd/system/sharedfolders-WorkFiles.mount updated
Started: 13:50:28.432862
Duration: 3.174 ms
Changes:
----------
diff:
New file
mode:
0644
----------
ID: configure_sharedfolder_AppData_mount_unit_file
Function: file.managed
Name: /etc/systemd/system/sharedfolders-AppData.mount
Result: True
Comment: File /etc/systemd/system/sharedfolders-AppData.mount updated
Started: 13:50:28.436139
Duration: 2.501 ms
Changes:
----------
diff:
New file
mode:
0644
----------
ID: configure_sharedfolder_aaaa_mount_unit_file
Function: file.managed
Name: /etc/systemd/system/sharedfolders-aaaa.mount
Result: True
Comment: File /etc/systemd/system/sharedfolders-aaaa.mount updated
Started: 13:50:28.438829
Duration: 12.834 ms
Changes:
----------
diff:
New file
mode:
0644
----------
ID: sharedfolder_mount_units_systemctl_daemon_reload
Function: module.run
Name: service.systemctl_reload
Result: True
Comment:
Started: 13:50:28.451819
Duration: 0.383 ms
Changes:
----------
ID: enable_sharedfolder_WorkFiles_mount_unit
Function: service.enabled
Name: sharedfolders-WorkFiles.mount
Result: True
Comment: Service sharedfolders-WorkFiles.mount is already enabled, and is in the desired state
Started: 13:50:28.460101
Duration: 276.577 ms
Changes:
----------
ID: restart_sharedfolder_WorkFiles_mount_unit
Function: module.run
Result: True
Comment: service.restart: True
Started: 13:50:28.736954
Duration: 31.539 ms
Changes:
----------
service.restart:
True
----------
ID: enable_sharedfolder_AppData_mount_unit
Function: service.enabled
Name: sharedfolders-AppData.mount
Result: True
Comment: Service sharedfolders-AppData.mount is already enabled, and is in the desired state
Started: 13:50:28.768767
Duration: 20.26 ms
Changes:
----------
ID: restart_sharedfolder_AppData_mount_unit
Function: module.run
Result: False
Comment: An exception occurred in this state: Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/salt/state.py", line 1933, in call
**cdata['kwargs'])
File "/usr/lib/python3/dist-packages/salt/loader.py", line 1951, in wrapper
return f(*args, **kwargs)
File "/usr/lib/python3/dist-packages/salt/utils/decorators/__init__.py", line 631, in _decorate
return self._call_function(kwargs)
File "/usr/lib/python3/dist-packages/salt/utils/decorators/__init__.py", line 334, in _call_function
raise error
File "/usr/lib/python3/dist-packages/salt/utils/decorators/__init__.py", line 321, in _call_function
return self._function(*args, **kwargs)
File "/usr/lib/python3/dist-packages/salt/states/module.py", line 294, in run
func_args=kwargs.get(func))
File "/usr/lib/python3/dist-packages/salt/states/module.py", line 358, in _call_function
mret = __salt__[name](*arg_type, **func_kw)
File "/usr/lib/python3/dist-packages/salt/modules/systemd_service.py", line 906, in restart
raise CommandExecutionError(_strip_scope(ret['stderr']))
salt.exceptions.CommandExecutionError: Assertion failed on job for sharedfolders-AppData.mount.
Started: 13:50:28.789286
Duration: 21.947 ms
Changes:
----------
ID: enable_sharedfolder_aaaa_mount_unit
Function: service.enabled
Name: sharedfolders-aaaa.mount
Result: True
Comment: Service sharedfolders-aaaa.mount has been enabled, and is in the desired state
Started: 13:50:28.811503
Duration: 312.583 ms
Changes:
----------
sharedfolders-aaaa.mount:
True
----------
ID: restart_sharedfolder_aaaa_mount_unit
Function: module.run
Result: True
Comment: service.restart: True
Started: 13:50:29.124353
Duration: 28.31 ms
Changes:
----------
service.restart:
True
----------
ID: configure_tmp_mount_unit_file
Function: file.managed
Name: /etc/systemd/system/tmp.mount
Result: True
Comment: File /etc/systemd/system/tmp.mount is in the correct state
Started: 13:50:29.152934
Duration: 29.397 ms
Changes:
----------
ID: tmp_mount_unit_systemctl_daemon_reload
Function: module.run
Name: service.systemctl_reload
Result: True
Comment: State was not run because none of the onchanges reqs changed
Started: 13:50:29.182948
Duration: 0.004 ms
Changes:Summary for debian
-------------
Succeeded: 12 (changed=7)
Failed: 1
-------------
Total states run: 13
Total run time: 742.644 ms in /usr/share/php/openmediavault/system/process.inc:182
Stack trace:
#0 /usr/share/php/openmediavault/engine/module/serviceabstract.inc(60): OMV\System\Process->execute()
#1 /usr/share/openmediavault/engined/rpc/config.inc(167): OMV\Engine\Module\ServiceAbstract->deploy()
#2 [internal function]: Engined\Rpc\Config->applyChanges(Array, Array)
#3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
#4 /usr/share/php/openmediavault/rpc/serviceabstract.inc(149): OMV\Rpc\ServiceAbstract->callMethod('applyChanges', Array, Array)
#5 /usr/share/php/openmediavault/rpc/serviceabstract.inc(588): OMV\Rpc\ServiceAbstract->OMV\Rpc\{closure}('/tmp/bgstatusbW...', '/tmp/bgoutput1o...')
#6 /usr/share/php/openmediavault/rpc/serviceabstract.inc(159): OMV\Rpc\ServiceAbstract->execBgProc(Object(Closure))
#7 /usr/share/openmediavault/engined/rpc/config.inc(189): OMV\Rpc\ServiceAbstract->callMethodBg('applyChanges', Array, Array)
#8 [internal function]: Engined\Rpc\Config->applyChangesBg(Array, Array)
#9 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
#10 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('applyChangesBg', Array, Array)
#11 /usr/sbin/omv-engined(537): OMV\Rpc\Rpc::call('Config', 'applyChangesBg', Array, Array, 1)
#12 {main} -
So putting the drive back is the KIS option
-
I removed the mntent entry from /etc/openmediavault/config.xml. It is cleared the problem. Now When I try to add new shared folder. OMV gives the below error message.
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; omv-salt deploy run systemd 2>&1' with exit code '1': /usr/lib/python3/dist-packages/salt/modules/file.py:32: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
from collections import Iterable, Mapping, namedtuple
debian:
----------
ID: remove_sharedfolder_mount_unit_files
Function: module.run
Result: True
Comment: file.find: ['/etc/systemd/system/sharedfolders-AppData.mount', '/etc/systemd/system/sharedfolders-Downloads.mount', '/etc/systemd/system/sharedfolders-WorkFiles.mount']
Started: 13:50:28.427936
Duration: 3.135 ms
Changes:
----------
file.find:
- /etc/systemd/system/sharedfolders-AppData.mount
- /etc/systemd/system/sharedfolders-Downloads.mount
- /etc/systemd/system/sharedfolders-WorkFiles.mount
----------
ID: configure_sharedfolder_WorkFiles_mount_unit_file
Function: file.managed
Name: /etc/systemd/system/sharedfolders-WorkFiles.mount
Result: True
Comment: File /etc/systemd/system/sharedfolders-WorkFiles.mount updated
Started: 13:50:28.432862
Duration: 3.174 ms
Changes:
----------
diff:
New file
mode:
0644
----------
ID: configure_sharedfolder_AppData_mount_unit_file
Function: file.managed
Name: /etc/systemd/system/sharedfolders-AppData.mount
Result: True
Comment: File /etc/systemd/system/sharedfolders-AppData.mount updated
Started: 13:50:28.436139
Duration: 2.501 ms
Changes:
----------
diff:
New file
mode:
0644
----------
ID: configure_sharedfolder_aaaa_mount_unit_file
Function: file.managed
Name: /etc/systemd/system/sharedfolders-aaaa.mount
Result: True
Comment: File /etc/systemd/system/sharedfolders-aaaa.mount updated
Started: 13:50:28.438829
Duration: 12.834 ms
Changes:
----------
diff:
New file
mode:
0644
----------
ID: sharedfolder_mount_units_systemctl_daemon_reload
Function: module.run
Name: service.systemctl_reload
Result: True
Comment:
Started: 13:50:28.451819
Duration: 0.383 ms
Changes:
----------
ID: enable_sharedfolder_WorkFiles_mount_unit
Function: service.enabled
Name: sharedfolders-WorkFiles.mount
Result: True
Comment: Service sharedfolders-WorkFiles.mount is already enabled, and is in the desired state
Started: 13:50:28.460101
Duration: 276.577 ms
Changes:
----------
ID: restart_sharedfolder_WorkFiles_mount_unit
Function: module.run
Result: True
Comment: service.restart: True
Started: 13:50:28.736954
Duration: 31.539 ms
Changes:
----------
service.restart:
True
----------
ID: enable_sharedfolder_AppData_mount_unit
Function: service.enabled
Name: sharedfolders-AppData.mount
Result: True
Comment: Service sharedfolders-AppData.mount is already enabled, and is in the desired state
Started: 13:50:28.768767
Duration: 20.26 ms
Changes:
----------
ID: restart_sharedfolder_AppData_mount_unit
Function: module.run
Result: False
Comment: An exception occurred in this state: Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/salt/state.py", line 1933, in call
**cdata['kwargs'])
File "/usr/lib/python3/dist-packages/salt/loader.py", line 1951, in wrapper
return f(*args, **kwargs)
File "/usr/lib/python3/dist-packages/salt/utils/decorators/__init__.py", line 631, in _decorate
return self._call_function(kwargs)
File "/usr/lib/python3/dist-packages/salt/utils/decorators/__init__.py", line 334, in _call_function
raise error
File "/usr/lib/python3/dist-packages/salt/utils/decorators/__init__.py", line 321, in _call_function
return self._function(*args, **kwargs)
File "/usr/lib/python3/dist-packages/salt/states/module.py", line 294, in run
func_args=kwargs.get(func))
File "/usr/lib/python3/dist-packages/salt/states/module.py", line 358, in _call_function
mret = __salt__[name](*arg_type, **func_kw)
File "/usr/lib/python3/dist-packages/salt/modules/systemd_service.py", line 906, in restart
raise CommandExecutionError(_strip_scope(ret['stderr']))
salt.exceptions.CommandExecutionError: Assertion failed on job for sharedfolders-AppData.mount.
Started: 13:50:28.789286
Duration: 21.947 ms
Changes:
----------
ID: enable_sharedfolder_aaaa_mount_unit
Function: service.enabled
Name: sharedfolders-aaaa.mount
Result: True
Comment: Service sharedfolders-aaaa.mount has been enabled, and is in the desired state
Started: 13:50:28.811503
Duration: 312.583 ms
Changes:
----------
sharedfolders-aaaa.mount:
True
----------
ID: restart_sharedfolder_aaaa_mount_unit
Function: module.run
Result: True
Comment: service.restart: True
Started: 13:50:29.124353
Duration: 28.31 ms
Changes:
----------
service.restart:
True
----------
ID: configure_tmp_mount_unit_file
Function: file.managed
Name: /etc/systemd/system/tmp.mount
Result: True
Comment: File /etc/systemd/system/tmp.mount is in the correct state
Started: 13:50:29.152934
Duration: 29.397 ms
Changes:
----------
ID: tmp_mount_unit_systemctl_daemon_reload
Function: module.run
Name: service.systemctl_reload
Result: True
Comment: State was not run because none of the onchanges reqs changed
Started: 13:50:29.182948
Duration: 0.004 ms
Changes:Summary for debian
-------------
Succeeded: 12 (changed=7)
Failed: 1
-------------
Total states run: 13
Total run time: 742.644 ms in /usr/share/php/openmediavault/system/process.inc:182
Stack trace:
#0 /usr/share/php/openmediavault/engine/module/serviceabstract.inc(60): OMV\System\Process->execute()
#1 /usr/share/openmediavault/engined/rpc/config.inc(167): OMV\Engine\Module\ServiceAbstract->deploy()
#2 [internal function]: Engined\Rpc\Config->applyChanges(Array, Array)
#3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
#4 /usr/share/php/openmediavault/rpc/serviceabstract.inc(149): OMV\Rpc\ServiceAbstract->callMethod('applyChanges', Array, Array)
#5 /usr/share/php/openmediavault/rpc/serviceabstract.inc(588): OMV\Rpc\ServiceAbstract->OMV\Rpc\{closure}('/tmp/bgstatusbW...', '/tmp/bgoutput1o...')
#6 /usr/share/php/openmediavault/rpc/serviceabstract.inc(159): OMV\Rpc\ServiceAbstract->execBgProc(Object(Closure))
#7 /usr/share/openmediavault/engined/rpc/config.inc(189): OMV\Rpc\ServiceAbstract->callMethodBg('applyChanges', Array, Array)
#8 [internal function]: Engined\Rpc\Config->applyChangesBg(Array, Array)
#9 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
#10 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('applyChangesBg', Array, Array)
#11 /usr/sbin/omv-engined(537): OMV\Rpc\Rpc::call('Config', 'applyChangesBg', Array, Array, 1)
#12 {main} -
I doubt Volker is going to spend time on this.
Probably. Even so this is a quite common problem which many users have from time to time.
I´m sorry for insisting here. I find it unreasonable for a user to have to change the database. Sometimes with limited success, as you can see from the current example.
So introduce e.g. a 'fake" drive only to be able to do the necessary house keeping later.
-
I can not fix something that I can not reproduce. In all situations that come to my mind removing a filesystem was successful.
-
I removed some backup folders using rm -r <folder directory> on one of my external drives which did the trick but the size of the backup drive did not reduce accordingly. I thought it might have been locked somehow so reboote my system but still the size has not reduced - did I do something wrong?
-
-
Remove the mntent entry from /etc/openmediavault/config.xml
It worked like a charm for me under OMV 6.0.39.
As soon as the file was modified the workbench made the update instantly
-
Interface only allows mount
you unmount from the cli
-
Try umount not unmout
-
not mounted, as I have deleted the folder it was mounted in in \srv
That's why it will not umount and therefore not delete from omv's database, you'll have to delete the reference in /etc/openmediavault/config.xml and locate the reference under mntent and remove it, back up the file first
-
It is not why, it is why I deleted it. There is no unmount feature in OMV web GUI.
Only because you say it,
If the filesystems ISN'T mounted, then OMV can't umount nothing.
Don't mistake the OMV errors with the errors USERS make.
Jetzt mitmachen!
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!