While trying to recover my ST2000DL003
drive I have adapted a BUSE userspace linux block driver
The block driver handles data as addressable blocks. The userspace client allows the addressing for any application - what about receiving blocks from a faulty Seagate drive.How this works:
You can learn some of functioning from source code itself, but main sequence of operation is:
- STUart (userspace driver) inicialize HDD parameters ("/TO1", speed, etc.)
- STUart connects to NBD (network block device) driver in kernel
- When you open /dev/nbdX at some address, the NBD driver creates demand with an offset and a block(s) size.
- STUart compute LBA sector (4k) and number of how many is needed to read
- By "/ARxxxx", the HDD sectors are read
- From a drive buffer, the data are transfered over UART by "/FD" command. As console is in a binary mode the sectors are transfered at full UART speed.
- STUart then parses raw 4k sector data (512B subsector + 2 crc? + 6 thrash? + 512B subsector + 2 crc + 6 thrash ...) into 512B block request
- ... and sends them to the kernel driver and waits on another request
Funny thing about STUart is you can actually mount /dev/nbdX as HDD and copy some data from it (very slowly, but most likely safer than "/Ti
" and/or "/Tm
" commands) and mounting is faster than whole drive imaging (it would take about half a year to download whole 2 TB :-/ in my case the drive was partitioned to 4 partitions and only 2 of them are filled with data - around 26%).
Due to a block based adressing you can just skip any bad sectors and continue to copy the data (although you must do it manually as STUart will crash probably). Download speed is pretty slow - about 34kBps of the filesystem with 460kbps UART. My drive supports up to 1.25 Mbps so maximum speed is probably nearly 100kBps
. Up to this date it have worked with only one data retrieval failure (probably UART buffer overrun) and transfer run for several hours.
I'm pretty sure that there are similar functionalities in commercial software, but I'm offering you a GPLed source code (as is). If someone wants to maintain this software, I'm OK with it (after recovering all my files I hope I will never need to use it again
If you find my driver useful, you can help me with my drive http://forum.hddguru.com/viewtopic.php?f=1&t=34001
or you can send me some bitcoins