Cannot attach second USB drive to boot pool - ERROR NoneType object is not subscriptable

stmcknig

Dabbler
Joined
Jan 9, 2012
Messages
23
Upgraded from 12.x to 13.0 and figured it might be wise to add a mirror USB stick to my boot pool.

Having seen issues with not using the same make/size/brand I got a second Samsung Cruze 32GB to match the original. However following the steps to Attach. after a pause I get the error above

CleanShot 2022-05-16 at 15.14.49@2x.png


I also tried going into the Disks option and Wipe for the newly added drive.Still same message.

Here are the details from the boot pool and storage for the two relevant drives. Is this a known issue in 13 or is there a workaround besides doing a reinstall against each USB stick ?

CleanShot 2022-05-16 at 17.21.30@2x.png


CleanShot 2022-05-16 at 17.22.17@2x.png
 

ThreeDee

Guru
Joined
Jun 13, 2013
Messages
700
well .. aside from the fact that USB drives are not recommended for booting from anymore .. maybe delete your 1st 7 boot environments from your drive and then try mirroring it again ... 12.0-U8.1 was stable, so you don't need the rest.
 

stmcknig

Dabbler
Joined
Jan 9, 2012
Messages
23
What has replaced USB then? SD cards ? Curious I hadn’t seen mention of this change…
 

mav@

iXsystems
iXsystems
Joined
Sep 29, 2011
Messages
1,428
SSD in USB enclosure is probably better than regular USB stick. But these days, if motherboard is not too old to support it, simple NVMe can be not much more expensive, but more predictable. And in addition to booting it can also store regularly updating system dataset and swap partition.
 

ThreeDee

Guru
Joined
Jun 13, 2013
Messages
700
Seems a colossal waste for just a boot drive that doesn’t need or warrant that speed…I guess I could rustle up a couple of small SSD in usb enclosure but talk about overkill
I paid $10 for a 32GB M.2 drive that I use for boot .. on one of my older setups, I used a USB to SATA cable to power a 120GB SATA drive that I got for $10.
USB drives haven't been recommended for awhile now do to the increase of read/writes to the drive with newer versions of TrueNAS so there was a substantial increase in drives failing. You can still use your USB drive if you want .. but it's just not recommended
 

stmcknig

Dabbler
Joined
Jan 9, 2012
Messages
23
I’ve got a couple of 32GB SATA from another project I can use once I get a couple of usb to sata cables from you know where. Curious though if this error is caused by the media type though. Guess I will find out but a bunch of YouTubers seem to make it work as per the instructions…
 

stmcknig

Dabbler
Joined
Jan 9, 2012
Messages
23
OK, well installed first 32GB SSD and used the 13.0 ISO to do a clean install and then import my config back in.

Added a second 32GB SSD and tried the Attach option again after performing a wipe on the second SSD.

Same exact error message, so although I'm now out of the USB thumb drive woods, the problem remains....

Any more detailed logs I can review that might help ?
 

stmcknig

Dabbler
Joined
Jan 9, 2012
Messages
23
Found this in middlewared.log

[2022/05/14 14:52:21] (ERROR) middlewared.job.run():367 - Job <bound method accepts.<locals>.wrap.<locals>.nf of <middlewared.plugins.boot.BootService object at 0x81baa6a90>> failed
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 391, in __run_body
rv = await self.method(*([self] + args))
File "/usr/local/lib/python3.9/site-packages/middlewared/schema.py", line 975, in nf
return await f(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/middlewared/plugins/boot.py", line 109, in attach
'path': f'/dev/{zfs_dev_part["name"]}'
TypeError: 'NoneType' object is not subscriptable
 

jackdinn

Contributor
Joined
Jun 14, 2022
Messages
102
Ok, same problem. Please no "you need to buy whatever" because i don't have "whatever" I really wish i did but i don't. Plus I'm just tinkering with the hardware i have. Unless anyone has a little hardware setup they can send me :tongue:

I do however have this problem.
Attach Device
Error: 'NoneType' object is not subscriptable
I tried after my first install with 2x16G sticks, same error.
I went to the shops and get 2x32G sticks (exact same sticks), same error.
Wiped stick, same error.
I reinstalled whole NAS, same error.

So im wondering what is this "U1" and how do i get it?

Thx.

Version:
TrueNAS-13.0-RELEASE
 

jackdinn

Contributor
Joined
Jun 14, 2022
Messages
102
Cool, thx.

Off topic, but can i just ask where those logs are found? (middlewared.log) I searched and searched.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
where those logs are found? (middlewared.log)
/var/log

Which will redirect you to

/var/db/system/syslog-2fa742ae30da433ca735af52bcb65edb/log (due to the mounting of the system dataset in that location).

The logs are there.
 

jackdinn

Contributor
Joined
Jun 14, 2022
Messages
102
It looks like the target release date is 28 June....
im sure this said 22nd, then after the 22nd it was changed to 26th now i check and its says 28th?

Do you keep editing it? (or am i just going mad, which is quite possible) and when is this update, where do i find info for myself? thx.
 
Last edited:

xness

Dabbler
Joined
Jun 3, 2022
Messages
30
Got the same error when trying to replace a boot pool member SATA-attached SSD

Code:
Error: Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 140, in call_method
    result = await self.middleware._call(message['method'], serviceobj, methodobj, params, app=self,
  File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 1262, in _call
    return await methodobj(*prepared_call.args)
  File "/usr/local/lib/python3.9/site-packages/middlewared/schema.py", line 975, in nf
    return await f(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/middlewared/plugins/boot.py", line 141, in replace
    await self.middleware.call('zfs.pool.replace', BOOT_POOL_NAME, label, zfs_dev_part['name'])
TypeError: 'NoneType' object is not subscriptable
 

stmcknig

Dabbler
Joined
Jan 9, 2012
Messages
23
U1 released today and I updated and tried to mirror my boot pool again using a same size SSD (not USB stick).

New error -

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 392, 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 2093, 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 243, 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 979, 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 1249, 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 1168, 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 1151, 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
 

stmcknig

Dabbler
Joined
Jan 9, 2012
Messages
23
I've seen a few reference threads to "EZFS_BADTARGET" and most seem to suggest a reinstall of TrueNAS with both SSD attached and during the install specify a mirror boot using them. Then restore the saved configuration. Not sure if doing that would kill the boot mirror though....
 
Top