MandrakeUser.Org - Your Mandrake-Linux Knowledge Base!


 
 

*DocIndex - Hardware

IDE HDs I

* Introducing IDE
* Limitations
* UDMA

Related Resources:

'ide.txt' in 'linux/Documentation' 'ide-dma.c' in 'linux/drivers/block'
Linux Ultra-DMA Mini-HOWTO
Linux HPT366 mini-HOWTO
Linux ATA Development Project

Revision / Modified: Sep. 12, 2001
Author: Tom Berger

 

* Introducing IDE

IDE, EIDE, ATA, ATA-2, ATA-3, ATA-4, ATAPI, Fast-ATA, Fast-ATA-2, Ultra ATA, PIO, LBA, DMA, UDMA 33/66/100/133 etc. Neat, isn't it? ;-) And the funny thing is that almost everyone has their own interpretation of these terms. Here comes a short introduction using the FOLDOC and the IDE/Fast-ATA/ATA-2 FAQ

The IDE/ATA system consists of several parts: a controller on the mainboard, a protocol to transfer data, the electronics on the drive itself (hence the name 'Integrated Device Electronics') and certain specifications in the mainboard's BIOS. This system is connected to the PCI bus via an ISA/PCI bridge. ATA (Advanced Technology Attachment) is the 'official' name, whereas IDE (and EIDE) seem to be marketing terms (don't sue me if I'm wrong).

Since its introduction around 1986, ATA has undergone several changes.

In the beginning there was ATA. It offered a common system for hard drives, allowing every drive to be connected to a mainboard controller (instead of needing a proprietary controller for each drive). Due to limitations arising from the combination of the BIOS and the ATA interface, the maximum size per drive was restricted to 504 MB. It took the industry four years to agree upon a standard (1990).

ATA-2 aka 'Advanced Technology Attachment Interface with Extensions' aka 'Enhanced Integrated Drive Electronics' (EIDE), was introduced in 1994 by Western Digital. It included faster transfer modes (PIO and DMA) and a new BIOS specification (LBA) allowing for drive sizes up to 128 GB. ATA-2 split into different variants:

  1. EIDE, which introduced the secondary port, BIOS translation to break the 1024 cylinders barrier and the ATAPI protocol for removable devices.
  2. Fast-ATA, which added multiple read/write commands, LBA, and PIO mode 3 and DMA mode 1 transfers.
  3. Fast-ATA-2 (aka ATA-3), which adds PIO mode 4 and DMA mode 2 transfers.

Since these variants were just marketing terms and not industry standards, it was up to the hardware manufacturers, how and whether to implement features. The authors of the IDE/Fast-ATA/ATA-2 FAQ stated in 1996:

"[...] most "EIDE" interfaces to date are buggy to some extent. This includes the expected problems like noncompliance with ATA-2, but also obscure things like the use a single buffer for both primary and secondary channel, which may cause data corruption under very specific circumstances.[...]"

ATA-4 aka UDMA aka Ultra-ATA aka Ultra-DMA/33 aka UDMA mode 2 was an attempt to clean up this mess. Introduced by Quantum, freely licensed and backed by Intel, this had indeed some positive effect, although there are still many buggy IDE implementations and faulty BIOSes out there. UDMA mode 4 aka Ultra-DMA/66 is a newer implementation allowing higher burst transfer rates and enhanced data security. It has been superseded by UDMA mode 5 aka Ultra-DMA/100.
Meanwhile, Maxtor has announced UDMA mode 6 aka Ultra-DMA/133. The 'Big Drives' technology by the same vendor, which allows for IDE hard drives larger than 137 GB is already supported by Linux.

* section index * top

* Limitations

Maximum cable length is 50 cm (even less for UDMA/66 and later), longer cables will lead to CRC errors. Therefore IDE is restricted to internal devices (external IDE devices are handled via the parallel port). You'll need a special cable to get UDMA66/100 (otherwise it falls back to UDMA/33).
Multitasking is only possible for different ports, not for devices connected to the same port, i.e. the data transfer rate will not only drop to that of the slowest device connected to this port but will also decrease considerably if you connect two devices of the same speed to one port (for example two hard disks on the first port).
The BIOS can only 'see' hard drive space up to 1024 cylinders. How much that actually is, depends on the translation scheme. For most modern BIOSes and hard disks this barrier is somewhere in the eight GB range. Current versions of Linux boot loaders support 'LBA', thus you don't need to worry about this limitation. The Large Disk HOWTO has more on this.

* section index * top

* UDMA

With IDE drives getting bigger (and therefore faster) all the time, the advent of UDMA was a necessity at least for operating systems which cache disk accesses poorly like MS-Windows. UDMA increases the burst transfer rate, i.e. the transfer rate for data read from the disk cache. Quoting from the Linux Ultra-DMA Mini-HOWTO:

"Note that burst transfer rates only affect data transfers to/from the EIDE drive cache (476KB for the IBM 6.4GB drive), and IMHO are not particularly relevant for most GNU/Linux users.

"The Linux kernel uses as much RAM as possible to cache hard disk data accesses, and so if data is not in the kernel cache there is little chance that it will be in the (much smaller) hard disk cache."

But UDMA also increases data integrity and that's a real plus on the rather unreliable ATA bus. And the sustained data transfer rate which is much more important in everyday usage increases considerably, too.

UDMA/33

UDMA mode 2 (UDMA/33) is supported for all Mandrake releases. You only need to turn it on as explained in IDE HD-Tuning. PCI UDMA cards like the 'Promise Ultra 33' work, too.

UDMA/66

UDMA mode 4 (UDMA/66) chipsets and controllers are supported since Mandrake 7.1. If you need it on an older release, get the latest kernel via this page at rpmfind.net. Just install, knock on wood and reboot ;-).
If you want to apply the patch yourself, get it from Andre Hedrick's FTP directory on kernel.org.

If you want to install ML 7.0 or earlier onto a UDMA/66 hard drive attached to a UDMA/66 controller, the above obviously doesn't help you ;-). Read the Linux HPT366 mini-HOWTO, which features some very decent instructions. For Promise cards refer to the instructions given in the Ultra-DMA mini-HOWTO (they are for Ultra33 cards but should work for Ultra66 cards, too). No first-hand experience here.

If you get into booting troubles due to the infamous 1024 cylinders barrier, get the latest LiLo RPM from your favorite Cooker mirror and add the line lba32 to the top section of '/etc/lilo.conf'. Note that this new feature ('EDD') is beta.

Don't forget that you'll need special cables (80 conductors, max. 30 cm / 12'' length) for UDMA/66 to work.

UDMA/100

Since release 7.2 Mandrake supports Promise UDMA 100 chipsets. In 7.2 there are a few extra steps required when installing Mandrake on such a drive, but apart from that, it should work fine. 8.0 and later detect and configure UDMA/100 chips and drives automatically.

UDMA/133

Status unknown.

* section index * top

* RAID, SMART and Tuning

 
Legal: All texts on this site are covered by the GNU Free Documentation License. Standard disclaimers of warranty apply. Copyright LSTB (Tom Berger) and Mandrakesoft 1999-2002.