Next Previous Contents

8. Activating and Deactivating UDMA

Normally, a UDMA-aware kernel will automatically enable UDMA support for drives and interfaces that support it. However starting with kernel 2.1.113 DMA drive transfers are disabled by default unless you have configured your kernel specifically to automatically activate it. This may seem inconvenient, but some drives and some interfaces do not function properly with DMA enabled; see the UDMA Blacklist below.

8.1 Using kernel boot parameters

On kernels 2.1.113 and up, you can enable DMA for both drives on a given IDE interface using the ideX=dma kernel parameter, where X is the number of the interface (the first is 0).

Kernel boot parameters can be set using LILO, LOADLIN, or most Linux boot loaders. For more information see the Bootdisk HOWTO.

8.2 Using hdparm

hdparm is a program used to tweak the parameters of hard drives under Linux. Among other things you can use it to enable or disable UDMA for a drive and test its sustained transfer rate.

The current version of hdparm, 3.5i as of this writing, is available at http://www.dyer.vanderbilt.edu/server/udma/.

Compile and install it something like this:

cd /usr/src
tar zxvf /tmp/download/hdparm-3.5.tar.gz
cd hdparm-3.3
cat /tmp/download/hdparm-3.5i.patch | patch -p0
make
if [ -f /sbin/hdparm ]; then rm -f /sbin/hdparm ; fi
make install
cp /usr/local/sbin/hdparm /sbin/hdparm

To enable DMA for a hard drive: hdparm -d1 /dev/hda

To disable DMA for a hard drive: hdparm -d0 /dev/hda

To measure transfer rate of a hard drive: hdparm -Tt /dev/hda

To see what options are enabled for a hard drive: hdparm /dev/hda

To see more info on your drive than you wanted to know: hdparm -i /dev/hda

For more detailed info (such as how to choose which UDMA mode to use) read the man page (``man 8 hdparm'').


Next Previous Contents