dcfldd on non-FreeB...
 
Notifications
Clear all

dcfldd on non-FreeBSD systems produces extra "bad sectors"?

25 Posts
7 Users
0 Reactions
2,787 Views
nickfx
(@nickfx)
Estimable Member
Joined: 20 years ago
Posts: 131
 

Hi Steve, thanks for posting this, Barry and myself have centered in on the iflag=direct switch too and are testing it over the next couple of weeks.

The data recovery company Disklabs are giving me access to their labs and loads of disks with bad sectors so that a stack of testing can be done in a short period of time.

Barry and I are going to collate our testing and if you wish to contact me directly please do.

Nick


   
ReplyQuote
(@sgibson)
New Member
Joined: 17 years ago
Posts: 4
 

Nick, great news about the access to a large supply of disks with bad sectors (sounds weird to say that).

I have a few old and small drives that I've been testing with. I used MHDD to mark some known sectors as "bad" and had been testing dcfldd using a /dev/raw device associated with a block device and had good results. But when I saw that dc3dd could use O_DIRECT and remove the need to mess with /dev/raw I decided to try that out instead.

I'll let you know how it turns out.

-Steve


   
ReplyQuote
(@bgrundy)
Trusted Member
Joined: 19 years ago
Posts: 70
 

But when I saw that dc3dd could use O_DIRECT and remove the need to mess with /dev/raw I decided to try that out instead.

FWIW, my tests with dc3dd and O_DIRECT have been good. As Nick mentioned, we've been trying to get our heads together and test this through …I'm almost there, and I look forward to Nick's results on the drives with real bad sectors. Work and a three week old baby keep getting in the way at my end.

As we stated awhile back, it appears that raw access is the key, whether through O_DIRECT or through /dev/raw. No doubt O_D is preferable, since apparently /dev/raw is deprecated.

…And my results with dd_rescue sucked as well…stick with GNU ddrescue. As I mentioned in a previous post, I'm not even bothering with further testing. For those of you poor souls using Debian or boobootoo, the apt repositories have dd_rescue as "ddrescue" and GNU ddrescue as "gddrescue". Go figure.


   
ReplyQuote
nickfx
(@nickfx)
Estimable Member
Joined: 20 years ago
Posts: 131
 

Starting at GNU Coreutils release 5.3.0, dd on Linux includes the'iflag=direct' too. However you've got to love anything written by Jesse Kornblum,and dc3dd seems excellent.

Nick


   
ReplyQuote
(@sgibson)
New Member
Joined: 17 years ago
Posts: 4
 

Work and a three week old baby keep getting in the way at my end.

I'm surprised you're even finding the time to correspond with us!

No doubt O_D is preferable, since apparently /dev/raw is deprecated.

Yeah and, if for no other reason, it is certainly more convenient. For an interesting read, and to see Linus Torvalds rant about how he hates O_DIRECT, check out this thread from the kernel mailing list http//lkml.org/lkml/2007/1/10/231

That was over a year ago, though, and the kernel still supports the O_DIRECT flag on the open(2) system call, so it probably won't be going away anytime soon. The man page for open(2) has a pretty funny Linus quote listed under the BUGS section

The thing that has always disturbed me about O_DIRECT is that the whole interface is just stupid, and was probably designed by a deranged monkey on some serious mind-controlling substances.

…which comes from this post to the LKML http//lkml.org/lkml/2002/5/11/58

Interesting reading.

-Steve


   
ReplyQuote
Page 3 / 3
Share: