Cannot export pool - [EFAULT] pool or dataset is busy - [TrueNAS-SCALE-22.02.3]

jafin

Explorer
Joined
May 30, 2011
Messages
51
I am trying to destroy a pool, but receive the below error.
The pool is currently attempting a resilver.
(EDIT): Resilver is complete, error still occurs via the GUI.

* Is this expected?
* Is there any way to force destroy as there is no requirement for the resilver to complete?

Code:
[EFAULT] pool or dataset is busy

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/middlewared/job.py", line 411, in run
    await self.future
  File "/usr/lib/python3/dist-packages/middlewared/job.py", line 446, in __run_body
    rv = await self.method(*([self] + args))
  File "/usr/lib/python3/dist-packages/middlewared/schema.py", line 1272, in nf
    return await func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/middlewared/schema.py", line 1140, in nf
    res = await f(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/middlewared/plugins/pool.py", line 1601, in export
    await self.middleware.call('zfs.pool.delete', pool['name'])
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1344, in call
    return await self._call(
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1293, in _call
    return await methodobj(*prepared_call.args)
  File "/usr/lib/python3/dist-packages/middlewared/service.py", line 942, in delete
    rv = await self.middleware._call(
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1301, in _call
    return await self._call_worker(name, *prepared_call.args)
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1307, in _call_worker
    return await self.run_in_proc(main_worker, name, args, job)
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1222, in run_in_proc
    return await self.run_in_executor(self.__procpool, method, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1205, in run_in_executor
    return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
middlewared.service_exception.CallError: [EFAULT] pool or dataset is busy
 
Last edited:

Daisuke

Contributor
Joined
Jun 23, 2011
Messages
1,041
What's the pool status? From a terminal or System Settings > Shell, run (example for my software pool):
Code:
# zpool status software
  pool: software
 state: ONLINE
  scan: scrub repaired 0B in 00:01:26 with 0 errors on Sun Aug 14 00:01:28 2022
config:

    NAME                                      STATE     READ WRITE CKSUM
    software                                  ONLINE       0     0     0
      mirror-0                                ONLINE       0     0     0
        a089bcf4-3dc1-42d7-af8c-01122fcfba2a  ONLINE       0     0     0
        257bfd2f-b400-4aa5-b3e6-dbde1f479f2f  ONLINE       0     0     0

errors: No known data errors

If you have any errors, you will not be able to destroy the pool. If you don't have errors, stop all sharing services that use the pool or remove the sharing properties on the file systems, stop all read/write IO from programs on the pool and its file systems (check with zpool iostat software) and reboot the server, prior destroying the pool.
 
Last edited:

jafin

Explorer
Joined
May 30, 2011
Messages
51
What's the pool status? From a terminal or System Settings > Shell, run (example for my software pool): If you have any errors, you will not be able to destroy the pool.

No errors on the pool.
I ran a zpool iostat and there were values in the operations read/write (13kb/1kb). But they were static and did not change, even after waiting 1 hour.
Truenas had already removed the samba share, and I had no other services (I believe) accessing the pool.

In the end I restarted the server.
zpool iostat was now 0/0 (read/write)

reissued the destroy pool command and this time it succeeded.
 
Top