Re: ada drive numbering

From: Bob Proulx <bob_at_proulx.com>
Date: Sat, 08 Feb 2025 22:11:09 UTC
Andrea Venturoli wrote:
> I've got a 13.4 box with three SSD and one HDD.
> Usually the SSDs are ada0-ada2 and the HDD is ada3.
> However, from time to time, at boot, HDD becomes ada2 and one SSD becomes
> ada3.

It depends upon which device responds first.  It's a race condition.

> This is annoying and I'd like to avoid it.
> Is there any way to achieve this?

Use GPT labels instead.  (In previous days it would be the now frowned
upon glabels, which still work.  But GPT labels are in fashion now.)

> Of course I've searched, but everyone seems to suggest I use labels instead
> of plain device nodes.

And here we have it again!  Though perhaps someone else will suggest
something different.  I can't think of any better way than labels and
GPT labels are what I am using.

> While this makes sense, it does not solve everything, as some scripts are
> not under my control (e.g. Nagios on another machine that checks ada2 for
> remaining life).

Seems like the Nagios check on the other machine also needs to be
tweaked then too.

Another option for the Nagios check is to expand the check and have it
dynamically scan and map devices.  (shrug)

Bob