Skip to contentSkip to conversation

Why does one get mismatches?

DISCUSSION Jon Hardcastle 4 participants 8 messages Jan 19, 2010 – Feb 1, 2010 MD RAID

lore
Share & tools
lore
#0 lore raw

Hi,

I kicked off a check/repair cycle on my machine after i moved the phyiscal ordering of my drives around and I am now on my second check/repair cycle and it has kept finding mismatches.

Is it correct that the mismatch value after a repair was needed should equal the value present after a check? What if it doesn't? What does it mean if another check STILL reveals mismatches?

I had something similar after i reshaped from raid 5 to 6 i had to run check/repair/check/repair several times before i got my 0.

-----------------------
N: Jon Hardcastle
E: [email protected]
'Do not worry about tomorrow, for tomorrow will bring worries of its own.'

***********
Please note, I am phasing out jd_hardcastle AT yahoo.com and replacing it with jon AT eHardcastle.com
***********

-----------------------

#1 lore raw
Quoted 10 lines · Jon Hardcastle

I kicked off a check/repair cycle on my machine after i moved the phyiscal ordering of my drives around and I am now on my second check/repair cycle and it has kept finding mismatches.

Is it correct that the mismatch value after a repair was needed should equal the value present after a check? What if it doesn't? What does it mean if another check STILL reveals mismatches?

I had something similar after i reshaped from raid 5 to 6 i had to run check/repair/check/repair several times before i got my 0.

I think to diagnose this you'll need to show us the results of running 'mdadm -E /dev/[hs]dX#' (i.e. /dev/sda2) for each member device in the md device you're trying to assemble *before* attempting to start the md device. This will report on the state of that specific member device (partition) and will show why a resync/repair would/would not be needed.

Note that if your md device is not in a read-only mode that the member states may be changing underneath you as you run the above command. Therefore, you should either stop the device then run the commands, or at least have the device in a read-only mode first.

-BR

#2 lore raw
Quoted 39 lines · Brett Russ

From: Brett Russ <[email protected]>
Subject: Re: Why does one get mismatches?
To: [email protected]
Date: Wednesday, 20 January, 2010, 14:19

Quoted 1 line · Jon Hardcastle

I kicked off a check/repair cycle on my machine after

i moved the

Quoted 1 line

phyiscal ordering of my drives around and I am now on

my second

Quoted 1 line

check/repair cycle and it has kept finding

mismatches.

Quoted 2 lines

Is it correct that the mismatch value after a repair

was needed

Quoted 1 line

should equal the value present after a check? What if

it doesn't?

Quoted 1 line

What does it mean if another check STILL reveals

mismatches?

Quoted 2 lines

I had something similar after i reshaped from raid 5

to 6 i had to

Quoted 1 line

run check/repair/check/repair several times before i

got my 0.

I think to diagnose this you'll need to show us the results of running 'mdadm -E /dev/[hs]dX#' (i.e. /dev/sda2) for each member device in the md device you're trying to assemble *before* attempting to start the md device.  This will report on the state of that specific member device (partition) and will show why a resync/repair would/would not be needed.

Note that if your md device is not in a read-only mode that the member states may be changing underneath you as you run the above command. Therefore, you should either stop the device then run the commands, or at least have the device in a read-only mode first.

Quoted 8 lines

-BR

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

I will gather the information you require, but so it is clear it is a a echo 'check' that is kicking off the ultimate mismatch not from boot.

Also, I have never marked the array as read-only whilst i have done it historically - I can but never have and this is a data storage array and isn't actually(shouldn't be) in use really whilst i am not there (can that be tested?!) the main OS drive md3 runs and completes without a problem..

-----------------------
N: Jon Hardcastle
E: [email protected]
'Do not worry about tomorrow, for tomorrow will bring worries of its own.'

***********
Please note, I am phasing out jd_hardcastle AT yahoo.com and replacing it with jon AT eHardcastle.com
***********

-----------------------

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw
Quoted 3 lines · Jon Hardcastle

I will gather the information you require, but so it is clear it is a a echo 'check' that is kicking off the ultimate mismatch not from boot.

What do you mean by mismatches detected? How is this observed? -BR

#4 lore raw
Quoted 7 lines · Brett Russ
Quoted 3 lines · Jon Hardcastle

I will gather the information you require, but so it is clear it is a a echo 'check' that is kicking off the ultimate mismatch not from boot.

What do you mean by mismatches detected? How is this observed? -BR

I see it as an error count > 0

Signature · 3 lines
Bill Davidsen <[email protected]>
 "We can't solve today's problems by using the same thinking we
  used in creating them." - Einstein
#5 lore raw
In reply to Brett Russ

<SNIP>

Quoted 9 lines

Note that if your md device is not in a read-only mode that the member states may be changing underneath you as you run the above command. Therefore, you should either stop the device then run the commands, or at least have the device in a read-only mode first.

-BR

I have just tried this - i umounted all LV and then deactivated the VG. I set to read-only but now any attempt to echo check > sync_action results in

'write error: device or resource busy'

any clues/

#6 lore raw
Quoted 12 lines · Jon Hardcastle

<SNIP>

Quoted 9 lines

Note that if your md device is not in a read-only mode that the member states may be changing underneath you as you run the above command. Therefore, you should either stop the device then run the commands, or at least have the device in a read-only mode first.

-BR

Quoted 6 lines

I have just tried this - i umounted all LV and then deactivated the VG. I set to read-only but now any attempt to echo check > sync_action results in

'write error: device or resource busy'

any clues/

I think running check or repair is not supported with the MD array set read-only.
I remember Neil Brown himself saying that, and I seem to recall I have also seen this in the source code.

#7 lore raw
In reply to Jon Hardcastle
Quoted 7 lines · Jon Hardcastle

<SNIP>

Quoted 6 lines

Note that if your md device is not in a read-only mode that the member states may be changing underneath you as you run the above command. Therefore, you should either stop the device then run the commands, or at least have the device in a read-only mode first.

Quoted 6 lines
Quoted 2 lines

-BR

I have just tried this - i umounted all LV and then deactivated the VG. I set to read-only but now any attempt to echo check> sync_action results in

Sorry for the misunderstanding, I was suggesting putting the array in read only mode only for the purposes of doing the 'mdadm --examine' to detect if member devices were out of sync with each other.

But, it turns out that the mismatches you're seeing are not a result of the member devices being out of sync with each other but rather member devices throwing errors. Sounds like other people see this same behavior and it's not necessarily tied to any disk sector read errors. If there are also no I/O errors in the kernel log during your 'check' operation, you'll need either more verbose md logging during the check or a look at the code to see what other kinds of errors bump the mismatch counter.

-BR