Solved How drive association happens?

  • Thread starter Deleted member 43773
  • Start date
D

Deleted member 43773

Guest
Hi guys.

How the ada numbers for which SATA-port are given?
As far as I understood it, the first used SATA port becomes ada0, the second ada1 and so on.

But this seems not to be completely true for every case.

I have a system containing 4 HDDs.
When I attach another one to one of the PCI2SATA-cards, this one becomes ada0.

In IDE days there were jumpers on the drives for setting them to primary/secondary master/slave.
I thought with SATA those days were over, since there is one plug per drive only.
But anyhow something seems to overrule this.

What I want is disks once being coherent attached to SATA-ports stay reliable on their ada#.
...it just can't be I have the first 8 drives fixed, and then just adding temporarily one or two HDDs at the 9th port, all ada-numbers are jumbled...

Is there anything within SATA-drives, that may say the drive and system "you are the first lady" resp. to prevent that?

Do FreeBSD prefer PCI-card's SATA slots before motherboard's?
And if yes, how and where can I change this, if it can be changed? (I cannot boot from PCI-card's HDDs)

Any good links I can read about that stuff?

Thank you all in advance.
 
As far as I understood it, the first used SATA port becomes ada0, the second ada1 and so on.
No, the first detected drive becomes ada0.

When I attach another one to one of the PCI2SATA-cards, this one becomes ada0.
Case in point.

What I want is disks once being coherent attached to SATA-ports stay reliable on their ada#.
You don't have that guarantee. Instead use labels (see glabel(8)) to label the drives. Those labels don't change when the drive moves around.
 
Of course. The fine details, which are quickly overseen.
And if my motherborad is a bit slow, because it's old, and the new PCIe-cards are quicker, any drive attached to them is detacted before those on the mb - got it.
Thank you very much.

Okay, so I will read, experiment with, learn and use glabel(8).

Thanks. :)
Hey, one question, one answer, period.
And no village brawl, because someone mentioned fish 😁
 
I think it's the bios of your PC who numbers & renumbers. That's why we use labels.
It does.
That's why I spent hours with attaching, reboot, reconfig, reboot, re-attach, reboot and went several times through my BIOS, until finally the config suits the way I wanted it.
..and then attached one disk, and all was jumbled 😭
😂
Looking back it was stupid. But at least I learned the one thing or the other.
(Sometimes you learn more by stupid try'n'error, than just reading the solution. And at least you got the feeling you put something in it :cool:)

Thank you guys, especially SirDice, I now have a solution.
(I knew it: In FreeBSD there always is a solution. 😁 The trick is, to find it.)
 
… the first detected drive becomes ada0. …

(OT: ggb, this is why I asked the numbering question at <https://forums.freebsd.org/posts/571093>.)

… use labels (see glabel(8)) to label the drives …

Anyone: is there a glabel equivalent to the following command?

gpart modify -i 1 -l cache2-august da1

Context: <https://pastebin.com/raw/ELB7YFKC>, where (for the nth time) I had difficulties with glabel and/or its manual page.

Discussion in IRC led to a suggestion to use gpart instead of glabel.
 
I made a bunch of mistakes with ZFS and raw devices that I didn't document because labels are the best and made them go away. So many stupid problems because you add a drive or swap a PCIe slot and now nobody knows where da3 is.
 
Anyone: is there a glabel equivalent to the following command?
For simplicity I refer to glabel(8) because it can read and understand the various other types of labels. In general I usually just use the labels that are available with GPT and add the labels when I create the partitions. Rarely have to do this after the partition has already been created.

Code:
This GEOM class also provides volume label	detection for file systems.
     Those labels cannot be set	with glabel, but must be set with the appro-
     priate file system	utility, e.g. for UFS the file system label is set
     with tunefs(8).
 
Back
Top