Due ZFS_BADTARGET error no drive can be attached to boot-pool
Description
Problem/Justification
Impact
Attachments
- 16 Oct 2023, 04:43 PM
- 16 Oct 2023, 04:43 PM
- 16 Oct 2023, 04:43 PM
- 16 Oct 2023, 04:43 PM
- 16 Oct 2023, 04:43 PM
- 16 Oct 2023, 04:43 PM
- 16 Oct 2023, 04:43 PM
Activity
Bug Clerk October 10, 2024 at 12:03 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.
Bug Clerk October 10, 2024 at 12:02 PM
Thank you for reporting this issue! This bug has been resolved in TrueNAS SCALE and is not planned to be back-ported to CORE. If this is a critical workflow issue for you, we would strongly advise promptly upgrading to TrueNAS SCALE.
Bonnie Follweiler October 16, 2023 at 6:19 PM
Good Afternoon @Robert Krasowski.
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.
Automation for Jira October 16, 2023 at 4:42 PM
Thank you for submitting this TrueNAS Bug Report! So that we can quickly investigate your issue, please attach a Debug file and any other information related to this issue through our secure and private upload service below. Debug files can be generated in the UI by navigating to System -> Advanced -> Save Debug.
https://ixsystems.atlassian.net/servicedesk/customer/portal/15/group/37/create/153
Due to another issue im testing the installation of TrueNAS 13.0-U5.3 on Virtualbox. In this test, i tried to add a device to the OS pool, but the attach fails due a ZFS error. I tried multiple ways, but i could not attach a drive to the boot-pool.
For this bug report, following steps can be used to reproduce the error:
Creation of a VM with 2 16GB drives (PIC1)
Perform the OS installation with both drives selected for the boot-pool (PIC2,PIC3)
Remove one of the drives via the Boot Pool Status Detach command (PIC3,PIC4)
Using the Boot Pool Status Attach command to add the removed drive (PIC5,PIC6,PIC7)
On PIC7 following ZFS error is displayed:
Error: [EFAULT] concurrent.futures.process._RemoteTraceback: """ Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/middlewared/plugins/zfs.py", line 220, in extend i['target'].attach(newvdev) File "libzfs.pyx", line 402, in libzfs.ZFS.__exit__ File "/usr/local/lib/python3.9/site-packages/middlewared/plugins/zfs.py", line 220, in extend i['target'].attach(newvdev) File "libzfs.pyx", line 2117, in libzfs.ZFSVdev.attach libzfs.ZFSException: can only attach to mirrors and top-level disks During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.9/concurrent/futures/process.py", line 246, in _process_worker r = call_item.fn(*call_item.args, **call_item.kwargs) File "/usr/local/lib/python3.9/site-packages/middlewared/worker.py", line 111, in main_worker res = MIDDLEWARE._run(*call_args) File "/usr/local/lib/python3.9/site-packages/middlewared/worker.py", line 45, in _run return self._call(name, serviceobj, methodobj, args, job=job) File "/usr/local/lib/python3.9/site-packages/middlewared/worker.py", line 39, in _call return methodobj(*params) File "/usr/local/lib/python3.9/site-packages/middlewared/worker.py", line 39, in _call return methodobj(*params) File "/usr/local/lib/python3.9/site-packages/middlewared/schema.py", line 985, in nf return f(*args, **kwargs) File "/usr/local/lib/python3.9/site-packages/middlewared/plugins/zfs.py", line 223, in extend raise CallError(str(e), e.code) middlewared.service_exception.CallError: [EZFS_BADTARGET] can only attach to mirrors and top-level disks """ The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/middlewared/job.py", line 355, in run await self.future File "/usr/local/lib/python3.9/site-packages/middlewared/job.py", line 386, in __run_body rv = await self.middleware._call_worker(self.method_name, *self.args, job={'id': self.id}) File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 1250, in _call_worker return await self.run_in_proc(main_worker, name, args, job) File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 1169, in run_in_proc return await self.run_in_executor(self.__procpool, method, *args, **kwargs) File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 1152, in run_in_executor return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs)) middlewared.service_exception.CallError: [EZFS_BADTARGET] can only attach to mirrors and top-level disks
I also tried the Attach command after quick wiping the detached drive, but the ZFS error still present and no drives can be added.
This error seems to be related to following bug issue:
https://ixsystems.atlassian.net/browse/NAS-108568
Different from the bug issue im using 2 virtual drives with the same size and were already bound to a boot-pool during the installation of the OS. Maybe, due to the partition layout (ada0p2), TrueNAS does not apply the same partition layout to the attached drive, which may lead to the different size and the ZFS error.