All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tim Small <tim@seoss.co.uk>
To: Roberto Nunnari <roberto.nunnari@supsi.ch>
Cc: "linux-raid@vger.kernel.org" <linux-raid@vger.kernel.org>
Subject: Re: faulty array member
Date: Fri, 19 Nov 2010 10:47:01 +0000	[thread overview]
Message-ID: <4CE655A5.4050802@seoss.co.uk> (raw)
In-Reply-To: <4CE640C6.3090607@supsi.ch>


>> then copy those individual blocks (only) over from sda2 (e.g. using
>> dd).  Once sdb1 has no pending sectors left, you should then be able to
>> re-add sda2 back into md0.
>
> that is exactly what I was trying to do.. but as the two drives
> partitioning are not the same, I don't know how to find the
> corresponding blocks/sectors in the two drives.

Under later kernels, you can definitely do something like:

cat /sys/block/sda/sda2/start

to find what the offset is from the start of the drive for each partition.

>> I don't know what the bad-block remapping is like on the CentOS4 kernel,
>
> I believe in this case, the bad-block remapping is done by the
> hd firmware.. please correct me if I'm wrong.

Yes it is, but the remap is triggered by a write to the block, so when
it happens automatically due to md, the following has to happen:

md tries to read from a sector, the read fails, so md reads from the
other drive, and then writes that data back to the original drive


> By the way, why it is not possible to re-add /dev/sda2 into the raid?

You should be able to do that, but md would in that case start a rebuild
from the other drive (i.e. copy all blocks from the other drive), and as
there are currently pending sectors on that drive, the rebuild will fail
- so you have to eliminate those faulty sectors on the source drive first.

Tim.

-- 
South East Open Source Solutions Limited
Registered in England and Wales with company number 06134732.  
Registered Office: 2 Powell Gardens, Redhill, Surrey, RH1 1TQ
VAT number: 900 6633 53  http://seoss.co.uk/ +44-(0)1273-808309


  parent reply	other threads:[~2010-11-19 10:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-18 17:08 faulty array member Roberto Nunnari
2010-11-18 19:29 ` Tim Small
     [not found]   ` <4CE640C6.3090607@supsi.ch>
2010-11-19 10:47     ` Tim Small [this message]
2010-11-22  4:05 ` Neil Brown

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=4CE655A5.4050802@seoss.co.uk \
    --to=tim@seoss.co.uk \
    --cc=linux-raid@vger.kernel.org \
    --cc=roberto.nunnari@supsi.ch \
    /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 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.