HDPARM(8) HDPARM(8)
NAME
hdparm - get/set hard disk parameters/获取/设置硬盘参数
hdparm - get/set hard disk parameters/获取/设置硬盘参数
SYNOPSIS/简介
hdparm [ flags ] [device] ..
hdparm [ flags ] [device] ..
DESCRIPTION/描述
hdparm provides a command line interface to various hard disk ioctls supported by the stock Linux ATA/IDE device driver subsystem. Some options may work correctly
only with the latest kernels. For best results, compile hdparm with the include files from the latest kernel source code.
hdparm提供了一个命令行接口,可以连接到股票linux ata/ide设备驱动子系统支持的各种硬盘ioctl。有些选项可能只适用于最新的内核。
为获得最佳结果,请使用最新内核源代码中的include文件编译hdparm。
hdparm provides a command line interface to various hard disk ioctls supported by the stock Linux ATA/IDE device driver subsystem. Some options may work correctly
only with the latest kernels. For best results, compile hdparm with the include files from the latest kernel source code.
hdparm提供了一个命令行接口,可以连接到股票linux ata/ide设备驱动子系统支持的各种硬盘ioctl。有些选项可能只适用于最新的内核。
为获得最佳结果,请使用最新内核源代码中的include文件编译hdparm。
OPTIONS/选项
When no flags are given, -acdgkmnru is assumed.
当没有给出标志时,假定为-acdgkmnru。
When no flags are given, -acdgkmnru is assumed.
当没有给出标志时,假定为-acdgkmnru。
-a Get/set sector count for filesystem read-ahead. This is used to improve performance in sequential reads of large files, by prefetching additional blocks in
anticipation of them being needed by the running task. In the current kernel version (2.0.10) this has a default setting of 8 sectors (4KB). This value
seems good for most purposes, but in a system where most file accesses are random seeks, a smaller setting might provide better performance. Also, many IDE
drives also have a separate built-in read-ahead function, which alleviates the need for a filesystem read-ahead in many situations.
获取/设置文件系统预读的扇区计数。这用于提高对大型文件的顺序读取的性能,方法是预取其他块,以预期正在运行的任务需要这些块。
在当前内核版本(2.0.10)中,默认设置为8个扇区(4KB)。这个值在大多数情况下似乎都很好,但在大多数文件访问都是随机查找的系统中,较小的设置可能提供更好的性能。
此外,许多IDE驱动器还具有单独的内置预读功能,这在许多情况下减少了对文件系统预读的需要。
anticipation of them being needed by the running task. In the current kernel version (2.0.10) this has a default setting of 8 sectors (4KB). This value
seems good for most purposes, but in a system where most file accesses are random seeks, a smaller setting might provide better performance. Also, many IDE
drives also have a separate built-in read-ahead function, which alleviates the need for a filesystem read-ahead in many situations.
获取/设置文件系统预读的扇区计数。这用于提高对大型文件的顺序读取的性能,方法是预取其他块,以预期正在运行的任务需要这些块。
在当前内核版本(2.0.10)中,默认设置为8个扇区(4KB)。这个值在大多数情况下似乎都很好,但在大多数文件访问都是随机查找的系统中,较小的设置可能提供更好的性能。
此外,许多IDE驱动器还具有单独的内置预读功能,这在许多情况下减少了对文件系统预读的需要。
-A Disable/enable the IDE drive麓s read-lookahead feature (usually ON by default). Usage: -A0 (disable) or -A1 (enable).
禁用/启用IDE驱动器的预读功能(通常在默认情况下打开)。用法:-a0(禁用)或-a1(启用)。
禁用/启用IDE驱动器的预读功能(通常在默认情况下打开)。用法:-a0(禁用)或-a1(启用)。
-b Get/set bus state.
获取/设置总线状态。
获取/设置总线状态。
-B Set Advanced Power Management feature, if the drive supports it. A low value means aggressive power management and a high value means better performance. A
value of 255 will disable apm on the drive.
如果驱动器支持,请设置高级电源管理功能。低值意味着积极的电源管理,高值意味着更好的性能。值255将禁用驱动器上的APM。
value of 255 will disable apm on the drive.
如果驱动器支持,请设置高级电源管理功能。低值意味着积极的电源管理,高值意味着更好的性能。值255将禁用驱动器上的APM。
-c Query/enable (E)IDE 32-bit I/O support. A numeric parameter can be used to enable/disable 32-bit I/O support: Currently supported values include 0 to dis-
able 32-bit I/O support, 1 to enable 32-bit data transfers, and 3 to enable 32-bit data transfers with a special sync sequence required by many chipsets.
The value 3 works with nearly all 32-bit IDE chipsets, but incurs slightly more overhead. Note that "32-bit" refers to data transfers across a PCI or VLB
bus to the interface card only; all (E)IDE drives still have only a 16-bit connection over the ribbon cable from the interface card.
查询/启用(E)IDE 32位I/O支持。数字参数可用于启用/禁用32位I/O支持:当前支持的值包括0到禁用32位I/O支持,1到启用32位数据传输,以及3到启用32位数据传输,
具有许多芯片集所需的特殊同步序列。值3适用于几乎所有32位的IDE芯片组,但会增加一些开销。请注意,“32位”仅指通过PCI或VLB总线到接口卡的数据传输;
所有(e)IDE驱动器仍然只有16位连接,通过接口卡的带状电缆。
able 32-bit I/O support, 1 to enable 32-bit data transfers, and 3 to enable 32-bit data transfers with a special sync sequence required by many chipsets.
The value 3 works with nearly all 32-bit IDE chipsets, but incurs slightly more overhead. Note that "32-bit" refers to data transfers across a PCI or VLB
bus to the interface card only; all (E)IDE drives still have only a 16-bit connection over the ribbon cable from the interface card.
查询/启用(E)IDE 32位I/O支持。数字参数可用于启用/禁用32位I/O支持:当前支持的值包括0到禁用32位I/O支持,1到启用32位数据传输,以及3到启用32位数据传输,
具有许多芯片集所需的特殊同步序列。值3适用于几乎所有32位的IDE芯片组,但会增加一些开销。请注意,“32位”仅指通过PCI或VLB总线到接口卡的数据传输;
所有(e)IDE驱动器仍然只有16位连接,通过接口卡的带状电缆。
-C Check the current IDE power mode status, which will always be one of unknown (drive does not support this command), active/idle (normal operation), standby
(low power mode, drive has spun down), or sleeping (lowest power mode, drive is completely shut down). The -S, -y, -Y, and -Z flags can be used to manipu-
late the IDE power modes.
检查当前的IDE电源模式状态,该状态始终是未知状态(驱动器不支持此命令)、活动/空闲状态(正常运行)、待机状态(低电源模式、驱动器已关机)或
休眠状态(最低电源模式、驱动器已完全关机)。-s、-y、-y和-z标志可用于操作IDE电源模式。
(low power mode, drive has spun down), or sleeping (lowest power mode, drive is completely shut down). The -S, -y, -Y, and -Z flags can be used to manipu-
late the IDE power modes.
检查当前的IDE电源模式状态,该状态始终是未知状态(驱动器不支持此命令)、活动/空闲状态(正常运行)、待机状态(低电源模式、驱动器已关机)或
休眠状态(最低电源模式、驱动器已完全关机)。-s、-y、-y和-z标志可用于操作IDE电源模式。
-d Disable/enable the "using_dma" flag for this drive. This option now works with most combinations of drives and PCI interfaces which support DMA and which
are known to the kernel IDE driver. It is also a good idea to use the appropriate -X option in combination with -d1 to ensure that the drive itself is pro-
grammed for the correct DMA mode, although most BIOSs should do this for you at boot time. Using DMA nearly always gives the best performance, with fast
I/O throughput and low CPU usage. But there are at least a few configurations of chipsets and drives for which DMA does not make much of a difference, or
may even slow things down (on really messed up hardware!). Your mileage may vary.
禁用/启用此驱动器的“使用u dma”标志。这个选项现在可以与大多数驱动器和PCI接口组合使用,后者支持DMA,并且内核IDE驱动程序已知。最好将适当的-x选项与-d1结合使用,
以确保驱动器本身被编程为正确的DMA模式,尽管大多数bios应该在引导时为您这样做。使用DMA几乎总是能提供最佳的性能,具有快速的I/O吞吐量和较低的CPU使用率。但是,
至少有一些芯片组和驱动器的配置,对于这些配置,DMA并没有太大的区别,甚至可能会降低速度(在真正混乱的硬件上!).您的里程可能会有所不同。
are known to the kernel IDE driver. It is also a good idea to use the appropriate -X option in combination with -d1 to ensure that the drive itself is pro-
grammed for the correct DMA mode, although most BIOSs should do this for you at boot time. Using DMA nearly always gives the best performance, with fast
I/O throughput and low CPU usage. But there are at least a few configurations of chipsets and drives for which DMA does not make much of a difference, or
may even slow things down (on really messed up hardware!). Your mileage may vary.
禁用/启用此驱动器的“使用u dma”标志。这个选项现在可以与大多数驱动器和PCI接口组合使用,后者支持DMA,并且内核IDE驱动程序已知。最好将适当的-x选项与-d1结合使用,
以确保驱动器本身被编程为正确的DMA模式,尽管大多数bios应该在引导时为您这样做。使用DMA几乎总是能提供最佳的性能,具有快速的I/O吞吐量和较低的CPU使用率。但是,
至少有一些芯片组和驱动器的配置,对于这些配置,DMA并没有太大的区别,甚至可能会降低速度(在真正混乱的硬件上!).您的里程可能会有所不同。
--direct
Use the kernel O_DIRECT flag when performing a -t timing test. This bypasses the page cache, causing the reads to go directly from the drive into hdparm?.
buffers, using so-called "raw" I/O. In many cases, this can produce results that appear much faster than the usual page cache method, giving a better indi-
cation of raw device and driver performance.
在执行-t计时测试时使用kernel o_direct标志。这会绕过页面缓存,导致读取直接从驱动器进入hdparm?.buffers,使用所谓的“原始”I/O。
在许多情况下,这可以产生比通常的页面缓存方法更快的结果,从而更好地指示原始设备和驱动程序性能。
Use the kernel O_DIRECT flag when performing a -t timing test. This bypasses the page cache, causing the reads to go directly from the drive into hdparm?.
buffers, using so-called "raw" I/O. In many cases, this can produce results that appear much faster than the usual page cache method, giving a better indi-
cation of raw device and driver performance.
在执行-t计时测试时使用kernel o_direct标志。这会绕过页面缓存,导致读取直接从驱动器进入hdparm?.buffers,使用所谓的“原始”I/O。
在许多情况下,这可以产生比通常的页面缓存方法更快的结果,从而更好地指示原始设备和驱动程序性能。
-D Enable/disable the on-drive defect management feature, whereby the drive firmware tries to automatically manage defective sectors by relocating them to
"spare" sectors reserved by the factory for such.
启用/禁用驱动器缺陷管理功能,其中驱动器固件尝试通过将缺陷扇区重新定位到工厂为其保留的“备用”扇区来自动管理缺陷扇区。
"spare" sectors reserved by the factory for such.
启用/禁用驱动器缺陷管理功能,其中驱动器固件尝试通过将缺陷扇区重新定位到工厂为其保留的“备用”扇区来自动管理缺陷扇区。
-E Set cdrom speed. This is NOT necessary for regular operation, as the drive will automatically switch speeds on its own. But if you want to play with it,
just supply a speed number after the option, usually a number like 2 or 4.
设置cdrom速度。这对于正常操作来说是不必要的,因为驱动器本身会自动切换速度。但如果你想玩它,只需在选项后提供一个速度值,通常是2或4这样的数字。
just supply a speed number after the option, usually a number like 2 or 4.
设置cdrom速度。这对于正常操作来说是不必要的,因为驱动器本身会自动切换速度。但如果你想玩它,只需在选项后提供一个速度值,通常是2或4这样的数字。
-f Sync and flush the buffer cache for the device on exit. This operation is also performed as part of the -t and -T timings.
退出时同步并刷新设备的缓冲区缓存。此操作也作为-t和-t计时的一部分执行。
退出时同步并刷新设备的缓冲区缓存。此操作也作为-t和-t计时的一部分执行。
-g Display the drive geometry (cylinders, heads, sectors), the size (in sectors) of the device, and the starting offset (in sectors) of the device from the
beginning of the drive.
显示驱动器的几何图形(气缸、磁头、扇区)、设备的大小(以扇区为单位)以及设备从驱动器开始时的起始偏移量(以扇区为单位)。
beginning of the drive.
显示驱动器的几何图形(气缸、磁头、扇区)、设备的大小(以扇区为单位)以及设备从驱动器开始时的起始偏移量(以扇区为单位)。
-h Display terse usage information (help)./显示简要用法信息(帮助)。
-i Display the identification info that was obtained from the drive at boot time, if available. This is a feature of modern IDE drives, and may not be sup-
ported by older devices. The data returned may or may not be current, depending on activity since booting the system. However, the current multiple sector
mode count is always shown. For a more detailed interpretation of the identification info, refer to AT Attachment Interface for Disk Drives (ANSI ASC
X3T9.2 working draft, revision 4a, April 19/93).
显示引导时从驱动器获取的标识信息(如果可用)。这是现代IDE驱动器的一个特性,可能不受旧设备的支持。返回的数据可能是当前的,也可能不是当前的,
这取决于自启动系统以来的活动。但是,当前的多扇区模式计数始终显示。有关标识信息的更详细解释,
请参阅磁盘驱动器附件接口(ANSI ASC X3T9.2工作草案,第4A版,1993年4月19日)。
ported by older devices. The data returned may or may not be current, depending on activity since booting the system. However, the current multiple sector
mode count is always shown. For a more detailed interpretation of the identification info, refer to AT Attachment Interface for Disk Drives (ANSI ASC
X3T9.2 working draft, revision 4a, April 19/93).
显示引导时从驱动器获取的标识信息(如果可用)。这是现代IDE驱动器的一个特性,可能不受旧设备的支持。返回的数据可能是当前的,也可能不是当前的,
这取决于自启动系统以来的活动。但是,当前的多扇区模式计数始终显示。有关标识信息的更详细解释,
请参阅磁盘驱动器附件接口(ANSI ASC X3T9.2工作草案,第4A版,1993年4月19日)。
-I Request identification info directly from the drive, which is displayed in a new expanded format with considerably more detail than with the older -i flag.
直接从驱动器请求标识信息,该信息以新的扩展格式显示,比旧的-i标志更详细。
直接从驱动器请求标识信息,该信息以新的扩展格式显示,比旧的-i标志更详细。
--Istdin
This is a special "no seatbelts" variation on the -I option, which accepts a drive identification block as standard input instead of using a /dev/hd* param-
eter. The format of this block must be exactly the same as that found in the /proc/ide/*/hd*/identify "files", or that produced by the --Istdout option
described below. This variation is designed for use with collected "libraries" of drive identification information, and can also be used on ATAPI drives
which may give media errors with the standard mechanism.
这是-i选项上的一个特殊“无安全带”变体,它接受驱动器标识块作为标准输入,而不是使用/dev/hd*参数。此块的格式必须与/proc/ide/*/hd*/identify“files”中的格式完全相同,
或者与下面描述的--istdout选项生成的格式完全相同。这种变化设计用于收集驱动器标识信息的“库”,也可用于ATAPI驱动器,这可能会导致标准机制的媒体错误。
This is a special "no seatbelts" variation on the -I option, which accepts a drive identification block as standard input instead of using a /dev/hd* param-
eter. The format of this block must be exactly the same as that found in the /proc/ide/*/hd*/identify "files", or that produced by the --Istdout option
described below. This variation is designed for use with collected "libraries" of drive identification information, and can also be used on ATAPI drives
which may give media errors with the standard mechanism.
这是-i选项上的一个特殊“无安全带”变体,它接受驱动器标识块作为标准输入,而不是使用/dev/hd*参数。此块的格式必须与/proc/ide/*/hd*/identify“files”中的格式完全相同,
或者与下面描述的--istdout选项生成的格式完全相同。这种变化设计用于收集驱动器标识信息的“库”,也可用于ATAPI驱动器,这可能会导致标准机制的媒体错误。
--Istdout
This option simply dumps the identify data in hex to stdout, in a format similar to that from /proc/, and suitable for later use with the --Istdin option.
这个选项只是将标识数据以十六进制的形式转储到stdout,格式类似于/proc/中的格式,并且适合以后与--istdin选项一起使用。
This option simply dumps the identify data in hex to stdout, in a format similar to that from /proc/, and suitable for later use with the --Istdin option.
这个选项只是将标识数据以十六进制的形式转储到stdout,格式类似于/proc/中的格式,并且适合以后与--istdin选项一起使用。
-k Get/set the keep_settings_over_reset flag for the drive. When this flag is set, the driver will preserve the -dmu options over a soft reset, (as done dur-
ing the error recovery sequence). This flag defaults to off, to prevent drive reset loops which could be caused by combinations of -dmu settings. The -k
flag should therefore only be set after one has achieved confidence in correct system operation with a chosen set of configuration settings. In practice,
all that is typically necessary to test a configuration (prior to using -k) is to verify that the drive can be read/written, and that no error logs (kernel
messages) are generated in the process (look in /var/adm/messages on most systems).
获取/设置驱动器的保持设置重置标志。设置此标志后,驱动程序将在软重置上保留-dmu选项(在错误恢复过程中完成)。
此标志默认为关闭,以防止-dmu设置组合导致驱动器重置循环。因此,只有在使用选定的一组配置设置对正确的系统操作有信心之后,才能设置-k标志。
在实践中,测试配置(在使用-k之前)通常需要验证驱动器是否可以读/写,以及过程中是否没有生成错误日志(内核消息)(在大多数系统上查看/var/adm/messages)。
ing the error recovery sequence). This flag defaults to off, to prevent drive reset loops which could be caused by combinations of -dmu settings. The -k
flag should therefore only be set after one has achieved confidence in correct system operation with a chosen set of configuration settings. In practice,
all that is typically necessary to test a configuration (prior to using -k) is to verify that the drive can be read/written, and that no error logs (kernel
messages) are generated in the process (look in /var/adm/messages on most systems).
获取/设置驱动器的保持设置重置标志。设置此标志后,驱动程序将在软重置上保留-dmu选项(在错误恢复过程中完成)。
此标志默认为关闭,以防止-dmu设置组合导致驱动器重置循环。因此,只有在使用选定的一组配置设置对正确的系统操作有信心之后,才能设置-k标志。
在实践中,测试配置(在使用-k之前)通常需要验证驱动器是否可以读/写,以及过程中是否没有生成错误日志(内核消息)(在大多数系统上查看/var/adm/messages)。
-K Set the drive麓s keep_features_over_reset flag. Setting this enables the drive to retain the settings for -APSWXZ over a soft reset (as done during the
error recovery sequence). Not all drives support this feature.
设置驱动器的保持功能重置标志。通过设置,驱动器可以通过软重置(在错误恢复过程中完成)来保留-apswxz的设置。并非所有驱动器都支持此功能。
error recovery sequence). Not all drives support this feature.
设置驱动器的保持功能重置标志。通过设置,驱动器可以通过软重置(在错误恢复过程中完成)来保留-apswxz的设置。并非所有驱动器都支持此功能。
-L Set the drive麓s doorlock flag. Setting this to 1 will lock the door mechanism of some removable hard drives (eg. Syquest, ZIP, Jazz..), and setting it to 0
will unlock the door mechanism. Normally, Linux maintains the door locking mechanism automatically, depending on drive usage (locked whenever a filesystem
is mounted). But on system shutdown, this can be a nuisance if the root partition is on a removeable disk, since the root partition is left mounted (read-
only) after shutdown. So, by using this command to unlock the door after the root filesystem is remounted read-only, one can then remove the cartridge from
the drive after shutdown.
设置驾驶室门锁标志。将此设置为1将锁定某些可移动硬盘驱动器(如Syquest、Zip、Jazz等)的门机制,将其设置为0将解锁门机制。
通常,Linux会根据驱动器的使用情况自动维护门锁定机制(每当安装文件系统时都会锁定)。
但是,在系统关闭时,如果根分区位于可移动磁盘上,这可能会造成麻烦,因为根分区在关闭后会保留挂载状态(只读)。
因此,通过使用此命令在以只读方式重新安装根文件系统后打开门,可以在关机后从驱动器中取出盒带。
will unlock the door mechanism. Normally, Linux maintains the door locking mechanism automatically, depending on drive usage (locked whenever a filesystem
is mounted). But on system shutdown, this can be a nuisance if the root partition is on a removeable disk, since the root partition is left mounted (read-
only) after shutdown. So, by using this command to unlock the door after the root filesystem is remounted read-only, one can then remove the cartridge from
the drive after shutdown.
设置驾驶室门锁标志。将此设置为1将锁定某些可移动硬盘驱动器(如Syquest、Zip、Jazz等)的门机制,将其设置为0将解锁门机制。
通常,Linux会根据驱动器的使用情况自动维护门锁定机制(每当安装文件系统时都会锁定)。
但是,在系统关闭时,如果根分区位于可移动磁盘上,这可能会造成麻烦,因为根分区在关闭后会保留挂载状态(只读)。
因此,通过使用此命令在以只读方式重新安装根文件系统后打开门,可以在关机后从驱动器中取出盒带。
-m Get/set sector count for multiple sector I/O on the drive. A setting of 0 disables this feature. Multiple sector mode (aka IDE Block Mode), is a feature
of most modern IDE hard drives, permitting the transfer of multiple sectors per I/O interrupt, rather than the usual one sector per interrupt. When this
feature is enabled, it typically reduces operating system overhead for disk I/O by 30-50%. On many systems, it also provides increased data throughput of
anywhere from 5% to 50%. Some drives, however (most notably the WD Caviar series), seem to run slower with multiple mode enabled. Your mileage may vary.
Most drives support the minimum settings of 2, 4, 8, or 16 (sectors). Larger settings may also be possible, depending on the drive. A setting of 16 or 32
seems optimal on many systems. Western Digital recommends lower settings of 4 to 8 on many of their drives, due tiny (32kB) drive buffers and non-optimized
buffering algorithms. The -i flag can be used to find the maximum setting supported by an installed drive (look for MaxMultSect in the output). Some
drives claim to support multiple mode, but lose data at some settings. Under rare circumstances, such failures can result in massive filesystem corruption.
获取/设置驱动器上多个扇区I/O的扇区计数。设置为0将禁用此功能。多扇区模式(亦称为IDE块模式)是大多数现代IDE硬盘的一个特点,允许每个I/O中断传输多个扇区,
而不是通常的每个中断一个扇区。启用此功能后,通常会将磁盘I/O的操作系统开销减少30-50%。在许多系统上,它还提供从5%到50%的任何地方的数据吞吐量。但是,
一些驱动器(最显著的是WD Caviar系列)在启用多模式的情况下似乎运行较慢。您的里程可能会有所不同。大多数驱动器支持2、4、8或16(扇区)的最小设置。根据驱动器的不同,
也可以进行更大的设置。在许多系统中,16或32的设置似乎是最佳的。Western Digital建议在许多驱动器上设置4到8,因为驱动器缓冲区很小(32kb),缓冲算法不优化。
-i标志可用于查找已安装驱动器支持的最大设置(在输出中查找maxmultesct)。有些驱动器声称支持多种模式,但在某些设置下会丢失数据。在极少数情况下,
这种故障会导致大量文件系统损坏。
of most modern IDE hard drives, permitting the transfer of multiple sectors per I/O interrupt, rather than the usual one sector per interrupt. When this
feature is enabled, it typically reduces operating system overhead for disk I/O by 30-50%. On many systems, it also provides increased data throughput of
anywhere from 5% to 50%. Some drives, however (most notably the WD Caviar series), seem to run slower with multiple mode enabled. Your mileage may vary.
Most drives support the minimum settings of 2, 4, 8, or 16 (sectors). Larger settings may also be possible, depending on the drive. A setting of 16 or 32
seems optimal on many systems. Western Digital recommends lower settings of 4 to 8 on many of their drives, due tiny (32kB) drive buffers and non-optimized
buffering algorithms. The -i flag can be used to find the maximum setting supported by an installed drive (look for MaxMultSect in the output). Some
drives claim to support multiple mode, but lose data at some settings. Under rare circumstances, such failures can result in massive filesystem corruption.
获取/设置驱动器上多个扇区I/O的扇区计数。设置为0将禁用此功能。多扇区模式(亦称为IDE块模式)是大多数现代IDE硬盘的一个特点,允许每个I/O中断传输多个扇区,
而不是通常的每个中断一个扇区。启用此功能后,通常会将磁盘I/O的操作系统开销减少30-50%。在许多系统上,它还提供从5%到50%的任何地方的数据吞吐量。但是,
一些驱动器(最显著的是WD Caviar系列)在启用多模式的情况下似乎运行较慢。您的里程可能会有所不同。大多数驱动器支持2、4、8或16(扇区)的最小设置。根据驱动器的不同,
也可以进行更大的设置。在许多系统中,16或32的设置似乎是最佳的。Western Digital建议在许多驱动器上设置4到8,因为驱动器缓冲区很小(32kb),缓冲算法不优化。
-i标志可用于查找已安装驱动器支持的最大设置(在输出中查找maxmultesct)。有些驱动器声称支持多种模式,但在某些设置下会丢失数据。在极少数情况下,
这种故障会导致大量文件系统损坏。
-M Get/set Automatic Acoustic Management (AAM) setting. Most modern harddisk drives have the ability to speed down the head movements to reduce their noise
output. The possible values are between 0 and 254. 128 is the most quiet (and therefore slowest) setting and 254 the fastest (and loudest). Some drives
have only two levels (quiet / fast), while others may have different levels between 128 and 254. At the moment, most drives only support 3 options, off,
quiet, and fast. These have been assigned the values 0, 128, and 254 at present, respectively, but integer space has been incorporated for future expan-
sion, should this change.
获取/设置自动声学管理(AAM)设置。大多数现代硬盘驱动器都有能力降低磁头的移动速度,以降低其噪声输出。可能的值介于0和254之间。128是最安静(也是最慢)的设置,
254是最快(也是最响亮)的设置。有些驱动器只有两个级别(安静/快速),而其他驱动器的级别可能在128和254之间。目前,大多数驱动器只支持3个选项,关闭,安静和快速。
目前已分别为这些值分配了0、128和254,但如果发生这种变化,整数空间已被纳入未来的扩展中。
output. The possible values are between 0 and 254. 128 is the most quiet (and therefore slowest) setting and 254 the fastest (and loudest). Some drives
have only two levels (quiet / fast), while others may have different levels between 128 and 254. At the moment, most drives only support 3 options, off,
quiet, and fast. These have been assigned the values 0, 128, and 254 at present, respectively, but integer space has been incorporated for future expan-
sion, should this change.
获取/设置自动声学管理(AAM)设置。大多数现代硬盘驱动器都有能力降低磁头的移动速度,以降低其噪声输出。可能的值介于0和254之间。128是最安静(也是最慢)的设置,
254是最快(也是最响亮)的设置。有些驱动器只有两个级别(安静/快速),而其他驱动器的级别可能在128和254之间。目前,大多数驱动器只支持3个选项,关闭,安静和快速。
目前已分别为这些值分配了0、128和254,但如果发生这种变化,整数空间已被纳入未来的扩展中。
-n Get or set the "ignore write errors" flag in the driver. Do NOT play with this without grokking the driver source code first.
获取或设置驱动程序中的“忽略写入错误”标志。不要在没有先搜索驱动程序源代码的情况下玩这个游戏。
获取或设置驱动程序中的“忽略写入错误”标志。不要在没有先搜索驱动程序源代码的情况下玩这个游戏。
-p Attempt to reprogram the IDE interface chipset for the specified PIO mode, or attempt to auto-tune for the "best" PIO mode supported by the drive. This
feature is supported in the kernel for only a few "known" chipsets, and even then the support is iffy at best. Some IDE chipsets are unable to alter the
PIO mode for a single drive, in which case this flag may cause the PIO mode for both drives to be set. Many IDE chipsets support either fewer or more than
the standard six (0 to 5) PIO modes, so the exact speed setting that is actually implemented will vary by chipset/driver sophistication. Use with extreme
caution! This feature includes zero protection for the unwary, and an unsuccessful outcome may result in severe filesystem corruption!
尝试为指定的PIO模式重新编程IDE接口芯片组,或尝试自动调优驱动器支持的“最佳”PIO模式。在内核中,只有少数“已知”芯片组支持这个特性,
即使这样,这种支持也充其量是不可靠的。某些IDE芯片组无法更改单个驱动器的PIO模式,在这种情况下,此标志可能会导致设置两个驱动器的PIO模式。
许多IDE芯片组支持少于或超过标准的六(0到5)个PIO模式,因此实际实现的确切速度设置将因芯片组/驱动程序的复杂性而有所不同。小心使用!
此功能包括对不小心的人的零保护,失败的结果可能导致严重的文件系统损坏!
feature is supported in the kernel for only a few "known" chipsets, and even then the support is iffy at best. Some IDE chipsets are unable to alter the
PIO mode for a single drive, in which case this flag may cause the PIO mode for both drives to be set. Many IDE chipsets support either fewer or more than
the standard six (0 to 5) PIO modes, so the exact speed setting that is actually implemented will vary by chipset/driver sophistication. Use with extreme
caution! This feature includes zero protection for the unwary, and an unsuccessful outcome may result in severe filesystem corruption!
尝试为指定的PIO模式重新编程IDE接口芯片组,或尝试自动调优驱动器支持的“最佳”PIO模式。在内核中,只有少数“已知”芯片组支持这个特性,
即使这样,这种支持也充其量是不可靠的。某些IDE芯片组无法更改单个驱动器的PIO模式,在这种情况下,此标志可能会导致设置两个驱动器的PIO模式。
许多IDE芯片组支持少于或超过标准的六(0到5)个PIO模式,因此实际实现的确切速度设置将因芯片组/驱动程序的复杂性而有所不同。小心使用!
此功能包括对不小心的人的零保护,失败的结果可能导致严重的文件系统损坏!
-P Set the maximum sector count for the drive麓s internal prefetch mechanism. Not all drives support this feature.
设置驱动器的内部预取机制的最大扇区计数。并非所有驱动器都支持此功能。
设置驱动器的内部预取机制的最大扇区计数。并非所有驱动器都支持此功能。
-q Handle the next flag quietly, suppressing normal output. This is useful for reducing screen clutter when running from system startup scripts. Not applica-
ble to the -i or -v or -t or -T flags.
安静地处理下一个标志,抑制正常输出。这对于减少从系统启动脚本运行时的屏幕混乱非常有用。不适用于-i或-v或-t或-t标志。
ble to the -i or -v or -t or -T flags.
安静地处理下一个标志,抑制正常输出。这对于减少从系统启动脚本运行时的屏幕混乱非常有用。不适用于-i或-v或-t或-t标志。
-Q Set tagged queue depth (1 or greater), or turn tagged queuing off (0). This only works with the newer 2.5.xx (or later) kernels, and only with the few
drives that currently support it.
设置标记队列深度(1或更大),或关闭标记队列(0)。这仅适用于较新的2.5.xx(或更高版本)内核,并且仅适用于当前支持它的少数驱动器。
drives that currently support it.
设置标记队列深度(1或更大),或关闭标记队列(0)。这仅适用于较新的2.5.xx(或更高版本)内核,并且仅适用于当前支持它的少数驱动器。
-r Get/set read-only flag for the device. When set, Linux disallows write operations on the device.
获取/设置设备的只读标志。设置后,Linux不允许在设备上执行写操作。
获取/设置设备的只读标志。设置后,Linux不允许在设备上执行写操作。
-R Register an IDE interface. Dangerous. See the -U option for more information.
注册一个IDE接口。危险的。有关更多信息,请参见-u选项。
注册一个IDE接口。危险的。有关更多信息,请参见-u选项。
-S Set the standby (spindown) timeout for the drive. This value is used by the drive to determine how long to wait (with no disk activity) before turning off
the spindle motor to save power. Under such circumstances, the drive may take as long as 30 seconds to respond to a subsequent disk access, though most
drives are much quicker. The encoding of the timeout value is somewhat peculiar. A value of zero means "timeouts are disabled": the device will not auto-
matically enter standby mode. Values from 1 to 240 specify multiples of 5 seconds, yielding timeouts from 5 seconds to 20 minutes. Values from 241 to 251
specify from 1 to 11 units of 30 minutes, yielding timeouts from 30 minutes to 5.5 hours. A value of 252 signifies a timeout of 21 minutes. A value of 253
sets a vendor-defined timeout period between 8 and 12 hours, and the value 254 is reserved. 255 is interpreted as 21 minutes plus 15 seconds. Note that
some older drives may have very different interpretations of these values.
设置驱动器的待机(降速)超时。驱动器使用该值来确定关闭主轴电机以节省电源之前要等待多长时间(没有磁盘活动)。
在这种情况下,驱动器可能需要长达30秒的时间来响应后续的磁盘访问,尽管大多数驱动器速度更快。超时值的编码有些特殊。
零值表示“超时被禁用”:设备不会自动进入待机模式。从1到240的值指定5秒的倍数,从而产生从5秒到20分钟的超时。
从241到251的值指定从1到11个30分钟的单位,产生从30分钟到5.5小时的超时。值252表示超时21分钟。
值253将供应商定义的超时时间设置为8到12小时,并保留值254。255被解释为21分钟加15秒。
请注意,一些旧驱动器对这些值的解释可能非常不同。
the spindle motor to save power. Under such circumstances, the drive may take as long as 30 seconds to respond to a subsequent disk access, though most
drives are much quicker. The encoding of the timeout value is somewhat peculiar. A value of zero means "timeouts are disabled": the device will not auto-
matically enter standby mode. Values from 1 to 240 specify multiples of 5 seconds, yielding timeouts from 5 seconds to 20 minutes. Values from 241 to 251
specify from 1 to 11 units of 30 minutes, yielding timeouts from 30 minutes to 5.5 hours. A value of 252 signifies a timeout of 21 minutes. A value of 253
sets a vendor-defined timeout period between 8 and 12 hours, and the value 254 is reserved. 255 is interpreted as 21 minutes plus 15 seconds. Note that
some older drives may have very different interpretations of these values.
设置驱动器的待机(降速)超时。驱动器使用该值来确定关闭主轴电机以节省电源之前要等待多长时间(没有磁盘活动)。
在这种情况下,驱动器可能需要长达30秒的时间来响应后续的磁盘访问,尽管大多数驱动器速度更快。超时值的编码有些特殊。
零值表示“超时被禁用”:设备不会自动进入待机模式。从1到240的值指定5秒的倍数,从而产生从5秒到20分钟的超时。
从241到251的值指定从1到11个30分钟的单位,产生从30分钟到5.5小时的超时。值252表示超时21分钟。
值253将供应商定义的超时时间设置为8到12小时,并保留值254。255被解释为21分钟加15秒。
请注意,一些旧驱动器对这些值的解释可能非常不同。
-T Perform timings of cache reads for benchmark and comparison purposes. For meaningful results, this operation should be repeated 2-3 times on an otherwise
inactive system (no other active processes) with at least a couple of megabytes of free memory. This displays the speed of reading directly from the Linux
buffer cache without disk access. This measurement is essentially an indication of the throughput of the processor, cache, and memory of the system under
test. If the -t flag is also specified, then a correction factor based on the outcome of -T will be incorporated into the result reported for the -t opera-
tion.
为基准和比较目的执行缓存读取的计时。为了得到有意义的结果,这个操作应该在一个非活动系统(没有其他活动进程)上重复2-3次,至少有几兆字节的可用内存。
这将显示在没有磁盘访问的情况下直接从Linux缓冲区缓存读取的速度。这个度量基本上是被测系统的处理器、缓存和内存吞吐量的指示。如果还指定了-t标志,
则基于-t结果的修正系数将被纳入-t操作报告的结果中。
inactive system (no other active processes) with at least a couple of megabytes of free memory. This displays the speed of reading directly from the Linux
buffer cache without disk access. This measurement is essentially an indication of the throughput of the processor, cache, and memory of the system under
test. If the -t flag is also specified, then a correction factor based on the outcome of -T will be incorporated into the result reported for the -t opera-
tion.
为基准和比较目的执行缓存读取的计时。为了得到有意义的结果,这个操作应该在一个非活动系统(没有其他活动进程)上重复2-3次,至少有几兆字节的可用内存。
这将显示在没有磁盘访问的情况下直接从Linux缓冲区缓存读取的速度。这个度量基本上是被测系统的处理器、缓存和内存吞吐量的指示。如果还指定了-t标志,
则基于-t结果的修正系数将被纳入-t操作报告的结果中。
-t Perform timings of device reads for benchmark and comparison purposes. For meaningful results, this operation should be repeated 2-3 times on an otherwise
inactive system (no other active processes) with at least a couple of megabytes of free memory. This displays the speed of reading through the buffer cache
to the disk without any prior caching of data. This measurement is an indication of how fast the drive can sustain sequential data reads under Linux, with-
out any filesystem overhead. To ensure accurate measurements, the buffer cache is flushed during the processing of -t using the BLKFLSBUF ioctl. If the -T
flag is also specified, then a correction factor based on the outcome of -T will be incorporated into the result reported for the -t operation.
执行设备读取的计时,以便进行基准和比较。为了得到有意义的结果,这个操作应该在一个非活动系统(没有其他活动进程)上重复2-3次,至少有几兆字节的可用内存。
这将显示在不缓存数据的情况下通过缓冲区缓存读取磁盘的速度。这个度量表明驱动器在Linux下能够以多快的速度保持连续的数据读取,而不需要任何文件系统开销。
为了确保精确的测量,在处理-t期间使用blkflsbuf ioctl刷新缓冲区缓存。如果还指定了-t标志,则基于-t结果的修正系数将被纳入-t操作报告的结果中。
inactive system (no other active processes) with at least a couple of megabytes of free memory. This displays the speed of reading through the buffer cache
to the disk without any prior caching of data. This measurement is an indication of how fast the drive can sustain sequential data reads under Linux, with-
out any filesystem overhead. To ensure accurate measurements, the buffer cache is flushed during the processing of -t using the BLKFLSBUF ioctl. If the -T
flag is also specified, then a correction factor based on the outcome of -T will be incorporated into the result reported for the -t operation.
执行设备读取的计时,以便进行基准和比较。为了得到有意义的结果,这个操作应该在一个非活动系统(没有其他活动进程)上重复2-3次,至少有几兆字节的可用内存。
这将显示在不缓存数据的情况下通过缓冲区缓存读取磁盘的速度。这个度量表明驱动器在Linux下能够以多快的速度保持连续的数据读取,而不需要任何文件系统开销。
为了确保精确的测量,在处理-t期间使用blkflsbuf ioctl刷新缓冲区缓存。如果还指定了-t标志,则基于-t结果的修正系数将被纳入-t操作报告的结果中。
-u Get/set interrupt-unmask flag for the drive. A setting of 1 permits the driver to unmask other interrupts during processing of a disk interrupt, which
greatly improves Linux麓s responsiveness and eliminates "serial port overrun" errors. Use this feature with caution: some drive/controller combinations do
not tolerate the increased I/O latencies possible when this feature is enabled, resulting in massive filesystem corruption. In particular, CMD-640B and
RZ1000 (E)IDE interfaces can be unreliable (due to a hardware flaw) when this option is used with kernel versions earlier than 2.0.13. Disabling the IDE
prefetch feature of these interfaces (usually a BIOS/CMOS setting) provides a safe fix for the problem for use with earlier kernels.
获取/设置驱动器的中断取消掩码标志。设置为1允许驱动程序在处理磁盘中断期间取消对其他中断的屏蔽,这大大提高了Linux的响应能力并消除了“串行端口溢出”错误。
小心使用此功能:某些驱动器/控制器组合不允许启用此功能时可能增加的I/O延迟,从而导致大量文件系统损坏。特别是,当此选项与早于2.0.13的内核版本一起使用时,
cmd-640b和rz1000(e)IDE接口可能不可靠(由于硬件缺陷)。禁用这些接口的IDE预取功能(通常是BIOS/CMOS设置)可以安全地修复早期内核使用的问题。
greatly improves Linux麓s responsiveness and eliminates "serial port overrun" errors. Use this feature with caution: some drive/controller combinations do
not tolerate the increased I/O latencies possible when this feature is enabled, resulting in massive filesystem corruption. In particular, CMD-640B and
RZ1000 (E)IDE interfaces can be unreliable (due to a hardware flaw) when this option is used with kernel versions earlier than 2.0.13. Disabling the IDE
prefetch feature of these interfaces (usually a BIOS/CMOS setting) provides a safe fix for the problem for use with earlier kernels.
获取/设置驱动器的中断取消掩码标志。设置为1允许驱动程序在处理磁盘中断期间取消对其他中断的屏蔽,这大大提高了Linux的响应能力并消除了“串行端口溢出”错误。
小心使用此功能:某些驱动器/控制器组合不允许启用此功能时可能增加的I/O延迟,从而导致大量文件系统损坏。特别是,当此选项与早于2.0.13的内核版本一起使用时,
cmd-640b和rz1000(e)IDE接口可能不可靠(由于硬件缺陷)。禁用这些接口的IDE预取功能(通常是BIOS/CMOS设置)可以安全地修复早期内核使用的问题。
-U Un-register an IDE interface. Dangerous. The companion for the -R option. Intended for use with hardware made specifically for hot-swapping (very rare!).
Use with knowledge and extreme caution as this can easily hang or damage your system. The hdparm source distribution includes a 麓contrib麓 directory with
some user-donated scripts for hot-swapping on the UltraBay of a ThinkPad 600E. Use at your own risk.
取消注册一个IDE接口。危险的。-r选项的伴侣。用于专门为热插拔而制造的硬件(非常罕见!)。使用时要非常小心,因为这样很容易挂起或损坏系统。
hdparm源发行版包括一个麓contrib麓目录,其中包含一些用户捐赠的脚本,用于在ThinkPad600e的超机架上进行热交换。请自行承担风险。
Use with knowledge and extreme caution as this can easily hang or damage your system. The hdparm source distribution includes a 麓contrib麓 directory with
some user-donated scripts for hot-swapping on the UltraBay of a ThinkPad 600E. Use at your own risk.
取消注册一个IDE接口。危险的。-r选项的伴侣。用于专门为热插拔而制造的硬件(非常罕见!)。使用时要非常小心,因为这样很容易挂起或损坏系统。
hdparm源发行版包括一个麓contrib麓目录,其中包含一些用户捐赠的脚本,用于在ThinkPad600e的超机架上进行热交换。请自行承担风险。
-v Display all settings, except -i (same as -acdgkmnru for IDE, -gr for SCSI or -adgr for XT). This is also the default behaviour when no flags are specified.
显示除-i以外的所有设置(与-acdgkmnru用于IDE、-gr用于SCSI或-adgr用于XT相同)。这也是未指定标志时的默认行为。
显示除-i以外的所有设置(与-acdgkmnru用于IDE、-gr用于SCSI或-adgr用于XT相同)。这也是未指定标志时的默认行为。
-w Perform a device reset (DANGEROUS). Do NOT use this option. It exists for unlikely situations where a reboot might otherwise be required to get a confused
drive back into a useable state.
执行设备重置(危险)。不要使用此选项。它存在于不太可能的情况下,否则可能需要重新启动才能使混乱的驱动器恢复可用状态。
drive back into a useable state.
执行设备重置(危险)。不要使用此选项。它存在于不太可能的情况下,否则可能需要重新启动才能使混乱的驱动器恢复可用状态。
-W Disable/enable the IDE drive麓s write-caching feature (default state is undeterminable; manufacturer/model specific).
禁用/启用IDE驱动器的写缓存功能(默认状态不可确定;特定于制造商/型号)。
禁用/启用IDE驱动器的写缓存功能(默认状态不可确定;特定于制造商/型号)。
-x Tristate device for hotswap (DANGEROUS).
用于热交换的三态设备(危险)。
用于热交换的三态设备(危险)。
-X Set the IDE transfer mode for newer (E)IDE/ATA drives. This is typically used in combination with -d1 when enabling DMA to/from a drive on a supported
interface chipset, where -X mdma2 is used to select multiword DMA mode2 transfers and -X sdma1 is used to select simple mode 1 DMA transfers. With systems
which support UltraDMA burst timings, -X udma2 is used to select UltraDMA mode2 transfers (you麓ll need to prepare the chipset for UltraDMA beforehand).
Apart from that, use of this flag is seldom necessary since most/all modern IDE drives default to their fastest PIO transfer mode at power-on. Fiddling
with this can be both needless and risky. On drives which support alternate transfer modes, -X can be used to switch the mode of the drive only. Prior to
changing the transfer mode, the IDE interface should be jumpered or programmed (see -p flag) for the new mode setting to prevent loss and/or corruption of
data. Use this with extreme caution! For the PIO (Programmed Input/Output) transfer modes used by Linux, this value is simply the desired PIO mode number
plus 8. Thus, a value of 09 sets PIO mode1, 10 enables PIO mode2, and 11 selects PIO mode3. Setting 00 restores the drive麓s "default" PIO mode, and 01
disables IORDY. For multiword DMA, the value used is the desired DMA mode number plus 32. for UltraDMA, the value is the desired UltraDMA mode number plus
64.
为较新的(E)IDE/ATA驱动器设置IDE传输模式。这通常与-d1结合使用,当在支持的接口芯片组上的驱动器上启用DMA时,其中-x mdma2用于选择多字DMA模式2传输,
-x sdma1用于选择简单模式1 DMA传输。对于支持超DMA突发计时的系统,-x udma2用于选择超DMA模式2传输(您需要预先为超DMA准备芯片组)。
除此之外,很少需要使用此标志,因为大多数/所有现代IDE驱动器在开机时都默认为最快的PIO传输模式。摆弄这件事既不必要又危险。在支持交替传输模式的驱动器上,
-x只能用于切换驱动器的模式。在更改传输模式之前,应跳线或为新模式设置编程IDE接口(参见-p标志),以防止数据丢失和/或损坏。小心使用!
对于Linux使用的PIO(编程输入/输出)传输模式,该值只是所需的PIO模式数加上8。因此,值09设置PIO模式1,10启用PIO模式2,11选择PIO模式3。
设置00恢复驱动器的“默认”PIO模式,01禁用IORDY。对于多字DMA,使用的值是所需的DMA模式号加上32。对于ultradma,该值是所需的ultradma模式号加上64。
interface chipset, where -X mdma2 is used to select multiword DMA mode2 transfers and -X sdma1 is used to select simple mode 1 DMA transfers. With systems
which support UltraDMA burst timings, -X udma2 is used to select UltraDMA mode2 transfers (you麓ll need to prepare the chipset for UltraDMA beforehand).
Apart from that, use of this flag is seldom necessary since most/all modern IDE drives default to their fastest PIO transfer mode at power-on. Fiddling
with this can be both needless and risky. On drives which support alternate transfer modes, -X can be used to switch the mode of the drive only. Prior to
changing the transfer mode, the IDE interface should be jumpered or programmed (see -p flag) for the new mode setting to prevent loss and/or corruption of
data. Use this with extreme caution! For the PIO (Programmed Input/Output) transfer modes used by Linux, this value is simply the desired PIO mode number
plus 8. Thus, a value of 09 sets PIO mode1, 10 enables PIO mode2, and 11 selects PIO mode3. Setting 00 restores the drive麓s "default" PIO mode, and 01
disables IORDY. For multiword DMA, the value used is the desired DMA mode number plus 32. for UltraDMA, the value is the desired UltraDMA mode number plus
64.
为较新的(E)IDE/ATA驱动器设置IDE传输模式。这通常与-d1结合使用,当在支持的接口芯片组上的驱动器上启用DMA时,其中-x mdma2用于选择多字DMA模式2传输,
-x sdma1用于选择简单模式1 DMA传输。对于支持超DMA突发计时的系统,-x udma2用于选择超DMA模式2传输(您需要预先为超DMA准备芯片组)。
除此之外,很少需要使用此标志,因为大多数/所有现代IDE驱动器在开机时都默认为最快的PIO传输模式。摆弄这件事既不必要又危险。在支持交替传输模式的驱动器上,
-x只能用于切换驱动器的模式。在更改传输模式之前,应跳线或为新模式设置编程IDE接口(参见-p标志),以防止数据丢失和/或损坏。小心使用!
对于Linux使用的PIO(编程输入/输出)传输模式,该值只是所需的PIO模式数加上8。因此,值09设置PIO模式1,10启用PIO模式2,11选择PIO模式3。
设置00恢复驱动器的“默认”PIO模式,01禁用IORDY。对于多字DMA,使用的值是所需的DMA模式号加上32。对于ultradma,该值是所需的ultradma模式号加上64。
-y Force an IDE drive to immediately enter the low power consumption standby mode, usually causing it to spin down. The current power mode status can be
checked using the -C flag.
强制IDE驱动器立即进入低功耗待机模式,通常会导致其降速。可以使用-c标志检查当前电源模式状态。
-Y Force an IDE drive to immediately enter the lowest power consumption sleep mode, causing it to shut down completely. A hard or soft reset is required
before the drive can be accessed again (the Linux IDE driver will automatically handle issuing a reset if/when needed). The current power mode status can
be checked using the -C flag.
强制IDE驱动器立即进入最低功耗休眠模式,导致其完全关闭。再次访问驱动器之前需要进行硬重置或软重置(如果需要,Linux IDE驱动程序将自动处理发出重置)。
可以使用-c标志检查当前电源模式状态。
checked using the -C flag.
强制IDE驱动器立即进入低功耗待机模式,通常会导致其降速。可以使用-c标志检查当前电源模式状态。
-Y Force an IDE drive to immediately enter the lowest power consumption sleep mode, causing it to shut down completely. A hard or soft reset is required
before the drive can be accessed again (the Linux IDE driver will automatically handle issuing a reset if/when needed). The current power mode status can
be checked using the -C flag.
强制IDE驱动器立即进入最低功耗休眠模式,导致其完全关闭。再次访问驱动器之前需要进行硬重置或软重置(如果需要,Linux IDE驱动程序将自动处理发出重置)。
可以使用-c标志检查当前电源模式状态。
-z Force a kernel re-read of the partition table of the specified device(s).
强制内核重新读取指定设备的分区表。
强制内核重新读取指定设备的分区表。
-Z Disable the automatic power-saving function of certain Seagate drives (ST3xxx models?), to prevent them from idling/spinning-down at inconvenient times.
禁用某些Seagate驱动器(ST3xx机型?)的自动节电功能。防止它们在不方便的时候空转/空转。
禁用某些Seagate驱动器(ST3xx机型?)的自动节电功能。防止它们在不方便的时候空转/空转。
ATA Security Feature Set/ATA安全功能集
These switches are DANGEROUS to experiment with, and might not work with every kernel. USE AT YOUR OWN RISK.
这些开关在试验中是危险的,可能无法与每个内核一起工作。自担风险使用。
这些开关在试验中是危险的,可能无法与每个内核一起工作。自担风险使用。
--security-help
Display terse usage info for all of the --security-* flags.
显示所有--security-*标志的简要用法信息。
Display terse usage info for all of the --security-* flags.
显示所有--security-*标志的简要用法信息。
--security-freeze
Freeze the drive麓s security settings. The drive does not accept any security commands until next power-on reset. Use this function in combination with
--security-unlock to protect drive from any attempt to set a new password. Can be used standalone, too.
冻结驱动器的安全设置。在下次开机重置之前,驱动器不接受任何安全命令。结合使用这个函数--security unlock来保护驱动器不受任何设置新密码的尝试的影响。也可以单独使用。
Freeze the drive麓s security settings. The drive does not accept any security commands until next power-on reset. Use this function in combination with
--security-unlock to protect drive from any attempt to set a new password. Can be used standalone, too.
冻结驱动器的安全设置。在下次开机重置之前,驱动器不接受任何安全命令。结合使用这个函数--security unlock来保护驱动器不受任何设置新密码的尝试的影响。也可以单独使用。
--security-unlock PWD
Unlock the drive, using password PWD. Password is given as an ASCII string and is padded with NULs to reach 32 bytes. The applicable drive password is
selected with the --user-master switch. THIS FEATURE IS EXPERIMENTAL AND NOT WELL TESTED. USE AT YOUR OWN RISK.
使用密码pwd解锁驱动器。密码以ASCII字符串的形式给出,并用nuls填充以达到32个字节。使用--user master开关选择适用的驱动器密码。
这个特性是实验性的,没有经过很好的测试。自担风险使用。
Unlock the drive, using password PWD. Password is given as an ASCII string and is padded with NULs to reach 32 bytes. The applicable drive password is
selected with the --user-master switch. THIS FEATURE IS EXPERIMENTAL AND NOT WELL TESTED. USE AT YOUR OWN RISK.
使用密码pwd解锁驱动器。密码以ASCII字符串的形式给出,并用nuls填充以达到32个字节。使用--user master开关选择适用的驱动器密码。
这个特性是实验性的,没有经过很好的测试。自担风险使用。
--security-set-pass PWD
Lock the drive, using password PWD (Set Password) (DANGEROUS). Password is given as an ASCII string and is padded with NULs to reach 32 bytes. The appli-
cable drive password is selected with the --user-master switch and the applicable security mode with the --security-mode switch. THIS FEATURE IS EXPERIMEN-
TAL AND NOT WELL TESTED. USE AT YOUR OWN RISK.
锁定驱动器,使用密码pwd(设置密码)(危险)。密码以ASCII字符串的形式给出,并用nuls填充以达到32个字节。
使用--user主开关选择适用的驱动器密码,使用--security模式开关选择适用的安全模式。
这个特性是实验性的,没有经过很好的测试。自担风险使用。
Lock the drive, using password PWD (Set Password) (DANGEROUS). Password is given as an ASCII string and is padded with NULs to reach 32 bytes. The appli-
cable drive password is selected with the --user-master switch and the applicable security mode with the --security-mode switch. THIS FEATURE IS EXPERIMEN-
TAL AND NOT WELL TESTED. USE AT YOUR OWN RISK.
锁定驱动器,使用密码pwd(设置密码)(危险)。密码以ASCII字符串的形式给出,并用nuls填充以达到32个字节。
使用--user主开关选择适用的驱动器密码,使用--security模式开关选择适用的安全模式。
这个特性是实验性的,没有经过很好的测试。自担风险使用。
--security-disable PWD
Disable drive locking, using password PWD. Password is given as an ASCII string and is padded with NULs to reach 32 bytes. The applicable drive password
is selected with the --user-master switch. THIS FEATURE IS EXPERIMENTAL AND NOT WELL TESTED. USE AT YOUR OWN RISK.
使用密码pwd禁用驱动器锁定。密码以ASCII字符串的形式给出,并用nuls填充以达到32个字节。使用--user master开关选择适用的驱动器密码。
这个特性是实验性的,没有经过很好的测试。自担风险使用。
Disable drive locking, using password PWD. Password is given as an ASCII string and is padded with NULs to reach 32 bytes. The applicable drive password
is selected with the --user-master switch. THIS FEATURE IS EXPERIMENTAL AND NOT WELL TESTED. USE AT YOUR OWN RISK.
使用密码pwd禁用驱动器锁定。密码以ASCII字符串的形式给出,并用nuls填充以达到32个字节。使用--user master开关选择适用的驱动器密码。
这个特性是实验性的,没有经过很好的测试。自担风险使用。
--security-erase PWD
Erase (locked) drive, using password PWD (DANGEROUS). Password is given as an ASCII string and is padded with NULs to reach 32 bytes. The applicable drive
password is selected with the --user-master switch. THIS FEATURE IS EXPERIMENTAL AND NOT WELL TESTED. USE AT YOUR OWN RISK.
清除(锁定)驱动器,使用密码pwd(危险)。密码以ASCII字符串的形式给出,并用nuls填充以达到32个字节。使用--user master开关选择适用的驱动器密码。
这个特性是实验性的,没有经过很好的测试。自担风险使用。
Erase (locked) drive, using password PWD (DANGEROUS). Password is given as an ASCII string and is padded with NULs to reach 32 bytes. The applicable drive
password is selected with the --user-master switch. THIS FEATURE IS EXPERIMENTAL AND NOT WELL TESTED. USE AT YOUR OWN RISK.
清除(锁定)驱动器,使用密码pwd(危险)。密码以ASCII字符串的形式给出,并用nuls填充以达到32个字节。使用--user master开关选择适用的驱动器密码。
这个特性是实验性的,没有经过很好的测试。自担风险使用。
--security-erase-enhanced PWD
Enhanced erase (locked) drive, using password PWD (DANGEROUS). Password is given as an ASCII string and is padded with NULs to reach 32 bytes. The appli-
cable drive password is selected with the --user-master switch. THIS FEATURE IS EXPERIMENTAL AND NOT WELL TESTED. USE AT YOUR OWN RISK.
增强擦除(锁定)驱动器,使用密码pwd(危险)。密码以ASCII字符串的形式给出,并用nuls填充以达到32个字节。使用--user master开关选择适用的驱动器密码。
这个特性是实验性的,没有经过很好的测试。自担风险使用。
Enhanced erase (locked) drive, using password PWD (DANGEROUS). Password is given as an ASCII string and is padded with NULs to reach 32 bytes. The appli-
cable drive password is selected with the --user-master switch. THIS FEATURE IS EXPERIMENTAL AND NOT WELL TESTED. USE AT YOUR OWN RISK.
增强擦除(锁定)驱动器,使用密码pwd(危险)。密码以ASCII字符串的形式给出,并用nuls填充以达到32个字节。使用--user master开关选择适用的驱动器密码。
这个特性是实验性的,没有经过很好的测试。自担风险使用。
--user-master USER
Specifies which password (user/master) to select. Defaults to master. Only useful in combination with --security-unlock, --security-set-pass, --security-
disable, --security-erase or --security-erase-enhanced.
指定要选择的密码(用户/主密码)。默认为master。仅与安全解锁、安全设置通过、安全禁用、安全擦除或安全擦除增强结合使用。
u user password
m master password
Specifies which password (user/master) to select. Defaults to master. Only useful in combination with --security-unlock, --security-set-pass, --security-
disable, --security-erase or --security-erase-enhanced.
指定要选择的密码(用户/主密码)。默认为master。仅与安全解锁、安全设置通过、安全禁用、安全擦除或安全擦除增强结合使用。
u user password
m master password
THIS FEATURE IS EXPERIMENTAL AND NOT WELL TESTED. USE AT YOUR OWN RISK.
这个特性是实验性的,没有经过很好的测试。自担风险使用。
这个特性是实验性的,没有经过很好的测试。自担风险使用。
--security-mode MODE
Specifies which security mode (high/maximum) to set. Defaults to high. Only useful in combination with --security-set-pass.
指定要设置的安全模式(高/最大)。默认为高。仅与安全设置传递结合使用。
h high security
m maximum security
Specifies which security mode (high/maximum) to set. Defaults to high. Only useful in combination with --security-set-pass.
指定要设置的安全模式(高/最大)。默认为高。仅与安全设置传递结合使用。
h high security
m maximum security
THIS FEATURE IS EXPERIMENTAL AND NOT WELL TESTED. USE AT YOUR OWN RISK.
这个特性是实验性的,没有经过很好的测试。自担风险使用。
这个特性是实验性的,没有经过很好的测试。自担风险使用。
BUGS/漏洞
As noted above, the -m sectcount and -u 1 options should be used with caution at first, preferably on a read-only filesystem. Most drives work well with these
features, but a few drive/controller combinations are not 100% compatible. Filesystem corruption may result. Backup everything before experimenting!
如前所述,第一种选择应以保证金的形式使用,最好是在阅读文件系统上使用。驱动装置最适合这些特性,但一个Few Drive/Controller组合不完全兼容。
FileSystem corruption may result.实验前准备所有的东西!
As noted above, the -m sectcount and -u 1 options should be used with caution at first, preferably on a read-only filesystem. Most drives work well with these
features, but a few drive/controller combinations are not 100% compatible. Filesystem corruption may result. Backup everything before experimenting!
如前所述,第一种选择应以保证金的形式使用,最好是在阅读文件系统上使用。驱动装置最适合这些特性,但一个Few Drive/Controller组合不完全兼容。
FileSystem corruption may result.实验前准备所有的东西!
Some options (eg. -r for SCSI) may not work with old kernels as necessary ioctl()麓s were not supported.
某些选项(例如用于scsi的-r)可能不适用于旧内核,因为不支持必要的ioctl()麓。
某些选项(例如用于scsi的-r)可能不适用于旧内核,因为不支持必要的ioctl()麓。
Although this utility is intended primarily for use with (E)IDE hard disk devices, several of the options are also valid (and permitted) for use with SCSI hard
disk devices and MFM/RLL hard disks with XT interfaces.
尽管此实用程序主要用于(e)IDE硬盘设备,但其中一些选项也适用于(并且允许)SCSI硬盘设备和带XT接口的MFM/RLL硬盘。
disk devices and MFM/RLL hard disks with XT interfaces.
尽管此实用程序主要用于(e)IDE硬盘设备,但其中一些选项也适用于(并且允许)SCSI硬盘设备和带XT接口的MFM/RLL硬盘。
The Linux kernel up until 2.6.12 (and probably later) doesn麓t handle the security unlock and disable commands gracefully and will segfault and in some cases even
panic. The security commands however might indeed have been executed by the drive. This poor kernel behaviour makes the PIO data security commands rather useless
at the moment.
Linux内核直到2.6.12(可能更高版本)都不能优雅地处理安全解锁和禁用命令,并且会出现故障,在某些情况下甚至会出现恐慌。
但是,安全命令可能确实是由驱动器执行的。这种糟糕的内核行为使得PIO数据安全命令目前相当无用。
panic. The security commands however might indeed have been executed by the drive. This poor kernel behaviour makes the PIO data security commands rather useless
at the moment.
Linux内核直到2.6.12(可能更高版本)都不能优雅地处理安全解锁和禁用命令,并且会出现故障,在某些情况下甚至会出现恐慌。
但是,安全命令可能确实是由驱动器执行的。这种糟糕的内核行为使得PIO数据安全命令目前相当无用。
Note that the "security erase" and "security disable" commands have been implemented as two consecutive PIO data commands and will not succeed on a locked drive
because the second command will not be issued after the segfault. See the code for hints how patch it to work around this problem. Despite the segfault it is
often still possible to run two instances of hdparm consecutively and issue the two necessary commands that way.
请注意,“安全擦除”和“安全禁用”命令已作为两个连续的PIO数据命令实施,并且在锁定的驱动器上不会成功,因为在SEGAULT之后不会发出第二个命令。
有关如何修补它以解决此问题的提示,请参阅代码。尽管存在segfault,但通常仍然可以连续运行两个hdparm实例并以这种方式发出两个必需的命令。
because the second command will not be issued after the segfault. See the code for hints how patch it to work around this problem. Despite the segfault it is
often still possible to run two instances of hdparm consecutively and issue the two necessary commands that way.
请注意,“安全擦除”和“安全禁用”命令已作为两个连续的PIO数据命令实施,并且在锁定的驱动器上不会成功,因为在SEGAULT之后不会发出第二个命令。
有关如何修补它以解决此问题的提示,请参阅代码。尽管存在segfault,但通常仍然可以连续运行两个hdparm实例并以这种方式发出两个必需的命令。
AUTHOR/作者
hdparm has been written by Mark Lord <mlord@pobox.com>, the original primary developer and maintainer of the (E)IDE driver for Linux, with suggestions from many
netfolk.
hdparm是由mark lord<mlord@pobox.com>编写的,他是Linux(e)IDE驱动程序的原始主要开发人员和维护人员,有许多Netfolk的建议。
hdparm has been written by Mark Lord <mlord@pobox.com>, the original primary developer and maintainer of the (E)IDE driver for Linux, with suggestions from many
netfolk.
hdparm是由mark lord<mlord@pobox.com>编写的,他是Linux(e)IDE驱动程序的原始主要开发人员和维护人员,有许多Netfolk的建议。
The disable Seagate auto-powersaving code is courtesy of Tomi Leppikangas(tomilepp@paju.oulu.fi).
禁用希捷自动省电代码由Tomi Leppikangas提供(tomilepp@paju.oulu.fi)。
禁用希捷自动省电代码由Tomi Leppikangas提供(tomilepp@paju.oulu.fi)。
Security freeze command by Benjamin Benz <bbe@heise.de>, 2005.
Benjamin Benz的Security Freeze Command,2005年。
Benjamin Benz的Security Freeze Command,2005年。
PIO data out security commands by Leonard den Ottolander <leonard den ottolander nl>, 2005. Parts by Benjamin Benz <bbe@heise.de> and others.
Pio Data Out Security Commands by Leonard den Ottolander<Leonard den Ottolander NL>,2005.零件由Benjamin Benz<bbe@heise.de>和其他人提供。
Pio Data Out Security Commands by Leonard den Ottolander<Leonard den Ottolander NL>,2005.零件由Benjamin Benz<bbe@heise.de>和其他人提供。
SEE ALSO/参照
http://www.t13.org/ Technical Committee T13 ATA Attachment.
http://www.t13.org/技术委员会t13 ata附件。
http://www.t13.org/ Technical Committee T13 ATA Attachment.
http://www.t13.org/技术委员会t13 ata附件。
http://www.serialata.org/ Serial ATA International Organization.
http://www.serial ata.org/serial ata国际组织。
http://www.serial ata.org/serial ata国际组织。
Version 6.6 March 2006 HDPARM(8)
2006年3月版的6.6 hdparm(8)
2006年3月版的6.6 hdparm(8)