Software RAID issues (was Re: Suggestions solicited, server bring up)

Ben Scott dragonhawk at gmail.com
Wed Nov 18 22:44:56 EST 2009


On Wed, Nov 18, 2009 at 8:32 PM, Alan Johnson <alan at datdec.com> wrote:
>>  There is no standard software/hardware interface for SATA or SCSI
>> controllers.[1]
>
> If we replace the word "standard" with the word "generic", does that work?

  No.

> Would you agree that there are plenty of SATA and SCSI drivers
> that work with most or all correctly implemented devices?

  I'm talking about software (the OS, device drivers, etc.)
interfacing to the hardware (disk controllers/host adapters).

  A device driver written for an Adaptec AHA-2940 card will be
completely useless for an LSI Logic card.  The interfaces to the
hardware are completely incompatible.

> Still, I would argue that SATA and SCSI are definitively standards ...

  Yes, any proper SCSI device will talk to any proper SCSI host adapter.

  There is no standard for getting your OS to talk to that SCSI host adapter.

> ... probably a reference driver that works with any devices that
> properly implements the other bits.

  There is no such thing on this Earth.

  It's the same with network cards.  If you've got a driver for an
Intel NIC, that won't help you get your Broadcom NIC working.

> My understanding is that WinXP needs SATA drivers because the latest
> installer predates the widespread adoption of SATA devices.

  True, but not the way you think.

  For both Windows and Linux, the driver for the SATA disk controller
presents the disks to the OS as generic "SCSI like" devices.

  Prior to SATA, most motherboard IDE controller chips implemented at
least the basic features of the venerable Intel 82371, commonly called
"PIIX".  So as long as your OS had a driver for that, things would
work.  With SATA, Intel switched to a new hardware/software interface
called "AHCI".  The drivers in Windows (and Linux) for PIIX won't work
with that.  So you need AHCI drivers instead.

  Some products (motherboards?  BIOSes?  controllers?  I'm not sure)
implemented a compatibility mode which emulated the PIIX, but you lost
advanced SATA features like tagged queuing.  Many people would install
in compatibility mode and then try to switch to AHCI mode, only to
discover their OS would no longer boot.  The OS is expecting PIIX, but
that's no longer there.

>> Looking at a CentOS 5.x box I have near to hand (kernel package
>> 2.6.18-164.6.1.el5), the kernel has roughly 55 different SATA/SCSI
>> drivers available.
>
> Can you be sure that there is not one generic or reference driver in there ...

  Absolutely positive.

> ... that does not cover nearly any standard SATA device?

  A SATA hard disk don't just connect directly to the microprocessor.
SATA disks plug into a disk controller, which is part of the
"southbridge" chip on the motherboard.  The SATA spec doesn't cover
how the OS talks to that chip, it just covers how the chip talks to
the hard disk.

  Intel does promulgate AHCI as a standard interface for all SATA host
adapters to use, and many cards implement that, so there is something
like a generic interface for SATA host adapters.  But SCSI has no such
thing at all.  And non-Intel RAID cards rarely seem to implement AHCI,
for whatever reason.  Maybe because it's relatively new.

> A more extreme example in another device category would be the VGA
> standard.

  There are indeed standards for video, promulgated by VESA.  There
are no such standards for disk controllers.

  Well, sort of there are.  Every disk controller has to provide an
implementation of software interrupt vector 0x13 (INT13).  This is
part of the BIOS specification, and is how the computer boots.  But
once the processor switches into protected mode (or long mode, if
you're x86-64), INT13 is no longer available.  So the OS has to
provide its own device drivers.

> I think you got my gist.  I only mean to say that the only RAID controller
> specific drivers I have had to install were for accessing the management
> features on line.

  I suspect you installed userland management software, not a kernel
device driver.

> I'm not familiar with megaraid, but this also sounds a lot like a generic
> driver that works with devices that adhere to some standard or less formal
> set of common rules.

  MegaRAID is a product line from LSI Logic (formerly AMI).  Their
"megaraid" driver works with all their SCSI RAID controller products.
But only their cards implement that interface.  And there's a
different driver ("megaraid_sas") for their SAS RAID controllers.
There are a couple more drivers for their various non-RAID SCSI host
adapter product lines.  None of them are compatible with each other.
And that's just one manufacturer!

> I think we are mostly on the same page, but are my
> ramblings above more in line with your understanding?

  I'm afraid not.  I really have to say you've got this completely
wrong.  Sorry.

-- Ben



More information about the gnhlug-discuss mailing list