On Wed, Apr 09, 2025 at 09:36:11AM -0400, Michael Stone wrote:
On Wed, Apr 09, 2025 at 01:41:21PM +0200, Petric Frank wrote:
Am Mittwoch, 9. April 2025, 11:35:27 CEST schrieb to...@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

that should be *8* sata connectors, with which the math makes sense

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.

As someone else suggested, it's typically more useful to stick with filesystem UUIDs and such rather than trying to map things physically.


Reply via email to