Serial Number Under "Disks" Incorrect

zuluromeo

Member
May 12, 2019
10
0
21
35
Good afternoon,

I have been seeing an issue, for a while now, with the serial numbers for eight HDDs that are connected via USB. In the web interface, they all show a serial number of 152D00539000, however, when I run the command smartctl -a /dev/sdX, I can see all of the drive details, include a serial number (WD-WCC7...).

The model number appears mostly correct and it shows a SMART status of "PASSED", so I am assuming that is working.

It makes tracking the drives very difficult in the GUI. Is there a way to correct this?

Thank you.
 
Hi,

I have the same problem with SAS disks. I have 12 ssd disks on 3 nodes, they all show the same serials as in
Code:
smartctl -a /dev/sdX
, while for the 6 sas disks the serial is different between gui and
Code:
smartctl -a /dev/sdX
. The gui shows the logical unit id instead.
 
we get the (short) serial from the command
Code:
udevadm info -p 'block/sdX' --query  all
we use the 'ID_SERIAL_SHORT' field from there

edit: small fix in command
 
Last edited:
Hi @dcsapak

Thank you very much, that is actually the one shown in pve.


Bash:
root@pvenode1:~# udevadm info -p 'block/sdc' --query  all
P: /devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:0/expander-0:0/port-0:0:2/end_device-0:0:2/target0:0:2/0:0:2:0/block/sdc
N: sdc
L: 0
S: disk/by-id/lvm-pv-uuid-K5YWp8-61vf-29Ga-uIfS-8xdU-wVcM-QY47w7
S: disk/by-id/wwn-0x50000395d82b3478
S: disk/by-path/pci-0000:03:00.0-sas-exp0x500056b37789abff-phy17-lun-0
S: disk/by-id/scsi-350000395d82b3478
E: DEVPATH=/devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:0/expander-0:0/port-0:0:2/end_device-0:0:2/target0:0:2/0:0:2:0/block/sdc
E: DEVNAME=/dev/sdc
E: DEVTYPE=disk
E: MAJOR=8
E: MINOR=32
E: SUBSYSTEM=block
E: USEC_INITIALIZED=3301118
E: ID_SCSI=1
E: ID_VENDOR=NETAPP
E: ID_VENDOR_ENC=NETAPP\x20\x20
E: ID_MODEL=X423_TAL13900A10
E: ID_MODEL_ENC=X423_TAL13900A10
E: ID_REVISION=NA01
E: ID_TYPE=disk
E: ID_SERIAL=350000395d82b3478
E: ID_SERIAL_SHORT=50000395d82b3478
E: ID_WWN=0x50000395d82b3478
E: ID_WWN_WITH_EXTENSION=0x50000395d82b3478
E: ID_SCSI_SERIAL=X4O0A02RFUZ5

1649348955526.png

My SAS drives also show an ID_SCSI_SERIAL, and it's the one shown in lshw -C disk:

Bash:
 lshw -C disk
[....]
 *-disk:2
       description: SCSI Disk
       product: X423_TAL13900A10
       vendor: NETAPP
       physical id: 0.2.0
       bus info: scsi@0:0.2.0
       logical name: /dev/sdc
       version: NA01
       serial: X4O0A02RFUZ5
       size: 838GiB (900GB)
       capacity: 1042GiB (1119GB)
       capabilities: 10000rpm
       configuration: ansiversion=3 logicalsectorsize=512 sectorsize=512

For SATA ssd disks, the ID_SCSI does not exists and the serial from lshw and udevadm do match.

Now: which one should I use to pass in a passthrough scenario? I'm trying to follow this: https://pve.proxmox.com/wiki/Passthrough_Physical_Disk_to_Virtual_Machine_(VM) that points here (down to point 5 Bonus for passing Serial, they use the one from lshw OR the one from pve, but they are different in my sas scenario): https://dannyda.com/2020/08/26/how-to-passthrough-hdd-ssd-physical-disks-to-vm-on-proxmox-vepve/

I would need this to try making the disks available directly to a trueNAS vm (it needs the serial to properly manage zfs pools).

Thank you very much,
 
i am not sure what you're asking... if you want to passthrough the disk, just use a 'stable' link in /dev/disk/by-id/...
if there are more than one for your disk, you should be able to use any of them (as long as it's stable, it does not matter which you're using)
 
The issue is which serial to passthrogh.
Let's say I passthrough to truenas, it will need the serial to be able to build its zvols.
If I passthrogh those SAS disks, no serial is passed.
Also as a side note, those SAS disks are not recognized as such by proxmox (type: unknown).
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!