[smartmontools-support] Calcuting smartctl output to recovery bad-sector on FreeBSD ZFS

Christian Franke Christian.Franke at t-online.de
Fri Mar 12 10:43:35 CET 2021


Dan Lukes wrote:
> On 11.3.2021 13:44, Budi Janto wrote:
>> Mar 11 18:45:42 BEC-STG-P1 kernel: (ada2:ahcich5:0:0:0): 
>> READ_FPDMA_QUEUED. ACB: 60 20 28 1f 90 40 b8 01 00 00 00 00
>
> FreeBSD uses LSB, thus it needs to be read as 0x01B840901F = 7386206239

There are several possible byte orders for ATA command registers/fields, 
for example:

F0 C0 L2 L1 L0 DV CM                      : ATA 1-5 (IDE, ST506/WD1006)
F0 F1 C0 C1 L2 L5 L1 L4 L0 L3 DV CM       : ATA 6-7 48-bit current/previous
F0 F1 C0 C1 L0 L1 L2 L3 L4 L5 DV CM       : ATA 8+ 48-bit LE
F1 C1 L5 L4 L3 00 00 F0 C0 L2 L1 L0 DV CM : PATA 48-bit previous/current
CM F0 L0 L1 L2 DV L3 L4 L5 F1 C0 C1       : SATA Host to Device Register FIS

(CM=Command, Cn = Count, DV=Device, Fn = Features, Ln=LBA, x0=LSB...)
Variants starting with Fn may be logged in opposite direction with CM first.

Regards,
Christian



More information about the Smartmontools-support mailing list