Using an HGST H4060-S and getting the following error on scanning for disks.
Traceback (most recent call last):
File “/opt/rockstor/src/rockstor/rest_framework_custom/generic_view.py”, line 40, in _handle_exception
yield
File “/opt/rockstor/src/rockstor/storageadmin/views/disk.py”, line 417, in post
return self._update_disk_state()
^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib64/python3.11/contextlib.py”, line 81, in inner
return func(*args, **kwds)
^^^^^^^^^^^^^^^^^^^
File “/opt/rockstor/src/rockstor/storageadmin/views/disk.py”, line 227, in _update_disk_state
dob.save()
File “/opt/rockstor/.venv/lib/python3.11/site-packages/django/db/models/base.py”, line 814, in save
self.save_base(
File “/opt/rockstor/.venv/lib/python3.11/site-packages/django/db/models/base.py”, line 877, in save_base
updated = self._save_table(
^^^^^^^^^^^^^^^^^
File “/opt/rockstor/.venv/lib/python3.11/site-packages/django/db/models/base.py”, line 1020, in _save_table
results = self._do_insert(
^^^^^^^^^^^^^^^^
File “/opt/rockstor/.venv/lib/python3.11/site-packages/django/db/models/base.py”, line 1061, in _do_insert
return manager._insert(
^^^^^^^^^^^^^^^^
File “/opt/rockstor/.venv/lib/python3.11/site-packages/django/db/models/manager.py”, line 87, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/rockstor/.venv/lib/python3.11/site-packages/django/db/models/query.py”, line 1805, in _insert
return query.get_compiler(using=using).execute_sql(returning_fields)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/rockstor/.venv/lib/python3.11/site-packages/django/db/models/sql/compiler.py”, line 1822, in execute_sql
cursor.execute(sql, params)
File “/opt/rockstor/.venv/lib/python3.11/site-packages/django/db/backends/utils.py”, line 67, in execute
return self._execute_with_wrappers(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/rockstor/.venv/lib/python3.11/site-packages/django/db/backends/utils.py”, line 80, in _execute_with_wrappers
return executor(sql, params, many, context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/rockstor/.venv/lib/python3.11/site-packages/django/db/backends/utils.py”, line 84, in _execute
with self.db.wrap_database_errors:
File “/opt/rockstor/.venv/lib/python3.11/site-packages/django/db/utils.py”, line 91, in exit
raise dj_exc_value.with_traceback(traceback) from exc_value
File “/opt/rockstor/.venv/lib/python3.11/site-packages/django/db/backends/utils.py”, line 89, in _execute
return self.cursor.execute(sql, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/rockstor/.venv/lib/python3.11/site-packages/psycopg/cursor.py”, line 97, in execute
raise ex.with_traceback(None)
django.db.utils.IntegrityError: duplicate key value violates unique constraint “storageadmin_disk_name_key”
DETAIL: Key (name)=(wwn-0x5000cca28f2098e8) already exists.
[08/Sep/2025 08:55:32] ERROR [smart_manager.data_collector:1017] Failed to update disk state… exception: 500 Server Error: Internal Server Error for url: http://127.0.0.1:8000/api/disks/scan