Eu sei, havia tal possibilidade em padrões antigos da ATA: o comando "READ LONG" produzia o setor do LBA + carga útil de ECC. sg_read_long
suporta in no linux, mas o comando está obsoleto por um longo tempo, então não estou surpreso que meu HDD não o implemente.
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
Aqui está hdparm
dump também:
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
Eu quero ler vários setores sem o ECC para criar um melhor despejo de HDDs mortos pela metade.
Outra parte da história é o conjunto de comandos ATAPI-8. Ele declara o comando Leitura / Escrita SCT Long que funciona quando quando a palavra de dados IDENITFY DEVICE 106 bit 12 é desmarcada para zero de acordo com T13/1699-D Revision 6a, Working Draft AT Attachment 8 - ATA/ATAPI Command Set (ATA8-ACS)
. Este bit é definido como 1 iff setor lógico do dispositivo com mais de 256 palavras .
OTOH, funciona apenas com setores de 512 bytes, então não entendo se funciona quando o ECC / CRC é aplicado a setores de 4k.