* Mapping sectors to have errors
@ 2011-10-28 2:31 Yathindra
2011-10-28 9:11 ` Joe Thornber
2011-10-28 19:42 ` Milan Broz
0 siblings, 2 replies; 6+ messages in thread
From: Yathindra @ 2011-10-28 2:31 UTC (permalink / raw)
To: device-mapper development; +Cc: Yathindra Naik
[-- Attachment #1.1: Type: text/plain, Size: 371 bytes --]
Hi,
I'm trying to create a disk and map some sectors to have errors on them.
I tried this,
echo "0 100000 linear /dev/sdb 0 100000 480081250 error"| dmsetup create
bad_disk
device-mapper: reload ioctl failed: Invalid argument
Command failed
I have put in the right arguments but not sure why it fails.
Could someone please guide me how I can do this.
Thanks,
Yathi
[-- Attachment #1.2: Type: text/html, Size: 809 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Mapping sectors to have errors
2011-10-28 2:31 Mapping sectors to have errors Yathindra
@ 2011-10-28 9:11 ` Joe Thornber
2011-10-28 17:54 ` Yathindra
2011-10-28 19:42 ` Milan Broz
1 sibling, 1 reply; 6+ messages in thread
From: Joe Thornber @ 2011-10-28 9:11 UTC (permalink / raw)
To: device-mapper development; +Cc: Yathindra Naik
On Thu, Oct 27, 2011 at 08:31:00PM -0600, Yathindra wrote:
> Hi,
>
> I'm trying to create a disk and map some sectors to have errors on them.
>
> I tried this,
> echo "0 100000 linear /dev/sdb 0 100000 480081250 error"| dmsetup
> create bad_disk
> device-mapper: reload ioctl failed: Invalid argument
> Command failed
>
> I have put in the right arguments but not sure why it fails.
You have 2 target lines concatenated onto the same line there.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Mapping sectors to have errors
2011-10-28 9:11 ` Joe Thornber
@ 2011-10-28 17:54 ` Yathindra
0 siblings, 0 replies; 6+ messages in thread
From: Yathindra @ 2011-10-28 17:54 UTC (permalink / raw)
To: Joe Thornber; +Cc: device-mapper development
Hi Joe,
I tried it the other way but when I specify error it doesn't seem to take
the start sector > 0.
# echo "0 `blockdev --getsz /dev/sdb` linear /dev/sdb 0" | dmsetup
create bad_disk
# dmsetup table
bad_disk: 0 488281250 linear 8:16 0
# echo "100000 488181250 error" | dmsetup load bad_disk << This failed
device-mapper: reload ioctl failed: Invalid argument
Command failed
# echo "0 100000 error" | dmsetup load bad_disk << This worked
Any ideas?
Thanks,
Yathi
On 10/28/2011 3:11 AM, Joe Thornber wrote:
> On Thu, Oct 27, 2011 at 08:31:00PM -0600, Yathindra wrote:
>> Hi,
>>
>> I'm trying to create a disk and map some sectors to have errors on them.
>>
>> I tried this,
>> echo "0 100000 linear /dev/sdb 0 100000 480081250 error"| dmsetup
>> create bad_disk
>> device-mapper: reload ioctl failed: Invalid argument
>> Command failed
>>
>> I have put in the right arguments but not sure why it fails.
> You have 2 target lines concatenated onto the same line there.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Mapping sectors to have errors
2011-10-28 2:31 Mapping sectors to have errors Yathindra
2011-10-28 9:11 ` Joe Thornber
@ 2011-10-28 19:42 ` Milan Broz
2011-10-28 19:46 ` Yathindra
1 sibling, 1 reply; 6+ messages in thread
From: Milan Broz @ 2011-10-28 19:42 UTC (permalink / raw)
To: device-mapper development; +Cc: Yathindra
On 10/28/2011 04:31 AM, Yathindra wrote:
> I'm trying to create a disk and map some sectors to have errors on them.
>
> I tried this,
> echo "0 100000 linear /dev/sdb 0 100000 480081250 error"| dmsetup create bad_disk
> device-mapper: reload ioctl failed: Invalid argument
> Command failed
Try
echo -e "0 100000 linear /dev/sdb 0\n100000 480081250 error"| dmsetup create bad_disk
Milan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Mapping sectors to have errors
2011-10-28 19:42 ` Milan Broz
@ 2011-10-28 19:46 ` Yathindra
2011-11-04 16:14 ` Yathindra
0 siblings, 1 reply; 6+ messages in thread
From: Yathindra @ 2011-10-28 19:46 UTC (permalink / raw)
To: Milan Broz; +Cc: device-mapper development
Hi Milan,
It worked! Thanks so much ! :)
Have a great weekend.
On 10/28/2011 1:42 PM, Milan Broz wrote:
> On 10/28/2011 04:31 AM, Yathindra wrote:
>> I'm trying to create a disk and map some sectors to have errors on them.
>>
>> I tried this,
>> echo "0 100000 linear /dev/sdb 0 100000 480081250 error"| dmsetup create bad_disk
>> device-mapper: reload ioctl failed: Invalid argument
>> Command failed
> Try
> echo -e "0 100000 linear /dev/sdb 0\n100000 480081250 error"| dmsetup create bad_disk
>
> Milan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Mapping sectors to have errors
2011-10-28 19:46 ` Yathindra
@ 2011-11-04 16:14 ` Yathindra
0 siblings, 0 replies; 6+ messages in thread
From: Yathindra @ 2011-11-04 16:14 UTC (permalink / raw)
To: Milan Broz; +Cc: device-mapper development
Hi Milan,
I'm trying to inject random sector errors using device mapper.
Suppose I want to inject some 50 errors on random sectors, is their a
way to do
this without having to reload the table every time.
Thanks,
Yathi
On 10/28/2011 1:46 PM, Yathindra wrote:
> Hi Milan,
>
> It worked! Thanks so much ! :)
>
> Have a great weekend.
>
> On 10/28/2011 1:42 PM, Milan Broz wrote:
>> On 10/28/2011 04:31 AM, Yathindra wrote:
>>> I'm trying to create a disk and map some sectors to have errors on
>>> them.
>>>
>>> I tried this,
>>> echo "0 100000 linear /dev/sdb 0 100000 480081250 error"| dmsetup
>>> create bad_disk
>>> device-mapper: reload ioctl failed: Invalid argument
>>> Command failed
>> Try
>> echo -e "0 100000 linear /dev/sdb 0\n100000 480081250 error"| dmsetup
>> create bad_disk
>>
>> Milan
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-11-04 16:14 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-28 2:31 Mapping sectors to have errors Yathindra
2011-10-28 9:11 ` Joe Thornber
2011-10-28 17:54 ` Yathindra
2011-10-28 19:42 ` Milan Broz
2011-10-28 19:46 ` Yathindra
2011-11-04 16:14 ` Yathindra
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.