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
lsblk -P -o NAME,MODEL,SERIAL,SIZE,TRAN,VENDOR,HCTL,TYPE,FSTYPE,LABEL,UUID
/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)
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.
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.