How does drive label (ada0, ada1) correlate to SATA number?

skysurf76

Dabbler
Joined
Oct 25, 2011
Messages
36
I'm building a new box and have the boot SSD on the first SATA connector, the next five drives from top to bottom are going to be plugged into the second through sixth SATA connections. I was just wondering how the labeling mechanism in FREEBSD works regarding SATA drives. I tried researching ada label as it pertains to SATA connector but couldn't find anything. I was planning on plugging the drives in one at a time with TrueNAS running starting from the top hoping the first drive would be assigned ada1, second ada2, etc. If there were ever a failure I could simply look at what drive (ada?) was missing, and start at the top of the SATA drives (ada1) and count down to get to the bad drive.

So would my plan work and assign the ada number from top to bottom, and would it be persistent or have I totally gone off the rails and need to do it a different way?
 

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925
So would my plan work and assign the ada number from top to bottom, and would it be persistent or have I totally gone off the rails and need to do it a different way?
Your plan won't work. FreeBSD used the drive's gptid for identification - the adaX and daX designators are "arbitrary" and may change on reboot. FreeNAS/TrueNAS report the drive serial number and that's what you'll use/check to pull drives for exchange, etc. Make sure the serial number is visible on the drive when installed - if it isn't visible put a label on it that is.

1608575435408.png


I would say that you are not "off the rails" as you were aware of the potential issue of drive ID and chose to ask about it before committing yourself to a path where you would have been at the least "disappointed" in the outcome.
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
Not my system, but a handy example of how someone else did it. Click the image for a better view and note the masking tape labels on the drives. Usually, the last four digits of the serial number is all you need for uniqueness.

dsc09552.jpg

If you have a SAS expander bakcplane, you can just tell it to blink the light to tell you what drive to pull. That is very helpful when you have a quantity of drives.
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
If a drive should fail in such a way that it disappears from the list, you can find the faulted drive by process of elimination. This doesn't happen often, but I did have it happen once. When the drive faulted it was as if it had been unplugged. It was just not showing up at all. I found it helpful to have a printout of the list.

Here is a link to some useful scripts for managing / monitoring your system:


GitHub repository for FreeNAS scripts, including disk burn-in

https://www.ixsystems.com/community...for-freenas-scripts-including-disk-burnin.28/


You might also want to look at the list of links below, in my signature. very useful information there...
 
Top