Device enumeration in FreeBSD

Posted: February 17th, 2013 | Author: | Filed under: FreeBSD, storage | Tags: , , , | No Comments »

One of the FreeBSD boxes I was working with came up with ad8 as its disk device. After reading around a bit and talking to a few FreeBSD devs, here is my findings of where did that number “8” come from:

On Intel PCH2 6 Port SATA controller, disk was attached to 3rd port i.e. port #2. (That can also be checked from the BIOS settings.)

Now, ATA stack reserves two device numbers (master/slave) per ATA channel. But, first two channels are reserved for legacy (ISA emulation) mode – PATA. That means, ad0 to ad3 are reserved.

So, if a disk is attached to port #0 master, it comes up as ad4. In this particular case, because the disk was attached to port #2 master, it came up as ad8.