Good ol - Disks have duplicate serial numbers: None - But they don't?

@mealan
I dug through and discovered why this is failing and why it previously worked.
This is failing because these specific devices do not have a serial number file in the linux sysfs at any of these locations:

ls: cannot access ‘/sys/block/<deviceid>/device/serial’: No such file or directory
ls: cannot access ‘/sys/block/<deviceid>/serial’: No such file or directory
ls: cannot access ‘/sys/block/<deviceid>/device/vpd_pg80’: No such file or directory
ls: cannot access ‘/sys/block/<deviceid>/uuid’: No such file or directory

TrueNas 25.10 and above only check those locations for the serial number info when making vdev changes. The disk info is populated by: middleware/src/middlewared/middlewared/utils/disks_/disk_class.py at release/25.10.0 · truenas/middleware · GitHub

In TrueNas 24.05 instead it called pyudev to pull disk info which used the udevadm program to get the disk information.
udevadm can send SCSI commands to the devices and get serial information even when it is not populated in sysfs.

Workarounds for this problem in the GUI:
Some SAS drive firmware does not expose vpd_pg80 to the system kernel, and some does.
I’m guessing the Netapp drives that are working expose this, and the firmware on some specific drive models doesn’t.
We can either try flashing new firmware on our drives, which may allow the drives to expose vpd_pg80 info to the kernel, which would then populate ‘/sys/block/<deviceid>/device/vpd_pg80’,

Or make a pull request or appeal to TrueNas developers to add additional logic to disk_class.py to try additional sources(pyudev) for the serial.

For users having this issue with virtualized TrueNas environments, the only option is appealing to the truenas developers to update disk_class.py to add this functionality back in.

Workaround in shell:
I was able to add a spare drive to my zpool by using the zpool commands directly in the shell.
The difficulty of these commands varies by action you are taking and I wouldn’t be confident in my ability to build a new data vdev with them, but for adding a spare I only needed to specify the device ID.