mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Milton Miller <miltonm@bga.com>
To: "Janos Haar" <janos.haar@netcenter.hu>
Cc: linux-kernel@vger.kernel.org
Subject: How can i read really 512 byte?
Date: Tue, 30 Sep 2008 09:50:05 -0500 (CDT)	[thread overview]
Message-ID: <200809301450.m8UEo5wT027331@sullivan.realtime.net> (raw)
In-Reply-To: <3c8f01c922f7$a032a570$0400a8c0@dcccs>

On Tue, 30 Sep 2008 at 08:29:15 -0400 (EDT), Janos Haar wrote:
> Now i am working on recover some data from one defective drive.  I
> am using dd_rescue, and dd, but both ready only 4K, i think, because
> the kernel's block size is 4K.
> 
> I have tried to google for the solution, but only found this trick:
> 
> losetup /dev/loop0 /dev/hdc
> blockdev --setbsz 512 /dev/hdc
> 
> and after this set, trying to read the hdc...
> 
> It looks like working on the first look, but not really. :-( The
> 512 size bad sectors still have 4K sizes, but the reading attempt
> takes more (8x ?) longer.
> 
> Somebody can help me to set the reading block size to 512 byte?

You need to add O_DIRECT to the open call in the flags parameter
(the second argument).   (My brother tested this a year or so ago,
and it worked for him).

milton

  reply	other threads:[~2008-09-30 14:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-30 12:25 Janos Haar
2008-09-30 14:50 ` Milton Miller [this message]
2008-10-01 10:23   ` Janos Haar
2008-10-01 12:22     ` Milton Miller
2008-10-01 12:36       ` Andrey Borzenkov
2008-10-01 13:44         ` Janos Haar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200809301450.m8UEo5wT027331@sullivan.realtime.net \
    --to=miltonm@bga.com \
    --cc=janos.haar@netcenter.hu \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®