Hello,

Am Donnerstag, 10. April 2025, 00:13:10 CEST schrieb Andy Smith:
> Hi,
>
> On Wed, Apr 09, 2025 at 05:46:32PM +0200, Petric Frank wrote:
> > In this case i have to manually create a mapping from pci-id (of the
> > controller) together with the "ata-x" to the sata connection number
> > printed on the motherboard. Based on the mapping udev rules are to be
> > created to get device entries driven by the cable ids.
> >
> > Due i am not firm with udev rules - any hint on these ?
>
> 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 ?

Due the dynamic mapping of sata cable to device name is not fixed you can't. 
You have
(for example) to evaluate the other drives serial number and match them with 
the ones
on the hdds itself. The one which is missing will be the one to be replaced.

But 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.

regards
  Petric

Reply via email to