Name

hdparm

Synopsis

                  hdparm [options] [device]

Read or set the hard drive parameters. This command can be used to tune hard drive performance; it is mostly used with IDE drives, but can also be used with SCSI drives.

Options

The hdparm command accepts many option flags, including some that can result in filesystem corruption if misused. Flags can be used to set or get a parameter. To get a parameter, just pass the flag without a value. To set a parameter, follow the flag with a space and the appropriate value.

-a [n]

Get or set the number of sectors to read ahead in the disk. The default is 8 sectors (4KB); a larger value is more efficient for large, sequential reads, and a smaller value is better for small, random reads. Many IDE drives include this functionality in the drive itself, so this feature is not always necessary.

-A

Enable or disable the IDE read-ahead feature. Usually on by default.

-b [n]

Get or set the bus state for the drive.

-B

Set the Advanced Power Management (APM) data if the drive supports it.

-c [n]

Get or set 32-bit I/O values for IDE drives. Acceptable values are 0 (32-bit support off), 1 (32-bit support on), and 3 (on, but only with a sync sequence).

-C

Check the power status of the drive. This will tell you unknown, active/idle, standby, or sleeping. Use -S, -y, -Y, and -Z to set the power status.

-d [n]

Get or set the using_dma flag for the drive, which may be 0 or 1.

-D

Enable or disable defect handling features that are controlled by the hard drive itself. ...

Get Linux in a Nutshell, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.