4

I'm running CentOS 5 with a PATA hard drive. I've used hdparm to tune the hard disk for better performance, but there are 2 settings that don't work:

hdparm -M 254 /dev/hda

gives the error

HDIO_DRIVE_CMD:ACOUSTIC failed: Input/output error

and

hdparm -d1 /dev/hda

gives the error

HDIO_SET_DMA failed: Operation not permitted

What do I need to check to set these? It's already old hardware so anything I can do to squeeze out more performance would be helpful.

Thanks.

By request, here is the output of hdparm -iI /dev/hda and cat /proc/ide/hda/settings

DMA and acoustic settings do exist but I just can't set them successfully. Here is the output:

[root@hptest ~]# hdparm -iI /dev/hda

/dev/hda:

 Model=ST3500320AS, FwRev=SD15, SerialNo=9QM6WHGY
 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs RotSpdTol>.5% }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4
 BuffType=unknown, BuffSize=0kB, MaxMultSect=16, MultSect=off
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=268435455
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4
 AdvancedPM=no WriteCache=enabled
 Drive conforms to: unknown:  ATA/ATAPI-4 ATA/ATAPI-5 ATA/ATAPI-6 ATA/ATAPI-7

 * signifies the current active mode


ATA device, with non-removable media
        Model Number:       ST3500320AS
        Serial Number:      9QM6WHGY
        Firmware Revision:  SD15
Transport: Serial
Standards:
        Supported: 8 7 6 5
        Likely used: 8
Configuration:
        Logical         max     current
        cylinders       16383   65535
        heads           16      1
        sectors/track   63      63
        --
        CHS current addressable sectors:    4128705
        LBA    user addressable sectors:  268435455
        LBA48  user addressable sectors:  976773168
        device size with M = 1024*1024:      476940 MBytes
        device size with M = 1000*1000:      500107 MBytes (500 GB)
Capabilities:
        LBA, IORDY(can be disabled)
        Queue depth: 32
        Standby timer values: spec'd by Standard, no device specific minimum
        R/W multiple sector transfer: Max = 16  Current = 16
        Recommended acoustic management value: 254, current value: 0
        DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6
             Cycle time: min=120ns recommended=120ns
        PIO: pio0 pio1 pio2 pio3 pio4
             Cycle time: no flow control=120ns  IORDY flow control=120ns
Commands/features:
        Enabled Supported:
           *    SMART feature set
                Security Mode feature set
           *    Power Management feature set
           *    Write cache
           *    Look-ahead
           *    Host Protected Area feature set
           *    WRITE_BUFFER command
           *    READ_BUFFER command
           *    DOWNLOAD_MICROCODE
                SET_MAX security extension
           *    48-bit Address feature set
           *    Device Configuration Overlay feature set
           *    Mandatory FLUSH_CACHE
           *    FLUSH_CACHE_EXT
           *    SMART error logging
           *    SMART self-test
           *    General Purpose Logging feature set
           *    64-bit World wide name
           *    Write-Read-Verify feature set
           *    WRITE_UNCORRECTABLE command
           *    {READ,WRITE}_DMA_EXT_GPL commands
           *    SATA-I signaling speed (1.5Gb/s)
           *    SATA-II signaling speed (3.0Gb/s)
           *    Native Command Queueing (NCQ)
           *    Phy event counters
           *    Software settings preservation
Security:
        Master password revision code = 65534
                supported
        not     enabled
        not     locked
        not     frozen
        not     expired: security count
                supported: enhanced erase
        102min for SECURITY ERASE UNIT. 102min for ENHANCED SECURITY ERASE UNIT.
Checksum: correct
[root@hptest ~]# cat /proc/ide/hda/settings
name                    value           min             max             mode
----                    -----           ---             ---             ----
acoustic                0               0               254             rw
address                 1               0               2               rw
bios_cyl                60801           0               65535           rw
bios_head               255             0               255             rw
bios_sect               63              0               63              rw
bswap                   0               0               1               r
current_speed           0               0               70              rw
failures                0               0               65535           rw
init_speed              0               0               70              rw
io_32bit                0               0               3               rw
keepsettings            0               0               1               rw
lun                     0               0               7               rw
max_failures            1               0               65535           rw
multcount               0               0               16              rw
nice1                   1               0               1               rw
nowerr                  0               0               1               rw
number                  0               0               3               rw
pio_mode                write-only      0               255             w
unmaskirq               0               0               1               rw
using_dma               0               0               1               rw
wcache                  1               0               1               rw
[root@hptest ~]#
A.B.
  • 3,372
  • 2
  • 17
  • 27
Tensigh
  • 341
  • 2
  • 4
  • 14
  • I found the hdparm setting for DMA but I still can't turn DMA itself on. – Tensigh Apr 24 '14 at 05:19
  • if you run `hdparm -iI /dev/hda` does it get any result? If you could post the result of `cat /proc/ide/hda/settings` on your question it would be helpful –  Apr 25 '14 at 19:44
  • I'll post both. DMA and acoustic settings do exist but I just can't set them successfully. – Tensigh Apr 28 '14 at 00:30
  • Could you please use the code tag so we can se more clearly? –  Apr 29 '14 at 11:18
  • I tried that the first time but I'll see if I can make it work again. – Tensigh Apr 30 '14 at 11:22
  • Sorry, the first time I just did the eight spaces thing to create a block of code and it didn't work. Looks like I should have used the tag that exists on this page that doesn't work at the other Stack Exchange. My bad for being a dumbass. – Tensigh Apr 30 '14 at 11:24
  • That´s perfect now. :) And what about `hdparm -I /dev/hda | grep -i acoustic` ? I´m starting to suspect that could be some mobo limitation. I had some issues with an old motherboard that after a firmware upgrade implemented a better apm model. –  Apr 30 '14 at 11:32
  • Sorry for the late reply; it's Golden Week in Japan. The acoustic setting won't work - it errors out at whatever value I plug in there. `hdparm -I /dev/hda | grep -i acoustic Recommended acoustic management value: 254, current value: 0` – Tensigh May 07 '14 at 06:11
  • I figured out the problem partially. I flashed the BIOS and now I can use SATA settings. The drive is working MUCH better now. I still can't set d1 but it's running about 30x faster now. – Tensigh May 09 '14 at 06:24
  • Well, tjat was my suspect too: " I´m starting to suspect that could be some mobo limitation". Have you tried to upgrade the HD firmware too? –  May 09 '14 at 10:58
  • 1
    Yeah, you hit the nail on the head with that one. I might do that if I have a chance but the buffer reads are now at about 105 MB / sec with far exceeds the 3.5 MB I was getting. – Tensigh May 09 '14 at 22:48
  • you could answer you own question with the defect veredict and close it ;) Cheers –  May 10 '14 at 18:00

1 Answers1

1

The answer was a BIOS upgrade was necessary. Once BIOS was upgraded I could use the drive as a SATA drive. I still can't set some of the options but at least the drive is working. Thanks to nwilder for the the suggestion.

Tensigh
  • 341
  • 2
  • 4
  • 14