Hello
I got a dying WD HDD but the read speed is very slow (in few hundred bytes/s) which seems to be affected by the WD slow bug.
The PC is running FreeBSD, however I am out of country and do not have physical access to it. So I can only do it via ssh and stick with FreeBSD.
I did some search and it seems I could use the camcontrol to send the ATA command (cmd -a) , by specifing the values of 'command, features, lba_low, lba_mid, lba_high, device, lba_low_exp, lba_mid_exp, lba_high_exp, features_exp, sector_count, sector_count_exp'
https://www.freebsd.org/cgi/man.cgi?query=camcontrol I took a look on the source code on
https://mod2patch.sourceforge.net/and it seems I should send the ata command with the following values to read the current value:
command : B0
features : D5
lba_low : BF
lba_mid : 4F
lba_high : C2
device : A0
lba_low_exp : 00
lba_mid_exp : 00
lba_high_exp : 00
features_exp : 00
sector_count : 01
sector_count_exp : 00
However running it ends in error
#camcontrol cmd ada2 -v -a "B0 D5 BF 4F C2 A0 00 00 00 00 01 00" -d -i 512 - -r -
(pass2:ahcich4:0:0:0): SMART READ LOG. ACB: b0 d5 bf 4f c2 a0 00 00 00 00 01 00
(pass2:ahcich4:0:0:0): CAM status: ATA Status Error
(pass2:ahcich4:0:0:0): ATA status: 51 (DRDY SERV ERR), error: 04 (ABRT )
(pass2:ahcich4:0:0:0): RES: 51 04 b0 4f c2 a0 00 00 00 01 00
I am not sure what is wrong here.
I could still read the smart with smartctl and do some copying (although very slow)
Any help is much appreciated