Projects / hdparm

hdparm

hdparm is a Linux shell utility for viewing and manipulating various IDE drive and driver parameters. Most drives can benefit from improved performance using a command similar to "hdparm -qm8 -qu1 -qc1 -qd1 /dev/hda".

Tags
Licenses
Operating Systems
Implementation

RSS Recent releases

  •  04 Feb 2012 16:08

Release Notes: A new "-R" option has been added to control the Read-Write-Verify feature.

  •  08 Jan 2012 20:01

Release Notes: The wiping script wiper.sh was updated to allow all SCSI_DISK major numbers. The handing of very long SECURITY-ERASE times was updated. The "-J" flag was added for wdidle3 set/get.

Release Notes: RAID 1 start_lba values are now handled. The "--fibmap" command is now terminated when start_lba is indeterminate. wiper.sh was modified for an issue with HFS+ file systems and to avoid using an obsolete command.

  •  17 Nov 2010 22:20

Release Notes: The wiper.sh script was enhanced to enable unattended operation, to handle SIGPIPE, and to support hfsplus and NTFS file systems. The man page was updated.

  •  20 Oct 2010 13:58

Release Notes: Fixes were made for cbd issues, in turn fixing the "-B" (advanced power management) option.

RSS Recent comments

14 Jul 2009 06:06 AKS91 Thumbs up

Hi Guys
I am trying to use hdparam9.9 on kernel 2.6.26 and i am getting folllowing error message, I am trying to update SSD firmware. please provide support.
/*========================================*/
[root@localhost hdparm-9.9]# ./hdparm --fwdownload --yes-i_know_what_i_am_doing ../if4.bin /dev/sdb

../if4.bin:
HDIO_GETGEO failed: Inappropriate ioctl for device

Thanks
Aks

14 Jul 2009 04:15 AKS91 Thumbs up

HI Guys,

I want to implement firmware download support for SSD device.
I added some changes in libata-scsi.c ata_cmd_ioctl. but I am getting time out error when i try to download initial firmware , firmware size is 64k.

I checked in old version of hdparam also support --firmware download.

I need help to solve time out error message, please provides some inputs or i can use any specific version of hdparam for firmware download.

Thanks
AKS

22 Jun 2009 04:05 rkononov

I'm not sure where you want the bugs submitted...

Compiled from v9.15 sources, hdparm crashes at hdparm.c, line 1826, when get_identify_data() returns NULL. Checking that id!=NULL is needed.

26 Dec 2008 04:29 ideguy

Re: Inappropriate ioctl for device

..

> $ sudo /sbin/hdparm -c1 -d1 /dev/sda

>

> /dev/sda:

> setting 32-bit IO_support flag to 1

> HDIO_SET_32BIT failed: Invalid argument

>

> setting using_dma to 1 (on)

> HDIO_SET_DMA failed: Inappropriate ioctl

> for device

> IO_support = 0 (default)

> HDIO_GET_DMA failed: Inappropriate ioctl

> for device

..

libata does not have a way to control DMA or 32bit PIO settings. So the command will fail. Normal. Ignore it.

Libata will always use DMA if possible, so no need for either setting.

-ml

26 Dec 2008 02:23 shirishag75

Inappropriate ioctl for device
Hi all,

I get the above error.

This is on ubuntu 8.10 2.6.27-9-generic

$ uname -a

Linux shirish-desktop 2.6.27-9-generic #1 SMP Thu Nov 20 21:57:00 UTC 2008 i686 GNU/Linux

$ sudo /sbin/hdparm -c1 -d1 /dev/sda

/dev/sda:

setting 32-bit IO_support flag to 1

HDIO_SET_32BIT failed: Invalid argument

setting using_dma to 1 (on)

HDIO_SET_DMA failed: Inappropriate ioctl for device

IO_support = 0 (default)

HDIO_GET_DMA failed: Inappropriate ioctl for device

The disk in question is an IDE drive in emulated SCSI mode due to ubuntu moving to the new 'libata' library.

$ sudo hdparm -I /dev/sda

[sudo] password for shirish:

/dev/sda:

ATA device, with non-removable media

Model Number: ST3160021A

Serial Number: 4JS26D4P

Firmware Revision: 8.01

Standards:

Used: ATA/ATAPI-6 T13 1410D revision 2

Supported: 6 5 4

Configuration:

Logical max current

cylinders 16383 4047

heads 16 16

sectors/track 63 255

--

CHS current addressable sectors: 16511760

LBA user addressable sectors: 268435455

LBA48 user addressable sectors: 312581808

device size with M = 1024*1024: 152627 MBytes

device size with M = 1000*1000: 160041 MBytes (160 GB)

Capabilities:

LBA, IORDY(can be disabled)

Standby timer values: spec'd by Standard, no device specific minimum

R/W multiple sector transfer: Max = 16 Current = 16

Recommended acoustic management value: 128, current value: 0

DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 *udma5

Cycle time: min=120ns recommended=120ns

PIO: pio0 pio1 pio2 pio3 pio4

Cycle time: no flow control=240ns 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

Time Limited Commands (TLC) feature set

Command Completion Time Limit (CCTL)

Security:

Master password revision code = 65534

supported

not enabled

not locked

not frozen

not expired: security count

not supported: enhanced erase

HW reset results:

CBLID- above Vih

Device num = 1 determined by the jumper

Checksum: correct

Please lemme know if there is anyway to set the same.

Screenshot

Project Spotlight

Path Defense Framework

A framework for games with defense towers along a path.

Screenshot

Project Spotlight

turses

A Twitter client for the console.