Re: iostat with raid device...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 11 Apr 2011 10:53:55 +0100 Robin Hill <robin@xxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxx> 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: signature.asc
Description: PGP signature


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux