Error removing 'Faulted' boot disk

{HD}

Dabbler
Joined
Oct 30, 2016
Messages
48
I had 1 of a 2 drive mirror 'Faulted' I put an identical usb disk in and hit 'replace' on the faulted disk and selected the new disk. When it was done doing what it does I tried to 'detach' the 'Faulted' disk but I get the following error:

Code:
Request Method: POST
Request URL: https://192.168.1.15/system/bootenv/pool/detach/da12p2/old/
Software Version: FreeNAS-11.1-U1 (f7e246b8f)
Exception Type: ClientException
Exception Value:
[EUNKNOWN] Can detach disks from mirrors and spares only
Exception Location: /usr/local/lib/python3.6/site-packages/middlewared/client/client.py in call, line 394
Server time: Wed, 7 Feb 2018 20:13:44 -0500

Code:
Environment:

Software Version: FreeNAS-11.1-U1 (f7e246b8f)
Request Method: POST
Request URL: https://192.168.1.15/system/bootenv/pool/detach/da12p2/old/


Traceback:
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
  42.			 response = get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _legacy_get_response
  249.			 response = self._get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
  178.			 response = middleware_method(request, callback, callback_args, callback_kwargs)
File "./freenasUI/freeadmin/middleware.py" in process_view
  162.		 return login_required(view_func)(request, *view_args, **view_kwargs)
File "/usr/local/lib/python3.6/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
  23.				 return view_func(request, *args, **kwargs)
File "./freenasUI/system/views.py" in bootenv_pool_detach
  514.			 c.call('boot.detach', label)
File "./freenasUI/system/views.py" in bootenv_pool_detach
  514.			 c.call('boot.detach', label)
File "/usr/local/lib/python3.6/site-packages/middlewared/client/client.py" in call
  394.			 raise ClientException(c.error, c.errno, c.trace, c.extra)

Exception Type: ClientException at /system/bootenv/pool/detach/da12p2/old/
Exception Value: [EUNKNOWN] Can detach disks from mirrors and spares only


Code:
Request information
GET
No GET data

POST
Variable Value
__form_id 'form_str'
FILES
No FILES data

COOKIES
Variable Value
csrftoken 'Zxa2SLrZbtQMuflOvhOvEbtcAh4En9H9egIOhOV4ODnMRNVbXv8djTIxtJJ25VyE'
fntreeSaveStateCookie 'root%2Croot%2F1%2Croot%2F1%2F2%2Croot%2F1%2F5%2Croot%2F1%2F6'
sessionid 'lq2kk5fkwhyl9rn74ne36asm9t3l2qwa'
META
Variable Value


How do I safely remove this thing?
 

diversity

Contributor
Joined
Dec 4, 2018
Messages
128
I can report that the issue is still present in FreeNAS-11.2-U6
Same thing happend to me just now. Got a message that one of my boot usb's was degraded. First i tried to add a 3rd usb before removing the faulty one but it said that a 3 way mirror was not supported yet.

Then I replaced the usb with a new one and tried to detach the faulty one:
[EUNKNOWN] Can detach disks from mirrors and spares only. More info below.

It happens when the replace process is still going on. If one waits until the process is done then the replaced disk will be gone after loading the overview again and the disk will show up as unused in the disks overview.

I am sure this is something seasoned users do not run into as they know the correct procedure but new users might be startled by the error message. Perhaps a friendly message stating that the drive is in the process of being removed from the pool and that no action is necessary will help keep the heart rate steady of new users. :)

More info:
return await self._call(message['method'], serviceobj, methodobj, params, app=app, io_thread=False)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1044, in _call
return await methodobj(*args)
File "/usr/local/lib/python3.6/site-packages/middlewared/schema.py", line 664, in nf
return await f(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/boot.py", line 209, in detach
await self.middleware.call('zfs.pool.detach', 'freenas-boot', dev)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1100, in call
return await self._call(name, serviceobj, methodobj, params, app=app, pipes=pipes, io_thread=True)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1041, in _call
return await self._call_worker(name, *args)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1061, in _call_worker
return await self.run_in_proc(main_worker, name, args, job)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 995, in run_in_proc
return await self.run_in_executor(self.__procpool, method, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 971, in run_in_executor
return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
middlewared.service_exception.CallError: [EUNKNOWN] Can detach disks from mirrors and spares only
 

diversity

Contributor
Joined
Dec 4, 2018
Messages
128
1573999956034.png
 

diversity

Contributor
Joined
Dec 4, 2018
Messages
128
@dlavigne out of curiosity, as I am a relativly new and inexperienced user. How does the above information help you?
 
Top