Hi,

On Thu, Apr 10, 2025 at 05:42:43AM +0200, Petric Frank wrote:
> Am Donnerstag, 10. April 2025, 00:13:10 CEST schrieb Andy Smith:
> > You have yet to explain why block device serial numbers
> > (/dev/disk/by-id/) and filesystem UUIDs (/dev/disk/by-uuid/) are not
> > sufficient for your use case.
> 
> Ok. Lets take an example - a NAS using screwless hdd hotplug trays.
> 
> Each hdd has a slot to be accessed external (bay 1...6). If a hdd
> fails how do you know in which bay you find the hdd which failed ?

This is a problem which anyone with multiple drives in cheap enclosures
has faced. There is a reason why so few of those people try to do what
you are doing.

Myself, if the enclosure does not have an identity LED for each drive
(i.e. it's cheap) then I label the tray with the drive serial number at
the point where the drive is put in to it to begin with. As you have
noted, this requires some discipline. I don't think you can avoid this.
It's going to be required anyway.

> If you have a fixed relationship from /dev/sd[x] to the connector on
> the mainboard (and as result on the hdd tray) this will be an easy
> task.

Thing is, I think the risk of the motherboard-port-to-drive-bay mappings
re-ordering themselves at some point in the future is so high that I
would never bother to make my whole process rely upon that. Printing a
label for each drive is so simple and foolproof that it's simply the
best way to go, if you don't have drive identity LEDs. It has worked for
me for more than 25 years.

But, I can see you are keen to do this and there is also the saying
about people telling you that something is impossible until you do it,
so, good luck!

Thanks,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting

Reply via email to