Hello,
Am Mittwoch, 9. April 2025, 15:36:11 CEST schrieb Michael Stone:
> On Wed, Apr 09, 2025 at 01:41:21PM +0200, Petric Frank wrote:
> >Am Mittwoch, 9. April 2025, 11:35:27 CEST schrieb tomas@tuxteam.de:
> >> Does /dev/disk/by-path fulfil your needs?
> >
> >Not exactly. The names are like pci-0000-0b:00:0-ata-4 and
> >pci-0000-0d:00:0-ata-1.
>
> Yes, that's necessary to account for multiple sata controllers.
>
> >Can i simply match *ata-<number> and take the "<number>" as connector id on
> >the mainboard ?
>
> No. The number is the sata device number on a particular controller.
> They can overlap between controllers. E.g.:
>
> pci-0000:2b:00.0-ata-1
> pci-0000:2b:00.0-ata-2
> pci-0000:2b:00.0-ata-3
> pci-0000:2b:00.0-ata-4
> pci-0000:2c:00.0-ata-1
> pci-0000:2c:00.0-ata-6
>
> That's from a server with 6 sata connectors and 2 m.2 sata slots. The 6
> devices listed are all on sata connectors, and you can see that on the
> second controller one is device 1 and one is device 6, with the 2 unused
> connectors and the m.2 slots using some combination of 2,3,4,5--they are
> clearly not numbered sequentially. On the motherboard they're labeled
> SATA_[01234567] and M2_[12]. There's no particular relationship between
> how things are laid out on the motherboard and what they're connected to
> internally.
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 ?
regards
Petric