我知道,在旧的ATA标准中有这样的可能性:“READ LONG”命令产生了LBA扇区+ ECC有效载荷。 sg_read_long支持在linux中,但是这个命令已经过时很久了,所以我并不感到惊讶,我的硬盘没有实现它。
root@ubuntu:~# sg_read_long --lba=2118229 /dev/sdc sg_read_long: issue read long (10) to device /dev/sdc xfer_len=520 (0x208), lba=2118229 (0x205255), correct=0 SCSI READ LONG (10) command not supported root@ubuntu:~# sg_read_long -v --16 --lba=2118229 /dev/sdc sg_read_long: issue read long (16) to device /dev/sdc xfer_len=520 (0x208), lba=2118229 (0x205255), correct=0 Read Long (16) cmd: 9e 11 00 00 00 00 00 20 52 55 00 00 02 08 00 00 read long (16): Fixed format, current; Sense key: Illegal Request Additional sense: Invalid field in cdb SCSI READ LONG (16) command, bad field in cdb
这里也是hdparm转储:
root@ubuntu:~# hdparm -I /dev/sdc /dev/sdc: ATA device, with non-removable media Model Number: WDC WD30EZRX-00MMMB0 Serial Number: WD-WCAWZ1777146 Firmware Revision: 80.00A80 Transport: Serial, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0 Standards: Supported: 8 7 6 5 Likely used: 8 Configuration: Logical max current cylinders 16383 16383 heads 16 16 sectors/track 63 63 -- CHS current addressable sectors: 16514064 LBA user addressable sectors: 268435455 LBA48 user addressable sectors: 5860533168 Logical Sector size: 512 bytes Physical Sector size: 4096 bytes Logical Sector-0 offset: 0 bytes device size with M = 1024*1024: 2861588 MBytes device size with M = 1000*1000: 3000592 MBytes (3000 GB) cache/buffer size = unknown Capabilities: LBA, IORDY(can be disabled) Queue depth: 32 Standby timer values: spec'd by Standard, with device specific minimum R/W multiple sector transfer: Max = 16 Current = 0 DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6 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 * Look-ahead * 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 * 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 * 64-bit World wide name * {READ,WRITE}_DMA_EXT_GPL commands * Segmented DOWNLOAD_MICROCODE * Gen1 signaling speed (1.5Gb/s) * Gen2 signaling speed (3.0Gb/s) * Gen3 signaling speed (6.0Gb/s) * Native Command Queueing (NCQ) * Host-initiated interface power management * Phy event counters * NCQ priority information DMA Setup Auto-Activate optimization * Software settings preservation * SMART Command Transport (SCT) feature set * SCT LBA Segment Access (AC2) * SCT Features Control (AC4) * SCT Data Tables (AC5) unknown 206[12] (vendor specific) unknown 206[13] (vendor specific) Security: Master password revision code = 65534 supported not enabled not locked not frozen not expired: security count supported: enhanced erase 508min for SECURITY ERASE UNIT. 508min for ENHANCED SECURITY ERASE UNIT. Logical Unit WWN Device Identifier: 50014ee25bc950c2 NAA : 5 IEEE OUI : 0014ee Unique ID : 25bc950c2 Checksum: correct
我想要读取几个没有ECC的扇区来创build更好的半硬盘转储。
故事的另一部分是ATAPI-8命令集。 它声明了当根据T13/1699-D Revision 6a, Working Draft AT Attachment 8 - ATA/ATAPI Command Set (ATA8-ACS) IDENITFY DEVICE数据字106位12清零时, SCT读/写长命令起作用。 如果设备逻辑扇区长于256字,则该位被设置为1。
OTOH,它只适用于512字节的扇区,所以我不明白ECC / CRC适用于4k扇区是否有效。
简短的回答:没有。
SCT读/写长由T13/e08153r1 ACS-2过时SCT读和写长 。 T13/2015-D Revision 4, Working Draft ATA/ATAPI Command Set - 2 (ACS-2) ,2010年12月7日发布的T13/2015-D Revision 4, Working Draft ATA/ATAPI Command Set - 2 (ACS-2)已经将此命令标记为过时。
T13/e08153r1指出删除读/写长命令的原因:
最近logging技术的变化已经使主机能够实际上强制自己的纠错/检测数据到设备的意思变得毫无意义。
故事结局。
PS SCT LBA Segment Access (AC2)应该是真正的SCT Write Same (AC2) hdparm转储:)