* How can i read really 512 byte?
@ 2008-09-30 12:25 Janos Haar
2008-09-30 14:50 ` Milton Miller
0 siblings, 1 reply; 6+ messages in thread
From: Janos Haar @ 2008-09-30 12:25 UTC (permalink / raw)
To: linux-kernel
Hello list,
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?
Thanks a lot,
Janos Haar
^ permalink raw reply [flat|nested] 6+ messages in thread
* How can i read really 512 byte?
2008-09-30 12:25 How can i read really 512 byte? Janos Haar
@ 2008-09-30 14:50 ` Milton Miller
2008-10-01 10:23 ` Janos Haar
0 siblings, 1 reply; 6+ messages in thread
From: Milton Miller @ 2008-09-30 14:50 UTC (permalink / raw)
To: Janos Haar; +Cc: linux-kernel
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How can i read really 512 byte?
2008-09-30 14:50 ` Milton Miller
@ 2008-10-01 10:23 ` Janos Haar
2008-10-01 12:22 ` Milton Miller
0 siblings, 1 reply; 6+ messages in thread
From: Janos Haar @ 2008-10-01 10:23 UTC (permalink / raw)
To: Milton Miller; +Cc: linux-kernel
----- Original Message -----
From: "Milton Miller" <miltonm@bga.com>
To: "Janos Haar" <janos.haar@netcenter.hu>
Cc: <linux-kernel@vger.kernel.org>
Sent: Tuesday, September 30, 2008 4:50 PM
Subject: How can i read really 512 byte?
> 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
Hello,
Thank you for the information.
Can you help me a little bit more?
Where need to add this parameter?
In the kernel, in the blocked's source, or in the dd_rescue's source?
Thanks,
Janos Haar
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How can i read really 512 byte?
2008-10-01 10:23 ` Janos Haar
@ 2008-10-01 12:22 ` Milton Miller
2008-10-01 12:36 ` Andrey Borzenkov
0 siblings, 1 reply; 6+ messages in thread
From: Milton Miller @ 2008-10-01 12:22 UTC (permalink / raw)
To: Janos Haar; +Cc: linux-kernel
On Oct 1, 2008, at 5:23 AM, Janos Haar wrote:
>> 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
>
> Hello,
>
> Thank you for the information.
> Can you help me a little bit more?
> Where need to add this parameter?
> In the kernel, in the blocked's source, or in the dd_rescue's source?
dd_rescue ... there is a call to open, add O_DIRECT to the second
argument and recompile. If it says unknown identifier, just copy the
#define from the kernel header into the dd_rescue source.
milton
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How can i read really 512 byte?
2008-10-01 12:22 ` Milton Miller
@ 2008-10-01 12:36 ` Andrey Borzenkov
2008-10-01 13:44 ` Janos Haar
0 siblings, 1 reply; 6+ messages in thread
From: Andrey Borzenkov @ 2008-10-01 12:36 UTC (permalink / raw)
To: Milton Miller, janos.haar, Linux Kernel Mailing List
Milton Miller wrote:
>
> On Oct 1, 2008, at 5:23 AM, Janos Haar wrote:
>
>>> 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
>>
>> Hello,
>>
>> Thank you for the information.
>> Can you help me a little bit more?
>> Where need to add this parameter?
>> In the kernel, in the blocked's source, or in the dd_rescue's source?
>
> dd_rescue ... there is a call to open, add O_DIRECT to the second
> argument and recompile. If it says unknown identifier, just copy the
> #define from the kernel header into the dd_rescue source.
>
C'mon, really.
{pts/0}% dd_rescue -h
dd_rescue Version 1.14, garloff@suse.de, GNU GPL
[...]
-b softbs block size for copy operation (def=65536),
-B hardbs fallback block size in case of errs (def=512),
[...]
-d/D use O_DIRECT for input/output (def=no),
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How can i read really 512 byte?
2008-10-01 12:36 ` Andrey Borzenkov
@ 2008-10-01 13:44 ` Janos Haar
0 siblings, 0 replies; 6+ messages in thread
From: Janos Haar @ 2008-10-01 13:44 UTC (permalink / raw)
To: Andrey Borzenkov, Milton Miller; +Cc: linux-kernel
----- Original Message -----
From: "Andrey Borzenkov" <arvidjaar@mail.ru>
To: "Milton Miller" <miltonm@bga.com>; <janos.haar@netcenter.hu>; "Linux
Kernel Mailing List" <linux-kernel@vger.kernel.org>
Sent: Wednesday, October 01, 2008 2:36 PM
Subject: Re: How can i read really 512 byte?
> Milton Miller wrote:
>
>>
>> On Oct 1, 2008, at 5:23 AM, Janos Haar wrote:
>>
>>>> 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
>>>
>>> Hello,
>>>
>>> Thank you for the information.
>>> Can you help me a little bit more?
>>> Where need to add this parameter?
>>> In the kernel, in the blocked's source, or in the dd_rescue's source?
>>
>> dd_rescue ... there is a call to open, add O_DIRECT to the second
>> argument and recompile. If it says unknown identifier, just copy the
>> #define from the kernel header into the dd_rescue source.
>>
>
> C'mon, really.
>
> {pts/0}% dd_rescue -h
>
> dd_rescue Version 1.14, garloff@suse.de, GNU GPL
> [...]
> -b softbs block size for copy operation (def=65536),
> -B hardbs fallback block size in case of errs (def=512),
> [...]
> -d/D use O_DIRECT for input/output (def=no),
YES! 8-)
It works! :-)
Thank you wery much for you, and Milton!
Thanks
Janos Haar
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-10-01 13:48 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-30 12:25 How can i read really 512 byte? Janos Haar
2008-09-30 14:50 ` Milton Miller
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).