I started the imaging of an AF/512e HDD by first running a following command:
ddrescue -n /dev/sdb2 drive_c.img mapfile.log
Upon its completion I made a backup of mapfile.log and decided to run the splitting phase with direct disk access using the drive's physical sector size of 4K:
ddrescue -d -b4096 -r3 /dev/sdb2 drive_c.img mapfile.log
Had I chosen a 512 bytes sector-size would I have scraped more from the bad sectors?
As I write this, the splitting stage has finished and the bad sectors are being retried for the second time. Naturally, almost all bad blocks in the mapfile are of n×4K size. Will I be able to scrape more off of them if I run the same command but with a 512 b sector?
Thoughts and Confusion
First of all, I am not even sure if the use direct disk access was appropriate.
The info file for ddrescue calls for direct disk access switch when
the positions and sizes in the log file are ALWAYS multiples of the sector size
which would mean that the
kernel is caching the disc accesses and grouping them.
So if my kernel had been "grouping" the requests, the smallest block in the mapfile should have been 8K or 16K. In my case, however, the mapfile contained plenty of 512 bytes blocks both unreadable and rescued after the first run had completed.
During the second run the majority of the 512 b blocks were merged into 4K blocks. For example, a 512 b bad sector which was adjacent to the non-split block before the splitting phase got merged together with an adjacent bad sector. This seems fine to me. Probably, at the trimming phase a head on the hard drive wasn't able to read a 4K sector so it returned a 512 b bad sector to ddrescue. The trimming ended right there, and the block following the 512 b sector was marked as a non-split.
What doesn't seem normal is having a 512 b bad sector like in this screenshot:
How come a head is able to read a 4K sector but declare only a 1/8 of it unreadable? I was under impression that a physical sector is read atomically by a head? So if a part of it is bad, the whole sector is bad.
This obviously raises a question -- is it possible to get data from a 4K "partially bad" sector by running ddrescue with or without direct access but with a 512 b sector size?
Obviously something doesn't add up.
BTW this is my first posted question so please excuse me if the format is not consistent with the forum or the question is too loaded. But that aside I would be grateful to get an input on any of the topics relevant to the main question i.e. Advanced Format, direct disk access, kernel caching etc. as everything I find is either too far from the case in point or clearly assumes expertise from the reader.