All of lore.kernel.org
 help / color / mirror / Atom feed
* check vs repair -- mismatch count goes up in repair, zeros in check?
@ 2011-06-18 16:10 Rory Jaffe
  2011-06-18 23:23 ` NeilBrown
  0 siblings, 1 reply; 2+ messages in thread
From: Rory Jaffe @ 2011-06-18 16:10 UTC (permalink / raw)
  To: linux-raid

I'm a bit confused about check vs repair.

When I run repair, mismatches are initially zero'd at the start and
then add up as it runs through, so that at the end there is a positive
mismatch count. Running check after that zero's them out.

I thought check would run through the array and identify mismatches,
but not repair them, while repair would do the repair step as well.
But the exhibited behavior seems to indicate the opposite.

Does the mismatch count show the current number of identified
mismatches? Or what is it really counting?

See http://pastthe.endoftheinternet.org/munin/home/ubuntunas/index.html#munin
for an example (page up from the munin graphs--the three graphs
immediately above track the array.


/dev/md0:
        Version : 1.2
  Creation Time : Sat Apr 30 14:29:07 2011
     Raid Level : raid6
     Array Size : 5857609728 (5586.25 GiB 5998.19 GB)
  Used Dev Size : 1952536576 (1862.08 GiB 1999.40 GB)
   Raid Devices : 5
  Total Devices : 6
    Persistence : Superblock is persistent

    Update Time : Sat Jun 18 09:08:03 2011
          State : clean
 Active Devices : 5
Working Devices : 6
 Failed Devices : 0
  Spare Devices : 1

         Layout : left-symmetric
     Chunk Size : 512K

           Name : ubuntunas:0  (local to host ubuntunas)
           UUID : 9916bc94:a245d51b:ecca3480:7c612ed5
         Events : 127

    Number   Major   Minor   RaidDevice State
       0       8        2        0      active sync   /dev/sda2
       1       8       18        1      active sync   /dev/sdb2
       2       8       34        2      active sync   /dev/sdc2
       3       8       50        3      active sync   /dev/sdd2
       4       8       66        4      active sync   /dev/sde2

       5       8       82        -      spare   /dev/sdf2

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: check vs repair -- mismatch count goes up in repair, zeros in check?
  2011-06-18 16:10 check vs repair -- mismatch count goes up in repair, zeros in check? Rory Jaffe
@ 2011-06-18 23:23 ` NeilBrown
  0 siblings, 0 replies; 2+ messages in thread
From: NeilBrown @ 2011-06-18 23:23 UTC (permalink / raw)
  To: Rory Jaffe; +Cc: linux-raid

On Sat, 18 Jun 2011 09:10:01 -0700 Rory Jaffe <rsjaffe@gmail.com> wrote:

> I'm a bit confused about check vs repair.
> 
> When I run repair, mismatches are initially zero'd at the start and
> then add up as it runs through, so that at the end there is a positive
> mismatch count. Running check after that zero's them out.
> 
> I thought check would run through the array and identify mismatches,
> but not repair them, while repair would do the repair step as well.
> But the exhibited behavior seems to indicate the opposite.

Does it?   Why do you think that 'check' found no mismatches?  Because
'repair' had already repaired them!

Both 'check' and 'repair' report how many mismatches were found.  'check'
doesn't repair them.  'repair' does.

> 
> Does the mismatch count show the current number of identified
> mismatches? Or what is it really counting?

It is really counting sectors that might not match.
i.e. it performs the check is section larger than one sector.  When it finds
a mismatch it just adds the number of sectors in the section to the count.

NeilBrown


> 
> See http://pastthe.endoftheinternet.org/munin/home/ubuntunas/index.html#munin
> for an example (page up from the munin graphs--the three graphs
> immediately above track the array.
> 
> 
> /dev/md0:
>         Version : 1.2
>   Creation Time : Sat Apr 30 14:29:07 2011
>      Raid Level : raid6
>      Array Size : 5857609728 (5586.25 GiB 5998.19 GB)
>   Used Dev Size : 1952536576 (1862.08 GiB 1999.40 GB)
>    Raid Devices : 5
>   Total Devices : 6
>     Persistence : Superblock is persistent
> 
>     Update Time : Sat Jun 18 09:08:03 2011
>           State : clean
>  Active Devices : 5
> Working Devices : 6
>  Failed Devices : 0
>   Spare Devices : 1
> 
>          Layout : left-symmetric
>      Chunk Size : 512K
> 
>            Name : ubuntunas:0  (local to host ubuntunas)
>            UUID : 9916bc94:a245d51b:ecca3480:7c612ed5
>          Events : 127
> 
>     Number   Major   Minor   RaidDevice State
>        0       8        2        0      active sync   /dev/sda2
>        1       8       18        1      active sync   /dev/sdb2
>        2       8       34        2      active sync   /dev/sdc2
>        3       8       50        3      active sync   /dev/sdd2
>        4       8       66        4      active sync   /dev/sde2
> 
>        5       8       82        -      spare   /dev/sdf2
> --
> 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-06-18 23:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-18 16:10 check vs repair -- mismatch count goes up in repair, zeros in check? Rory Jaffe
2011-06-18 23:23 ` NeilBrown

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.