Does adaX ordering matter?

Status
Not open for further replies.

sirjorj

Dabbler
Joined
Jun 13, 2015
Messages
42
I have done some playing around with my new NAS hardware (detailed here). I'm a lot more comfortable with FreeNAS/ZFS now and I think I'm about ready to trust my data to it. I'm going to start the badblock test to verify the drives, but after that I'm ready to go!

I do have one question though. When I added the drives the first time, I did it one at a time, and I put a label on each hot swap caddy (1, 2, 3, etc...). Once the drive appeared, I added a matching description to the disk ("Disk 1", "Disk 2", "Disk 3", etc). Once they were all attached, the device names were in alignment with the descriptions (ada0 = Disk1, ada1=Disk2, etc). After a reboot, the device names are all out of order. I have the drive bays connected to the SATA ports such that SATA-0 = Disk 1, SATA-1 = Disk 2, etc. (SATA port numbers are based on the Quick Reference Guide that came with the motherboard.)

My question is... should I care? Does it really matter that these number are out of order? Should they be in order? I realize that the first time, the device names increased because that's the order of drive attachment. I'm just surprised that on clean boot with all drives attached, the adaX order doesn't match the SATA-X order.
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
At a minimum, your notes should include which drives (by serial number) are in which caddy. Should you need to replace a disk down the road, it might save you from accidentally removing the wrong drive.
 

sirjorj

Dabbler
Joined
Jun 13, 2015
Messages
42
At a minimum, your notes should include which drives (by serial number) are in which caddy. Should you need to replace a disk down the road, it might save you from accidentally removing the wrong drive.

Thanks for the feedback. I think the "Disk 1", "Disk 2", etc description I added should cover that case, but jotting down the serial numbers is probably a good idea.

Actually... is the description linked to the serial number or the device name?
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
The only way to identify a drive across multiple reboots is to use the GPTID and the serial number. The device label (adaX, daX, ...) can change from reboot to reboot and is NOT linked to the SATA port on the MB or anything else.

I made a script to output a table with drives infos, look at the "Useful Scripts" link in my signature if you want it ;)
 

sirjorj

Dabbler
Joined
Jun 13, 2015
Messages
42
Yes, but what about the description you can type in for each drive? Is that linked to the GPTID/Serial Number? If not, what is the point of it?
 

Mirfster

Doesn't know what he's talking about
Joined
Oct 2, 2015
Messages
3,215
From what I gather, it is not a good idea to try to rely on the "description" field:

Loosing disk descriptions?:
I don't think it's a bug, but more of a limitation of how you match disks to the "description". What is ada0 can be ada2 tomorrow when you reboot. The device identification is based on the order that the system detects the drives when booting up. So the only real way you should ever track the disks is by serial. I don't use descriptions because there is no guarantee that on a reboot they'd match the disks correctly.
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
AFAIK the description field rely on the device label so it's basically useless; do not use it to identify the drives.

Just keep the GPTID / serial pairs somewhere safe and you'll be fine ;)
 
Status
Not open for further replies.
Top