Using External HDD Enclosures w/ The Same Serial Numbers

I was hoping to get some insight into the best way to implement a pool using HDD enclosures that show up with the same serial when you do

/usr/bin/udevadm info --name=device_name_here

I currently have 4 Sabrent 2.5" HDD enclosures that I am currently trying to use for a pool on my home NAS setup. I started by using 2 of them in a raid 0 configuration to get things up and running and it all went pretty smoothly. It is weird because somehow the process of extracting the actual HDD manufacturer / drive type / serial number was successful and they show up as (in green)

<p style="color:rgb(0,255,0);">NAME="sdc" MODEL="Hitachi HTS545050B9A300" SERIAL="100513PBN40817D5PL9E" SIZE="465.8G" TRAN="usb" VENDOR="SABRENT " HCTL="7:0:0:0" TYPE="disk" FSTYPE="" LABEL="" UUID=""</p>
<p style="color:rgb(255,0,0);">NAME="sdd" MODEL="SABRENT" SERIAL="DB9876543214E" SIZE="465.8G" TRAN="usb" VENDOR="SABRENT " HCTL="8:0:0:0" TYPE="disk" FSTYPE="" LABEL="" UUID=""</p>
<p style="color:rgb(0,255,0);">NAME="sde" MODEL="ST500LM021-1KJ152" SERIAL="W62J82R1" SIZE="465.8G" TRAN="usb" VENDOR="SABRENT " HCTL="9:0:0:0" TYPE="disk" FSTYPE="" LABEL="" UUID=""</p>

When I proceeded to try to add another 500gb drive it then showed up as Sabrent (shown in red above). I am not sure how it started by drilling down the the actual HDD to get the info and then stopped at the top level when I tried to add another. This is not new to me as I have read the article

and I have encountered this on other NAS programs like CoreNAS and OpenMediaVault.

I was wondering if there was any way to explicitly get the serial and manufacturer that I get when I do the command (which gives me the correct information on the drives)

hdparm -I /dev/“drive name”

I would imagine this would have to happen every time that a drive is plugged in. Or I could be way off on how I understand the system and what is going on.



The colors didn’t show up how I thought they would… ok here are the ones that show up correctly (in bold) and as the generic interface (in italics)

NAME=“sdc” M> ODEL=“Hitachi HTS545050B9A300” SERIAL=“100513PBN40817D5PL9E” SIZE=“465.8G” TRAN=“usb” VENDOR=“SABRENT " HCTL=“7:0:0:0” TYPE=“disk” FSTYPE=”" LABEL=“” UUID=“”
NAME=“sdd” MODEL=“SABRENT” SERIAL=“DB9876543214E” SIZE=“465.8G” TRAN=“usb” VENDOR=“SABRENT " HCTL=“8:0:0:0” TYPE=“disk” FSTYPE=”" LABEL=“” UUID=“”
NAME=“sde” MODEL=“ST500LM021-1KJ152” SERIAL=“W62J82R1” SIZE=“465.8G” TRAN=“usb” VENDOR=“SABRENT " HCTL=“9:0:0:0” TYPE=“disk” FSTYPE=”" LABEL=“” UUID=“”

@Sweepy Hello again.

So this is odd because, as you indicated, the serials are found and do appear to be different.

Can you indicate the exact command you are retrieving this info via: You mention hdparm but that is not what we use (and may be involved in a work around however).

So paste the command and it’s output in the forum with a line before the test consisting only of ```
followed by a similar line after the pasted command output.
I.e. what is the output of for example:


and another for the by-id names: these are super important as we depend upon an interplay that is setup by udev where it ‘names’ (creates by-id names) based on a drives serial number.

udevadm info --name=device_name

you may have to play with the device_name bit there to get it to work. I.e. /deb/sda or the like. But it must be on the same boot as these canonical drive names are etherial - they change from one boot to another. But by-id names don’t - which is why we use by-id names. But we can only do this if there is a static identifier for by-id to use.

But lets get these outputs first and a screen grab of the disk page to show the serial complaint. If for example you have on drive there can be no serial clash, but if there are 2 there can be so 2 of your drives may clash but another be unique (i.e. via batches of re-used serial of the like).

Hope that helps and we are constantly looking at improving such things of course. But likly what is required a udev rule that assigns a working by-id name so that the interplay between a serial we can get also tallies with one udev uses to generate the by-id name. I’m thinking here of a custom udev rule that creates (based on hdparm retrieved hardware serial) coupled with us having a similar option to retrieve serials by the same means.