From: Neil Brown <neilb@suse.de>
To: anoneironaut84 <anoneironaut@hotmail.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: Linear RAID failure. How to recreate?
Date: Fri, 29 Jan 2010 23:00:43 +1100 [thread overview]
Message-ID: <20100129230043.666c9c92@notabene> (raw)
In-Reply-To: <27301741.post@talk.nabble.com>
On Sun, 24 Jan 2010 19:25:23 -0800 (PST)
anoneironaut84 <anoneironaut@hotmail.com> wrote:
>
> Hey all,
>
> I'm just wondering if there is any way to recreate a linear array. For
> example in a simple two disk linear RAID array if one disk fail if I replace
> the old drive with a working drive can I stop the linear RAID array, format
> the simple device nodes and recreate the array? I tried to do something
> like this but failed:
Yes, you could do that. But mode of the data would be missing, so I don't
really see much point.
>
> bash# mdadm --manage /dev/md1 -f /dev/sda2
> mdadm: set /dev/sda2 faulty in /dev/md1
> bash# mdadm --manage /dev/md1 -f /dev/sdb2
> mdadm: set /dev/sdb2 faulty in /dev/md1
It doesn't really make sense to set a device in a linear array to faulty as
there is no alternative strategy that can be used to read or write.
So as you notice, the 'faulty' status is not recorded:
> bash# cat /proc/mdstat
> Personalities : [linear] [raid1]
> md1 : active linear sdb2[1] sda2[0]
> 957216768 blocks 64k rounding
>
> md0 : active raid1 sdb1[1]
> 9775424 blocks [2/1] [_U]
>
> unused devices: <none>
> bash# mdadm --manage /dev/md1 -r /dev/sdb2
> mdadm: hot remove failed for /dev/sdb2: Device or resource busy
> bash# mdadm --manage /dev/md1 -r /dev/sda2
> mdadm: hot remove failed for /dev/sda2: Device or resource busy
> bash# mdadm --manage /dev/md1 -fr /dev/sda2
> mdadm: hot remove failed for /dev/sda2: Device or resource busy
Similarly you cannot remove individual devices from a linear array.
You can only sort the whole array, then maybe restart it.
> bash# mdadm --manage --stop /dev/md1
> mdadm: fail to stop array /dev/md1: Device or resource busy
Presumably the device is mounted?
> bash# fuser -m /dev/md1
> bash# fuser -m /dev/sda2
> bash# fuser -m /dev/sdb2
I guess no process is using the mounted filesystem?
What does
cat /proc/mounts
show?
> bash# mdadm --manage --stop /dev/md1
> mdadm: fail to stop array /dev/md1: Device or resource busy
> bash-2.05b# lsof | grep md1
> bash-2.05b#
>
> Would appreciate some input.
>
> Thanks!
>
> -JD
>
> PS My system is RHEL-4 running on the 2.6.22 kernel.
NeilBrown
prev parent reply other threads:[~2010-01-29 12:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-25 3:25 Linear RAID failure. How to recreate? anoneironaut84
2010-01-29 12:00 ` Neil Brown [this message]
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=20100129230043.666c9c92@notabene \
--to=neilb@suse.de \
--cc=anoneironaut@hotmail.com \
--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;
as well as URLs for NNTP newsgroup(s).