Serial ATA (SATA) chipsets — Linux support status

本文转载于 http://linuxmafia.com/faq/Hardware/sata.html


Serial ATA (SATA) chipsets — Linux support status

Revised:Mon Dec 31 19:01:01 PST 2007


As this page is showing the effect of lagging maintenance (though its author hasn't yet given up), readers should seriously considerfavouring what is now (2011) the most current site for general coverage of thissubject:https://ata.wiki.kernel.org/articles/s/a/t/SATA_hardware_features_8af2.html

Problem: Serial ATA (also known as S-ATA or SATA) chipsets are rapidly replacing legacy "parallel ATA" (PATA, i.e., regular ATA/133) chipsets — newer Linux installers' kernels yet supportmany Serial ATA chipsets, by now (especially since 2.4 and earlier kernels are now a thing of the past), but some confusion persists.

Note: There is no such thing as a distribution or its installer (generically) "having SATA support" (or not). Please send anyone speaking in such terms to this page. (Some SATA chipsets have been supported since practically forever, as their programming interfaces are unchanged from PATA predecessors. Others are brand-new and require new drivers from scratch.)



There are three workaround options, if your installer still has a problem with support for the SATA chip present:

1. Switch the motherboard BIOS back to "legacy ATA mode" (parallel ATA = PATA). Complete a Linux installation. Fetch or build a kernel with support for your chipset. Switch the BIOS setting back. (Potential catch: It's claimed that Dell Optiplex GX270 and Dell Precision Workstation 360 desktop units, using Intel ICH5 SATA-I chipsets, don't support switching to legacy ATA mode. This might be true of some others.)

2. (In the by-now rare case of being stuck on an installer that relies on 2.4.x kernels:) Rebuild your installer using kernel 2.4.27 or later, which includes libata, desirable since it adds many new chipsets and gives a (potential, subject to physical read limits, etc.) ~10M/s speed boost to some others compared to the quite slow 2.4.x drivers/ide set.

3. Temporarily add a PATA drive to your system. Install Linux onto that. Fetch or build a kernel with support for your chipset. Migrate your system to the SATA drives.


Driver Overview: Linux kernels have two ATA ("IDE") driver sets:

  • "drivers/ide": This is the traditional ATA driver set, maintained by Bartlomiej Zolnierkiewicz (before that, Andre Hedrick). Contrary to popular belief, it includes low-level drivers for many common SATA chipsets. The Linux kernel team's near-term plan is to phase out this driver set.

    Optionally, on top of drivers/ide block-device (generic mass storage access) drivers, one can load drivers to provide software-level suport for BIOS services enabling various types of manufacturer-specific software RAID (called"fakeraid", below):

    • For 2.4 kernels, Linux's software-RAID (fakeraid) driver collection is called "ataraid", which has subdrivers for the various manufacturers' different software RAID schemes. Using ataraid results in your partitions being addressed using a /dev/ataraid/d0p1 (etc.) device-naming convention. Note: Support greatly improved circa-2.4.23.

    • For 2.6 kernels, Linux's software-RAID (fakeraid) driver collection is called "dmraid" (Device Mapper RAID). So far (Sept 2004), Promise Fasttrack, HighPoint 37X, Intel ICH5/6, LSI, and SiI 3112A/Medley are supported:http://tienstra4.flatnet.tudelft.nl/~gerte/gen2dmraid/

    I'm pretty sure manufacturers' proprietary drivers, where available, are designed to fit the above framework.

  • "libata": This is the newer ATA driver set for selected SATA chipsets only, maintained by Jeff Garzik, leveraging the kernel's well-tested SCSI layer. Garzik developed it in the 2.6 kernel series. 2.4 support was available only with a backported patch until libata's inclusion in 2.4.27 and later.

    libata causes each SATA port appear as a new SCSI bus. There are individual low-level drivers for the individual SATA chipsets, e.g., ahci, pdc_adma, ata_piix, sata_nv, sata_mv, sata_promise, sata_qstor, sata_sil, sata_sil24, sata_sis, sata_sx4, sata_uli, sata_svw, sata_via, sata_vsc.

Hardware RAID cards have drivers outside these two collections (e.g., 3w-xxxx, 3w-9xxx, aacraid, cciss, dac960, dpt_i2o, gdth, ips, megaraid, megaraid2, megaraid_mbox aka megaraid-newgen, mpt*).


Driver Support for Each Known SATA Chipset:

(Caveats: Don't assume this page's data are perfect. Also,if a card's price makes it seem too good to be true, it probablyis.)

The first and more-important of two issues raised by these chipsets is what's required to make Linux see block devices on them at all.


RAID issues (a separate wrinkle): (link)

Most ATA RAID host adapters (except 3Ware Escalade, Adaptec 24x0, Areca, HP/Compaq, IBM ServeRAID, Intel SRC*/ICP Vortex, LSI Logic MegaRAID 150-4/150-6, and Tekram) turn out, upon examination, to not be real hardware RAID, but rather software/BIOS-dependent fakeraid. (I.e., missing hardware functionality is traditionally emulated inside idiosyncratic, undocumented, and proprietary software drivers, to hit low price points). Fakeraid is difficult to support in Linux — absent either reverse-engineering, special proprietary drivers, or (rare) manufacturer cooperation. (HighPoint, LSI Logic, Nvidia, Promise, and VIA provide proprietary drivers to support their respective fakeraids. I personally would steer clear.)

Linux often cannot read existing fakeraid volumes on such host adapters, unless you're willing to use proprietary fakeraid drivers (where available). But unless you're dual-booting MS-Windows, you shouldn't care, because Linux's software RAID (kernel "md" driver) is much faster and more reliable. You're advised to blow away fakeraid volumes, use SATA drives as straight block devices, and enable Linux software RAID instead, during Linux installation.

Kernel coders are slowly figuring out some fakeraid variants, and coding ataraid/dmraid modules.

Warning about media errors and RAID

Be aware that if any one drive of your SATA-based RAID array goes offline for any reason, including a significant string of media errors, depending on the SATA host adapter, the array may hang and need to be rebooted. This is because many SATA host adapters, like ATA generally absent special hardware provisions, simply don't support hotplug functionality.

This is known to be true, in particular, of Intel's ICH5/ICH5-R series, and Garzik has pointed out that that chip series, plus Intel ICH6 (in non-AHCI mode), Pacific Digital Talon, and Promise SATA SX4 — at minimum — will never support hotplug.


Troubleshooting:

If your installer finds no block devices or has other problems, please realise that all Linux SATA support is still (2004-01) hit or miss. (Users of 3Ware cards should have no problems, though. Those with Intel ICH5 chipset may be OK with the 2.4.22 or later drivers/ide piix driver, as that chipset is very nearly identical to prior Intel chips in the PIIX series.) Your best option is to find or build an installer with a recent version ofliba/ta, either by virtue of its inclusion in stock 2.6.x kernels, its merger into 2.4.27 and later, or by your applying it as a patch to a (pre-2.4.27) 2.4 installation kernel.


Links/Resources:

Serial ATA (SATA) forLinux link farm (Garzik's -- static 2008 snapshot from just before the site was abandoned). All of author's future SATA statusreports and other support pages will be (2011: were) linked there.

Linux SATA RAID FAQ (Garzik's -- static 2008 snapshot). Mostly, "Why — no, sir — here's why that SATA thing you bought actuallyisn't real hardware RAID." Very droll.

Linux-IDE: — information resource for open-source Linux ATA support but not necessarily the Serial ATA variant, operated by a "Linux ATA Development Storage Consulting Group":
http://www.linux-ide.org/

Background article on Serial ATA and Linux:
http://www.linux-tutorial.info/modules.php?name=Tutorial&pageid=328

Design limits of ATA, especially in RAID settings:
http://www.findarticles.com/cf_dls/m0BRZ/6_23/105884199/p1/article.jhtml Why SCSI will still remain generally faster and more reliable.

Serial ATAInfo by Brady Matthew Shea (static 2007 snapshot).

SATA/RAID-Capable Hard Drives and Motherboards by Brady Matthew Shea.

libata status reports:

  • Link to cumulative-info report (static 2006 snapshot)
  • a/o 2004-07-08: http://www.google.com/groups?hl=en&lr=&ie=UTF-8&th=28f68c68ad7073d8&rnum=1
  • a/o 2004-05-10: http://www.google.com/groups?hl=en&lr=&ie=UTF-8&th=9f3661e9bc8e3981&rnum=1
  • a/o 2004-04-24: http://lkml.org/lkml/mbox/2004/4/24/80
  • a/o 2004-03-30: http://www.google.com/groups?hl=en&lr=&ie=UTF-8&selm=1Fz8E-VU-87%40gated-at.bofh.it
  • a/o 2004-03-25:http://www.google.com/groups?selm=1DGQl-3Dk-47%40gated-at.bofh.it&output=gplain
  • a/o 2004-03-23: http://www.google.com/groups?hl=en&lr=&ie=UTF-8&th=16436e61be477b1c&rnum=1
  • a/o 2004-02-25: http://www.ussg.iu.edu/hypermail/linux/kernel/0402.3/0711.html
  • a/o 2003-12-03: http://www.ussg.iu.edu/hypermail/linux/kernel/0312.0/0597.html

libata source code and docs checkout: Take care to read all documentation. Among other things, you'll need to disable all kernel ATA support, since libata uses the kernel's SCSI layers:http://www.kernel.org/pub/linux/kernel/people/jgarzik/libata/ or (somewhat easier to deal with) Garzik's periodic patchkits athttp://www.kernel.org/pub/linux/kernel/people/jgarzik/patchkits/. Development code can be retrieved via rsync: rsync://rsync.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git/

I gather that libata is the only way to support SATA drives larger than 133GB. (libata supports the necessary "lba48" ATA addressing extension starting with kernel revision 2.6.5-rc2.) Also, Garzik has hotplug, random taskfile submission (thus enabling SMART support, previously unavailable under libata), and ATAPI under development for libata as of 2004-04-24. Last, Garzik has drivers for SATA-2 controllersunder development as of 2004-03-30.

SATA can theoretically do tagged command queuing (TCQ),but support for that feature is just now (2004-07) under construction in libata — and exists in none of the other Linux driver sets.

Kernel Traffic's 2003-8 coverage (archival link): http://www.kerneltraffic.org/kernel-traffic/topics/Serial_ATA.html

Debian installation using Scott Kveton's unofficialDebian 3.0 woody 5 MB netinst image: This image uses a 2.4.23kernel, meaning it's useful for owners of Intel ICH5 chipsets (standardATA driver), Adaptec AAR 24x0 chipsets (aacraid driver), LSI LogicMegaRAID 150-4/150-6 SATA chipsets (megaraid2 driver), and the SiS964 South Bridge. (Pleaselet me know. My thanks to Martin McClure for confirming SiS 964 support.) And of course 3Ware card owners can use almost any 2.4.x-based installer. Kveton's image does not include Garzik's libata set, andso doesn't cover other SATA chipsets. However, Kveton's instructions pagealso details how you can create your own custom netinst, e.g., one with 2.4.27 (and later) or a 2.6 kernel (either of which includes libata):
http://oregonstate.edu/~kveton/debian/ orhttp://public.www.planetmirror.com/pub/debian-netinst/kveton/

Debian installation using Kenshi's unofficial Debian 3.1sarge 125MB netinst image: Uses the sarge "debian-installer"(d-i) installation routine and a 2.6.14 kernel.http://kmuto.jp/b.cgi/2005/11/26"

Installing Debian with SATA-based RAID. Articleby Karl Schmidt, in which he uses the Debian-sarge beta4 installer's 2.6 kernel's libata drivers to complete installation onto his Intel ICH5SATA-I (Intel D865PERL motherboard), then create a Linux software RAID array, and move Debian over:
http://wiki.xtronics.com/index.php/Raid

Debian chroot installation onto Intel ICH5-R SATA. Involves initial Debian installation to a separate PATA drive.Basic technique shown can be adapted to any SATA chipset using 2.4.27(or later) or a 2.6 kernel (either of which includes libata):
http://www.e-aiyama.com/~toshi/Computer/Linux/SATA.html

Debian chroot installation onto Intel ICH5 SATA and LVM.Involves initial Debian installation to a separate PATA drive:
http://www.lathi.net/twiki-bin/view/Main/DebianSataLvm

Debian 2.6-kernel-based installers. At least twoinstallers for Debian provide installers with "2.6 boot flavour"options (and thus libata): allKnoppix releases starting with v. 3.4 and Official DebianDebian-Installer releases (for Debian 3.1 sarge and later) starting with beta 4.

Red Hat custom CD construction — creating your own custom RH-based installer starting from stock RH8, e.g., to substitute a custom kernel with libata patches:
http://www.cpqlinux.com/rh80customcd.html

Red Hat on an Intel D865PERL motherboard and SATA drives — brief article on how to install RH9 to hard drives on that motherboard's Intel ICH5 chipset, by setting the BIOS to "legacy mode" for installation, and then using Linux software RAID ("md" driver):
http://web.archive.org/web/20060425102930/http://www.transtronics.com/reference/D865PERL_SATA.htm

Follow-on to the prior entry, this time addressing Debian3.1 "sarge" installation onto any SATA controller, avoiding usingfakeraid features and instead detailing how to set up "md" software RAIDmirroring. Article also makes the point that the Debian 4.0 "etch"installer makes the steps he details unnecessary, taking care of theprocess automatically:
http://wiki.xtronics.com/index.php/Raid

Fedora custom CD construction — creating your own custom Fedora-based installer starting from a stock Fedora image, e.g., to substitute a custom kernel with libata patches:
https://www.redhat.com/archives/anaconda-devel-list/2003-March/msg00033.html. (Note that Fedora Core2 provides a 2.6 kernel, making this rebuild step no longer necessary for most SATA chipsets.)

Tweakers.net article "Comparison of nine SerialATA RAID 5 adapters" — introduces nine SATA-II host adapters,including some Linux-support comments.

Tom's Hardware's comparative reviews as of Jan. 2006 and Oct. 2005.

Clinton East's comparative review "SATA(Serial ATA) or SCSI?" — clarifies manyof the issues in picking fakeraid and real hardware RAID controllers forLinux (and draws on this page as a resource).

ThinkWiki page "Problemswith SATA and Linux" covers known SATA issues with IBMThinkPads.


Disclaimer:

I've created this document from public sources in order to learn about the subject, but cannot claim any expertise. Accordingly, it may contain significant errors — and corrections are greatly appreciated. Please send all such torick@linuxmafia.com.

See also:

Thanks to the Darma NAS OS Hardware Compatibility List (http://nas.darma.com/support/hcl.html) for crediting this page (for extensive borrowings from it).

The Skolelinux Project has a potentially useful page of informationabout hardware RAID chipsets:http://developer.skolelinux.no/info/prosjektet/delprosjekt/hw-raid-info.html

The Debian Project has a useful page of Linux RAID information: http://wiki.debian.org/LinuxRaidForAdmins




本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!

相关文章

立即
投稿

微信公众账号

微信扫一扫加关注

返回
顶部