[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: map mainboard sata connector to device name



On Wed, Apr 09, 2025 at 01:41:21PM +0200, Petric Frank wrote:
> Hello,
> 
> Am Mittwoch, 9. April 2025, 11:35:27 CEST schrieb tomas@tuxteam.de:
> > On Wed, Apr 09, 2025 at 11:32:31AM +0200, Petric Frank wrote:
> > > Hello,
> > >
> > > i want to map the sata hardware connections to fixed device names. This be
> > > done even the hdd on the cable is changed.
> > >
> > > So - when i connect a hdd to sata port 4 i want to get (for example)
> > > /dev/sdd created even /dev/sda to /dev/sdc (respective no hdd connected
> > > to sata 1 ... sata 3 port).
> > >
> > > Any idea on how to configure this.
> >
> > 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.
> 
> Can i simply match *ata-<number> and take the "<number>" as connector id on the
> mainboard ?

Possibly. I don't know. That will depend on how your hardware
exposes this info, how the kernel (drivers) pick it up and
how it passes it to udev, who is ultimately responsible of
creating these device nodes.

See e.g. here for the entry to this rabbit hole :)

  https://unix.stackexchange.com/questions/86764/understanding-dev-disk-by-folders

Cheers
-- 
t

Attachment: signature.asc
Description: PGP signature


Reply to: