Make your own free website on Tripod.com

BACK TO LINUX

Enabling 32-bit I/O access for Hard Drives

HDPARM- get/set hard disk parameters.  Requires Kernel 1.2.13 or later, several of the options are for kernel 2.0.10 or later (which includes the new EIDE device driver). This command must be run as root, so either logon as root or use the "su" (substitute user) command.  This HowTo only covers the basics needed to enable 32 bit I/O access for your hard drives.  For the complete synopsis of this command  simply enter "man hdparm" at the command line. Also note that this HowTo was run on a SuSE 6.3 distribution and your results may vary.  The hard drive is a 6.4Gig Maxtor without UDMA2 support.  If you have a newer drive you will see substantial increases in speed and overall performance.  *Note all commands to be entered are preceded with a # and are bold, enter the commands without the quotes. 

Name- hdparm

Options used   (see the man page for additional options and cautions and warnings)

[-v] Displays all the settings for the hard drive.

[-t] Performs timings on device for benchmark comparisons.

[-c] Enables 32-bit I/O support by setting the flag to 1, 0 disables 32-bit I/O support.  

[-d] Enables using_dma flag 

[-k] Sets the keep_settings_over_reset flag (used for soft resets).

 

First we will verify the settings already in place by using the command #hdparm -v /dev/hda   The results are:

multcount   = 0 (off)

I/O support  = 0 (default16-bit)

unmaskirq  = 0 (off)

using_dma = 0 (off)

keepsettings = 0 (off)

nowerr = 0 (off)

readonly = 0 (off)

readahead =8 (on)

geometry = 784/255/63, sectors = 12594960, start = 0

 

To get a starting reference you must test your disk's speed. Use the command #hdparm -t /dev/hda  The results are:

Timing buffered disk reads: 32 MB in 8.17 seconds = 3.92 MB/sec

 

Next set the I/O support to 32 bit and turn on DMA access.  Use the command #hdparm -c 1 -d 1 /dev/hda  The results are:

setting 32-bit I/O support flag to 1

setting using_dma to 1 (on)

I/O support = 1(32-bit)

using_dma = 1 (on)

 

Now verify the results by running the timing test again.  Use the command #hdparm -t /dev/hda  The results are:

Timing buffered disk reads: 32 MB in 2.18 seconds = 14.68 MB/sec.

 

Now that 32-bit I/O support and DMA is enabled we need a way to keep it when we reboot the computer.  *Note, this next example is specific to SuSE Linux.  Your distribution will probably vary slightly since SuSE's multi-user with networking support is run level 2. (Run level 3 for Redhat)

  1. #cd /etc/rc.d/rc2.d
  2. #vi S80disk
  3. When in vi press "i" to insert text and enter:

    #This script enables 32-bit I/O access and DMA support for the hard drive /dev/hda

    hdparm -c 1 -d 1 -k 1 /dev/hda

  4. To save the file and exit use the [esc] key and type ":wq" and hit the [enter] key
  5. #chmod 777 S80disk
  6. #ls -la 
  7. Your file will be displayed and should be executable with -rwxrwxrwx attributes.

The above example is one way of accomplishing the task, you can start the support in any level you choose and any way you choose as long as it starts every time with the system. 

To test it enter #init 6 to restart, then login and su to root.

And finally verify the settings have been reinitialized after the restart by using the command #hdparm -v /dev/hda   The results are:

multcount   = 0 (off)

I/O support  = 1 (32-bit)

unmaskirq  = 0 (off)

using_dma = 1 (on)

keepsettings = 1 (on)

nowerr = 0 (off)

readonly = 0 (off)

readahead =8 (on)

geometry = 784/255/63, sectors = 12594960, start = 0

 

BACK TO LINUX