From: NeilBrown <neilb@suse.de>
To: Jojy Varghese <jojy.varghese@gmail.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: error injection
Date: Thu, 29 Sep 2011 11:08:36 +1000 [thread overview]
Message-ID: <20110929110836.1dc9944d@notabene.brown> (raw)
In-Reply-To: <CAJD3hpUNkLDRGQxNuo6m7=OQjBu3uc5xV7Fzy-XLvrUFHQJbiw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1893 bytes --]
On Wed, 28 Sep 2011 17:59:49 -0700 Jojy Varghese <jojy.varghese@gmail.com>
wrote:
> Thanks Neil. I tried setting my sda7 partition to generate write
> errors every 40 bytes(writing 1 byte at a time). I did :
md doesn't see byte writes. It sees sectors or more - usually whole pages or
groups of pages.
>
> 1. Create a array with:
> mdadm -C /dev/md/me0 -l faulty -n1 /dev/sda7
-C will write a superblock to /dev/sda7 which you don't really want. It
doesn't hurt, but I always used -B (--build) to avoid any metadata.
>
> After this step I can see /dev/md127 and when i do a mdadm -D /dev/md127, i get:
>
> /dev/md127:
> Version : 1.2
> Creation Time : Wed Sep 28 17:35:50 2011
> Raid Level : faulty
> Array Size : 969410424 (924.50 GiB 992.68 GB)
> Raid Devices : 1
> Total Devices : 1
> Persistence : Superblock is persistent
>
> Update Time : Wed Sep 28 17:35:50 2011
> State : clean
> Active Devices : 1
> Working Devices : 1
> Failed Devices : 0
> Spare Devices : 0
>
> Name : eng-dev16.lab.local:me0 (local to host eng-dev16.lab.local)
> UUID : 96f4be10:312f9574:f40107aa:d9f278ba
> Events : 0
>
> Number Major Minor RaidDevice State
> 0 8 7 0 active sync /dev/sda7
>
>
> 2. Set write fault level with:
>
> mdadm -G /dev/md/me0 --layout=wp40
>
>
>
> After this when i write > 40 bytes into /dev/md127, i dont get any
> I/O errors. I am sure i am doing something wrong here.
When you write to /dev/md127 it will just go into the page cache and
eventually be flushed to the device in one write.
Use O_DIRECT or O_SYNC and it will be flushed out more quickly, but always
write at least 512 bytes at a time.
NeilBrown
>
>
> Any help is much appreciated.
>
> Thanks
> Jojy
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
next prev parent reply other threads:[~2011-09-29 1:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-28 19:48 error injection Jojy Varghese
2011-09-28 23:11 ` NeilBrown
2011-09-29 0:59 ` Jojy Varghese
2011-09-29 1:08 ` NeilBrown [this message]
2011-09-29 2:06 ` Jojy Varghese
2011-09-29 2:12 ` NeilBrown
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=20110929110836.1dc9944d@notabene.brown \
--to=neilb@suse.de \
--cc=jojy.varghese@gmail.com \
--cc=linux-raid@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;
as well as URLs for NNTP newsgroup(s).