Linux中如何开启硬盘ATA66模式,我们可以使用hdparm命令来实现:
hdparm - get/set hard disk ">parameters - version v9.16
Usage: hdparm [options] [device] ..
Options:
-a get/set fs readahead
-A get/set the drive look-ahead flag (0/1)
-b get/set bus state (0 == off, 1 == on, 2 == tristate)
-B set Advanced Power Management setting (1-255)
-c get/set IDE 32-bit IO setting
-C check drive power mode status
-d get/set using_dma flag
-D enable/disable drive defect management
-E set cd/dvd drive speed
-f flush buffer cache for device on exit
-F flush drive write cache
-g display drive geometry
-h display terse usage information
-H read temperature from drive (Hitachi only)
-i display drive identification
-I detailed/current information directly from drive
-k get/set keep_settings_over_reset flag (0/1)
-K set drive keep_features_over_reset flag (0/1)
-L set drive doorlock (0/1) (removable harddisks only)
-M get/set acoustic management (0-254, 128: quiet, 254: fast)
-m get/set multiple sector count
-N get/set max visible number of sectors (HPA) (VERY DANGEROUS)
-n get/set ignore-write-errors flag (0/1)
-p set PIO mode on IDE interface chipset (0,1,2,3,4,...)
-P set drive prefetch count
-q change next setting quietly
-Q get/set DMA queue_depth (if supported)
-r get/set device readonly flag (DANGEROUS to set)
-R obsolete
-s set power-up in standby flag (0/1) (DANGEROUS)
-S set standby (spindown) timeout
-t perform device read timings
-T perform cache read timings
-u get/set unmaskirq flag (0/1)
-U obsolete
-v defaults; same as -acdgkmur for IDE drives
-V display program version and exit immediately
-w perform device reset (DANGEROUS)
-W get/set drive write-caching flag (0/1)
-x obsolete
-X set IDE xfer mode (DANGEROUS)
-y put drive in standby mode
-Y put drive to sleep
-Z disable Seagate auto-powersaving mode
-z re-read partition table
--dco-freeze freeze/lock current device configuration until next power cycle
--dco-identify read/dump device configuration identify data
--dco-restore reset device configuration back to factory defaults
--direct use O_DIRECT to bypass page cache for timings
--drq-hsm-error crash system with a "stuck DRQ" error (VERY DANGEROUS)
--fibmap show device extents (and fragmentation) for a file
--fibmap-sector show absolute LBA of a specfic sector of a file
--fwdownload Download firmware file to drive (EXTREMELY DANGEROUS)
--fwdownload-mode3 Download firmware using min-size segments (EXTREMELY DANGEROUS)
--fwdownload-mode3-max Download firmware using max-size segments (EXTREMELY DANGEROUS)
--fwdownload-mode7 Download firmware using a single segment (EXTREMELY DANGEROUS)
--idle-immediate idle drive immediately
--idle-unload idle immediately and unload heads
--Istdin read identify data from stdin as ASCII hex
--Istdout write identify data to stdout as ASCII hex
--make-bad-sector deliberately corrupt a sector directly on the media (VERY DANGEROUS)
--prefer-ata12 use 12-byte (instead of 16-byte) SAT commands when possible
--read-sector read and dump (in hex) a sector directly from the media
--security-help display help for ATA security commands
--trim-sectors tell SSD firmware to discard unneeded data sectors (lba and count)
--verbose display extra diagnostics from some commands
--write-sector repair/overwrite a (possibly bad) sector directly on the media (VERY DANGEROUS)
示例:
[root@localhost /]# /sbin/hdparm -d1 -X68 -c3 -m16 /dev/had