* Add set bad lba function in md-faulty module.
@ 2012-05-14 10:22 kedacomkernel
2012-05-15 0:16 ` NeilBrown
0 siblings, 1 reply; 5+ messages in thread
From: kedacomkernel @ 2012-05-14 10:22 UTC (permalink / raw)
To: linux-raid
Hi all:
In order to test md code, sometime we need simulate read/write harddisk error.
Using hdparm --make-bad-sector to simulate read error.But I did not find way of simulating write-error.
I tested md-faulty module, it can do this.But it is not provide the function link hdparm --make-bad-sector,which did not set lba.
Using hdpamr --make-bad-sector to simulate read error can cause some problem.
It will cause ata commnd reset,disk reset and so on.It take too log time.
So I think add a function in md-faulty which can set read/write lba.
How about ?
--------------
kedacomkernel
2012-05-14
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Add set bad lba function in md-faulty module.
2012-05-14 10:22 kedacomkernel
@ 2012-05-15 0:16 ` NeilBrown
0 siblings, 0 replies; 5+ messages in thread
From: NeilBrown @ 2012-05-15 0:16 UTC (permalink / raw)
To: kedacomkernel; +Cc: linux-raid
[-- Attachment #1: Type: text/plain, Size: 1149 bytes --]
On Mon, 14 May 2012 18:22:25 +0800 "kedacomkernel" <kedacomkernel@gmail.com>
wrote:
> Hi all:
> In order to test md code, sometime we need simulate read/write harddisk error.
> Using hdparm --make-bad-sector to simulate read error.But I did not find way of simulating write-error.
> I tested md-faulty module, it can do this.But it is not provide the function link hdparm --make-bad-sector,which did not set lba.
> Using hdpamr --make-bad-sector to simulate read error can cause some problem.
> It will cause ata commnd reset,disk reset and so on.It take too log time.
> So I think add a function in md-faulty which can set read/write lba.
> How about ?
I don't know how --make-bad-sector works so it might not be possible to get
md to respond to the same command. But if it can work it sounds like a good
idea.
Patches welcome.
NeilBrown
>
> --------------
> kedacomkernel
> 2012-05-14
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Add set bad lba function in md-faulty module.
@ 2012-05-15 11:49 majianpeng
2012-05-17 11:49 ` George Shuklin
2012-05-18 8:41 ` majianpeng
0 siblings, 2 replies; 5+ messages in thread
From: majianpeng @ 2012-05-15 11:49 UTC (permalink / raw)
To: linux-raid
Hi all:
In order to test md code, sometime we need simulate read/write harddisk error.
Using hdparm --make-bad-sector to simulate read error.But I did not find way of simulating write-error.
I tested md-faulty module, it can do this.But it is not provide the function link hdparm --make-bad-sector,which did not set lba.
Using hdpamr --make-bad-sector to simulate read error can cause some problem.
It will cause ata commnd reset,disk reset and so on.It take too log time.
So I think add a function in md-faulty which can set read/write lba.
How about ?
--------------
majianpeng
2012-05-15
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Add set bad lba function in md-faulty module.
2012-05-15 11:49 Add set bad lba function in md-faulty module majianpeng
@ 2012-05-17 11:49 ` George Shuklin
2012-05-18 8:41 ` majianpeng
1 sibling, 0 replies; 5+ messages in thread
From: George Shuklin @ 2012-05-17 11:49 UTC (permalink / raw)
To: majianpeng; +Cc: linux-raid
On 15.05.2012 15:49, majianpeng wrote:
> Hi all:
> In order to test md code, sometime we need simulate read/write harddisk error.
> Using hdparm --make-bad-sector to simulate read error.But I did not find way of simulating write-error.
> I tested md-faulty module, it can do this.But it is not provide the function link hdparm --make-bad-sector,which did not set lba.
> Using hdpamr --make-bad-sector to simulate read error can cause some problem.
> It will cause ata commnd reset,disk reset and so on.It take too log time.
> So I think add a function in md-faulty which can set read/write lba.
> How about ?
>
>
How about using an iscsi at localhost? Export disk via ISCSI target,
connect to it with initiator. With iptables and open-iscsi settings you
can precisely control error behavior and imitate all kinds of errors
(including timeouts).
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Re: Add set bad lba function in md-faulty module.
2012-05-15 11:49 Add set bad lba function in md-faulty module majianpeng
2012-05-17 11:49 ` George Shuklin
@ 2012-05-18 8:41 ` majianpeng
1 sibling, 0 replies; 5+ messages in thread
From: majianpeng @ 2012-05-18 8:41 UTC (permalink / raw)
To: George Shuklin; +Cc: linux-raid
Thanks. In fact, using md-faulty also do that,but must do more steps. So I think add it in md-faulty.
------------------
majianpeng
2012-05-18
-------------------------------------------------------------
发件人:George Shuklin
发送日期:2012-05-17 19:49:26
收件人:majianpeng
抄送:linux-raid
主题:Re: Add set bad lba function in md-faulty module.
On 15.05.2012 15:49, majianpeng wrote:
> Hi all:
> In order to test md code, sometime we need simulate read/write harddisk error.
> Using hdparm --make-bad-sector to simulate read error.But I did not find way of simulating write-error.
> I tested md-faulty module, it can do this.But it is not provide the function link hdparm --make-bad-sector,which did not set lba.
> Using hdpamr --make-bad-sector to simulate read error can cause some problem.
> It will cause ata commnd reset,disk reset and so on.It take too log time.
> So I think add a function in md-faulty which can set read/write lba.
> How about ?
>
>
How about using an iscsi at localhost? Export disk via ISCSI target,
connect to it with initiator. With iptables and open-iscsi settings you
can precisely control error behavior and imitate all kinds of errors
(including timeouts).
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-05-18 8:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-15 11:49 Add set bad lba function in md-faulty module majianpeng
2012-05-17 11:49 ` George Shuklin
2012-05-18 8:41 ` majianpeng
-- strict thread matches above, loose matches on Subject: below --
2012-05-14 10:22 kedacomkernel
2012-05-15 0:16 ` NeilBrown
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).