linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Robin Hill <robin@robinhill.me.uk>
Cc: Linux Raid Study <linuxraid.study@gmail.com>, linux-raid@vger.kernel.org
Subject: Re: iostat with raid device...
Date: Mon, 11 Apr 2011 20:18:08 +1000	[thread overview]
Message-ID: <20110411201808.47cd19d5@notabene.brown> (raw)
In-Reply-To: <20110411095355.GB20532@cthulhu.home.robinhill.me.uk>

[-- Attachment #1: Type: text/plain, Size: 2427 bytes --]

On Mon, 11 Apr 2011 10:53:55 +0100 Robin Hill <robin@robinhill.me.uk> wrote:

> On Mon Apr 11, 2011 at 02:36:50AM -0700, Linux Raid Study wrote:
> > On Mon, Apr 11, 2011 at 2:25 AM, Robin Hill <robin@robinhill.me.uk> wrote:
> > > On Mon Apr 11, 2011 at 01:32:34 -0700, Linux Raid Study wrote:
> > >> On Sat, Apr 9, 2011 at 1:50 AM, Robin Hill <robin@robinhill.me.uk> wrote:
> > >> > On Fri Apr 08, 2011 at 05:40:46PM -0700, Linux Raid Study wrote:
> > >> >
> > >> >> What I'm not sure of is if the device is newly formatted, would raid
> > >> >> recovery happen? What else could explain difference in the first run
> > >> >> of IO benchmark?
> > >> >>
> > >> > When an array is first created, it's created in a degraded state - this
> > >> > is the simplest way to make it available to the user instantly. The
> > >> > final drive(s) are then automatically rebuilt, calculating the
> > >> > parity/data information as normal for recovering a drive.
> > >> >
> > >> Thanks. So, the uneven (unequal) distribution of Wrtie/Sec numbers in
> > >> the iostat output are ok...is that correct?
> > >>
> > > If it hadn't completed the initial recovery, yes.  If it _had_ completed
> > > the initial recovery then I'd expect writes to be balanced (barring
> > > any differences in hardware).
> > >
> > The initial recovery should normally be done during first few minutes
> > .... this is a newly formatted disk so there isn't any user data
> > there. So, if I run the IO benchmark after say 3-4 min of doing, I
> > should be ok?
> > 
> > mdam --create /dev/md0 --raid5....
> > mount /dev/md0 /mnt/raid
> > mkfs.ext4 /mnt/raid
> > 
> > ...wait 3-4 min
> > 
> > run IO benchmark...
> > 
> > Am I correct?
> > 
> No, depending on the size of the drives, the initial recovery can take
> hours or even days. For RAID5 with N drives, it needs to read the
> entirity of (N-1) drives, and write the entirity of the remaining drive
> (whether there's any data or not, the initial state of the drives is
> unknown so parity data has to be calculated for the entire array).
> 
> Check /proc/mdstat and wait until the array has completed resync before
> running any benchmarks.

or run
  mdadm --wait /dev/md0

or create the array with --assume-clean.  But if the array is raid5, don't
trust the data if a device fails:  use this only for testing.

NeilBrown


> 
> Cheers,
>     Robin


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

  reply	other threads:[~2011-04-11 10:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-08 19:55 iostat with raid device Linux Raid Study
2011-04-08 22:05 ` Roberto Spadim
2011-04-08 22:10   ` Linux Raid Study
2011-04-08 23:46 ` NeilBrown
2011-04-09  0:40   ` Linux Raid Study
2011-04-09  8:50     ` Robin Hill
2011-04-11  8:32       ` Linux Raid Study
2011-04-11  9:25         ` Robin Hill
2011-04-11  9:36           ` Linux Raid Study
2011-04-11  9:53             ` Robin Hill
2011-04-11 10:18               ` NeilBrown [this message]
2011-04-12  1:57                 ` Linux Raid Study
2011-04-12  2:51                   ` NeilBrown
2011-04-12 19:36                     ` Linux Raid Study
2011-04-13 18:21                       ` Linux Raid Study
2011-04-13 21:00                         ` 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=20110411201808.47cd19d5@notabene.brown \
    --to=neilb@suse.de \
    --cc=linux-raid@vger.kernel.org \
    --cc=linuxraid.study@gmail.com \
    --cc=robin@robinhill.me.uk \
    /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).