显示正在使用的硬盘信息

首先使用hdparm命令查看硬盘的信息。可以确认能够支持的功能和当前的配置情况。显示信息-i是旧的选项。在这里使用的是显示内容比-i更为详细的-I选项。下面是-I选项的输出结果。关于设置选项的地方用阴影表示。


hdparm-I/dev/sda

/dev/sda:

ATA device, with non-removable media

Model Number:WDC WD1600AAJS-19M0A0

Serial Number:WD-WCAV32353380

Firmware Revision:01.03E01

Transport:Serial, SATA 1.0a, SATA II Extensions, SATA Rev 2.5

Standards:

Supported:8 7 6 5

Likely used:8

Configuration:

……

Logical/Physical Sector size:512 bytes

device size with M=1024*1024:152627 MBytes

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

cache/buffer size=8192 KBytes

Capabilities:

LBA, IORDY(can be disabled)

Queue depth:32-Q选项(硬件中支持的最大值)

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

R/W multiple sector transfer:Max=16 Current=16-m选项

Recommended acoustic management value:128,current value:128

-M选项

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

-X选项

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-W选项

*

Look-ahead-A选项

*

Host Protected Area feature set

*

WRITE_BUFFER command

*

READ_BUFFER command

*

NOP cmd

*

DOWNLOAD_MICROCODE

Power-Up In Standby feature set

*

SET_FEATURES required to spinup after power up

SET_MAX security extension

*

Automatic Acoustic Management feature set-M选项

*

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

……

*

Native Command Queueing(NCQ)-Q选项

*

Host-initiated interface power management HIPM

*

Phy event counters

DMA Setup Auto-Activate optimization

Device-initiated interface power management DIPM

……

Security:

Master password revision code=65534

……


这样就可以通过-I选项了解磁盘的详细情况。Commands/features:显示的是磁盘功能列表。Enabled列中有*标记的,是这个硬盘支持的。

下面介绍hdparm命令的选项。