TrueNAS Scale, The export of the pool is impossible

Description

Hello,

It is impossible to export the pool.

> Storage> Export/disconnect

{{Error: concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/middlewared/plugins/zfs.py", line 197, in export
zfs.export_pool(pool)
File "libzfs.pyx", line 411, in libzfs.ZFS._exit_
File "/usr/lib/python3/dist-packages/middlewared/plugins/zfs.py", line 197, in export
zfs.export_pool(pool)
File "libzfs.pyx", line 1237, in libzfs.ZFS.export_pool
libzfs.ZFSException: pool or dataset is busy

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3.9/concurrent/futures/process.py", line 243, in _process_worker
r = call_item.fn(*call_item.args, **call_item.kwargs)
File "/usr/lib/python3/dist-packages/middlewared/worker.py", line 114, in main_worker
res = MIDDLEWARE._run(*call_args)
File "/usr/lib/python3/dist-packages/middlewared/worker.py", line 45, in _run
return self._call(name, serviceobj, methodobj, args, job=job)
File "/usr/lib/python3/dist-packages/middlewared/worker.py", line 39, in _call
return methodobj(*params)
File "/usr/lib/python3/dist-packages/middlewared/worker.py", line 39, in _call
return methodobj(*params)
File "/usr/lib/python3/dist-packages/middlewared/schema.py", line 1276, in nf
return func(*args, **kwargs)
File "/usr/lib/python3/dist-packages/middlewared/plugins/zfs.py", line 199, in export
raise CallError(str(e))
middlewared.service_exception.CallError: [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 1628, in export
await self.middleware.call('zfs.pool.export', pool['name'])
File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1345, in call
return await self._call(
File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1302, in _call
return await self._call_worker(name, *prepared_call.args)
File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1308, in _call_worker
return await self.run_in_proc(main_worker, name, args, job)
File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1223, 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 1206, 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
}}

Another attempt to do this through the cli

{{root@nas1[~]# zpool export -f Backup
cannot unmount '/var/db/system/syslog-a79f32b3a852420ca0f9433c4fd6884f': pool or dataset is busy

root@nas1[~]# lsof /var/db/system/syslog-a79f32b3a852420ca0f9433c4fd6884f
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
asyncio_l 713 root 54w REG 0,59 240369 138 /var/db/system/syslog-a79f32b3a852420ca0f9433c4fd6884f/log/middlewared.log
asyncio_l 713 root 56w REG 0,59 0 142 /var/db/system/syslog-a79f32b3a852420ca0f9433c4fd6884f/log/zettarepl.log
syslog-ng 8164 root mem REG 0,59 16384 258 /var/db/system/syslog-a79f32b3a852420ca0f9433c4fd6884f/syslog-ng.persist
syslog-ng 8164 root 10u REG 0,59 16384 258 /var/db/system/syslog-a79f32b3a852420ca0f9433c4fd6884f/syslog-ng.persist
syslog-ng 8164 root 17w REG 0,59 1899913 139 /var/db/system/syslog-a79f32b3a852420ca0f9433c4fd6884f/log/syslog
syslog-ng 8164 root 18w REG 0,59 589051 137 /var/db/system/syslog-a79f32b3a852420ca0f9433c4fd6884f/log/messages
syslog-ng 8164 root 19w REG 0,59 1274327 132 /var/db/system/syslog-a79f32b3a852420ca0f9433c4fd6884f/log/daemon.log
syslog-ng 8164 root 22w REG 0,59 920877 134 /var/db/system/syslog-a79f32b3a852420ca0f9433c4fd6884f/log/error
syslog-ng 8164 root 26w REG 0,59 8041086 129 /var/db/system/syslog-a79f32b3a852420ca0f9433c4fd6884f/log/auth.log
}}

I tried to stop the services and eventually exported the pool, but after rebooting it was imported again.

Problem/Justification

None

Impact

None

Attachments

1

Activity

Show:

Caleb November 22, 2022 at 10:47 PM

  1. You can set the system dataset to the boot pool using the webui

  2. You’re trying to export the zpool by hand which is not an operation we support. You can export your zpool using the webUI which will stop all services using the zpool

Aliaksandr Shvayakou November 22, 2022 at 10:33 PM

I’ve updated my TrueNAS to the version 22.12-RC.1 but I still have the problem.
It seems the syslog-ng has mounted directory in the pool and doesn’t allow to export pool.
I don't understand why you can't use a boot-pool for the syslog-ng.

zpool export Backup

cannot unmount '/var/db/system/syslog-a79f32b3a852420ca0f9433c4fd6884f': pool or dataset is busy

df | grep Backup/.system

Backup/.system 87143680 1427456 85716224 2% /var/db/system
Backup/.system/syslog-a79f32b3a852420ca0f9433c4fd6884f 85728896 12672 85716224 1% /var/db/system/syslog-a79f32b3a852420ca0f9433c4fd6884f


Automation for Jira November 21, 2022 at 4:29 PM

This issue has now been closed. Comments made after this point may not be viewed by the TrueNAS Teams. Please open a new issue if you have found a problem or need to re-engage with the TrueNAS Engineering Teams.

Caleb November 21, 2022 at 4:29 PM

Please upgrade to 22.12-RC.1 to see if this is still a problem. Significant changes and fixes has gone into this part of the software since 22.02.4.

Bonnie Follweiler November 21, 2022 at 3:20 PM

Thank you for your ticket submission .
I have moved this ticket into our queue to review now.
An engineering representative will update with any further questions or details in the near future.

Cannot Reproduce
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Impact

Low

Components

Fix versions

Affects versions

Priority

More fields

Katalon Platform

Created November 17, 2022 at 4:15 PM
Updated February 27, 2025 at 10:13 PM
Resolved November 21, 2022 at 4:29 PM