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.


Storage subsystem jargons

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

Standards in order of their creation/availability:
SCSI (Serial Computer System Interface), oldest
ATA (IDE) : AT Attachment, later became PATA (Parallel ATA)
SATA (Serial ATA) : better than SCSI
SAS (Serial Attached SCSI) : better than SATA

SCSI/SATA controls RAID.

SAS : costlier, better for critical functions, server applications
SATA: cheaper, used for personal computers

SAS controller can access SATA drives but that’s not true the other way around.

SAS and SATA drives can operate in the same environment while SCSI and ATA cannot. For example, using faster SAS drives for primary storage and offloading older data to cheaper SATA disks in the same subsystem, something that could not be achieved with SCSI and ATA.

CAM (Common Access Method) : a specification for SCSI
CAM provides a formal description of the interfaces in a SCSI subsystem.
Benefits: providing round-robin prioritized transaction queuing, guaranteed transaction ordering even during error recovery, and a straight forward error recovery model that increases system robustness.

CAM is not perfect, a lot of issues related to implementation of the standard.

More to come about CAM and RAID.

Credits:
http://people.freebsd.org/~gibbs/ARTICLE-0001.html
http://en.wikipedia.org/wiki/SCSI
http://en.wikipedia.org/wiki/Serial_ATA
http://www.webopedia.com/DidYouKnow/Computer_Science/2007/sas_sata.asp