Disk identifier split error in 12.0-U5

Description

I have a disk which not show in webui, but can access from console. when checking the dmsg -a, I found this:

spa_misc.c:411:spa_load_note(): spa_load($import, config trusted): LOADING
vdev.c:129:vdev_dbgmsg(): disk vdev '/dev/gptid/3320b76f-f807-11eb-969c-000c2995c20c': best uberblock found for spa $import. txg 6801
spa_misc.c:411:spa_load_note(): spa_load($import, config untrusted): using uberblock with txg=6801
spa.c:8229:spa_async_request(): spa=$import async request task=2048

Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/middlewared/job.py", line 367, in run
await self.future
File "/usr/local/lib/python3.9/site-packages/middlewared/job.py", line 403, in __run_body
rv = await self.method(*([self] + args))
File "/usr/local/lib/python3.9/site-packages/middlewared/schema.py", line 973, in nf
return await f(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/middlewared/plugins/disk_/sync.py", line 104, in sync_all
name = await self.middleware.call('disk.identifier_to_device', disk['disk_identifier'], sys_disks)
File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 1248, in call
return await self._call(
File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 1216, in _call
return await self.run_in_executor(prepared_call.executor, methodobj, *prepared_call.args)
File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 1120, in run_in_executor
return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
File "/usr/local/lib/python3.9/site-packages/middlewared/utils/io_thread_pool_executor.py", line 25, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.9/site-packages/middlewared/schema.py", line 977, in nf
return f(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/middlewared/plugins/disk_/identify_freebsd.py", line 91, in identifier_to_device
ident, _lunid = value.split('')
ValueError: too many values to unpack (expected 2)

Alarm clock
Starting file system checks:
Setting hostuuid: f1f14d56-cfde-b537-bb67-c5af5d95c20c.
Setting hostid: 0x2dd2fca1.
Mounting local filesystems:.
Beginning pools import

This is the info of this Disk:

root@truenas[~]# diskinfo -v ada3
ada3
512 # sectorsize
3000592982016 # mediasize in bytes (2.7T)
5860533168 # mediasize in sectors
4096 # stripesize
0 # stripeoffset
5814021 # Cylinders according to firmware.
16 # Heads according to firmware.
63 # Sectors according to firmware.
ST3000DM008-2DM166 # Disk descr.
Z503DJG6 # Disk ident.
id1,enc@n3061686369656d30/type@0/slot@4/elmdesc@Slot_03 # Physical path
No # TRIM/UNMAP support
7200 # Rotation rate in RPM
Not_Zoned # Zone Mode

ada3 at ahcich3 bus 0 scbus5 target 0 lun 0
ada3: <ST3000DM008-2DM166 CC26> ACS-2 ATA SATA 3.x device
ada3: Serial Number Z503DJG6
ada3: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes)
ada3: Command Queueing enabled
ada3: 2861588MB (5860533168 512 byte sectors)
ada3: quirks=0x1<4K>

Problem/Justification

None

Impact

None

Activity

Show:

Jecvay Liu August 11, 2021 at 5:13 PM
Edited

Found a way to set NVME_000X different.

yestoday I set only one nvme controller for two vmdisk,

after setting two nvme controller for two vmdisk, they get different ident.

 

Jecvay Liu August 11, 2021 at 3:53 PM

Thanks a lot!

 

Bug Clerk August 11, 2021 at 12:04 PM

Caleb August 11, 2021 at 11:55 AM

 thank you very much for the provided info. That was extremely helpful. Based on the middlewared.log and the output I see the problem.

As you can see below, VMware is presenting these 2 disks with the same serial number. Our disk management code assumes that every disk has a different serial number so this one will have to be solved on vmware's side. I'm not sure if you can specify specific serial numbers for the disks but that's what I would try first. I will fix the `ValueError: too many values to unpack (expected 2)` traceback, however, it won't fix your particular problem since the 2 nvme disks have the same serial. Thanks again for reporting this information!

Jecvay Liu August 11, 2021 at 3:25 AM

Yestoday I change my system to TrueNas SCALE and today I see your comment so I reinstall TrueNas CORE to get the debug_log

things may have a little different due to the reinstall.

Yestoday the loop order to get disk's info is  [ ada0, ada1, ada2, nvme0, nvme0, ada3 ]
so the exception make the ada3 cannot shown.

Today the loop order to get disk's info is [ ada0, ada1, ada2, ada3, nvme0, nvme0]
so I can see the ada3 in webui now.

but we still get this

[2021/08/10 20:08:47] (DEBUG) DiskService.identifier_to_device():92 - ident:
Unknown macro: {serial_lunid}
VMware NVME_0000_a9d1a9a7feaf1d66000c296f092d9204 info: ['VMware NVME', '0000', 'a9d1a9a7feaf1d66000c296f092d9204']

 

 

Complete

Details

Assignee

Reporter

Labels

Impact

Critical

Time remaining

0m

Components

Fix versions

Affects versions

Priority

Katalon Platform

Created August 10, 2021 at 2:09 AM
Updated July 6, 2022 at 8:59 PM
Resolved August 11, 2021 at 2:06 PM