From: Justin Piszcz <jpiszcz@lucidpixels.com>
To: John Robinson <john.robinson@anonymous.org.uk>
Cc: Linux RAID <linux-raid@vger.kernel.org>
Subject: Re: Uncorrectable errors: how do I fix it?
Date: Fri, 28 Nov 2008 16:03:29 -0500 (EST) [thread overview]
Message-ID: <alpine.DEB.1.10.0811281600560.10901@p34.internal.lan> (raw)
In-Reply-To: <493036A0.10707@anonymous.org.uk>
On Fri, 28 Nov 2008, John Robinson wrote:
> One of the drives in my RAID-5 array is showing uncorrectable errors:
>
> I tried:
> [root@beast md]# mdadm /dev/md1 --fail /dev/sdc2
> mdadm: set /dev/sdc2 faulty in /dev/md1
> [root@beast md]# mdadm /dev/md1 --remove /dev/sdc2
> mdadm: hot removed /dev/sdc2
> [root@beast md]# mdadm /dev/md1 --add /dev/sdc2
> mdadm: re-added /dev/sdc2
>
> but that finished instantly. I guess it would since the array has a
> write-intent bitmap and it's noticed that sdc2 is being re-added. I could
> tell the system to do a complete resync with:
> # echo repair > /sys/block/md1/md/sync_action
>
> but really I want to tell the system to rebuild entirely from sda2 and sdb2,
> onto sdc2. At least I think I do. I've a feeling the answer is to zero the
> superblock, but I'm not confident about doing that because I'm not sure if
> re-adding the thing without a superblock will either work or do the Right
> Thing[tm].
Before you do this you should backup your data elsewhere just incase you
cannot rebuild the array later.
You may be able to fix it using the hdparm --write-sector command if you
know what you are doing, otherwise, the quickest way is to fail it from
the array as you did before, remove it from the raid set.
zero the disk:
dd if=/dev/zero of=/dev/disk
run badblocks on it a few times:
run short+long test when its all done:
re-check smart statistics and they should complete successfully.
then sfdisk -d /dev/sda | sfdisk /dev/sdc
then pop it back into the array with mdadm /dev/md1 -a /dev/sdc2
Justin.
next prev parent reply other threads:[~2008-11-28 21:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-28 18:21 Uncorrectable errors: how do I fix it? John Robinson
2008-11-28 21:03 ` Justin Piszcz [this message]
2008-11-28 21:53 ` 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=alpine.DEB.1.10.0811281600560.10901@p34.internal.lan \
--to=jpiszcz@lucidpixels.com \
--cc=john.robinson@anonymous.org.uk \
--cc=linux-raid@vger.kernel.org \
/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