From: Adam Kwolek <adam.kwolek@intel.com>
To: neilb@suse.de
Cc: linux-raid@vger.kernel.org, dan.j.williams@intel.com,
ed.ciechanowski@intel.com, wojciech.neubauer@intel.com
Subject: [PATCH 6/6] FIX: md runs recovery instead reshape for growing single disk raid0 array
Date: Tue, 08 Feb 2011 14:31:17 +0100 [thread overview]
Message-ID: <20110208133117.8787.6335.stgit@gklab-128-013.igk.intel.com> (raw)
In-Reply-To: <20110208131046.8787.1777.stgit@gklab-128-013.igk.intel.com>
Problem occurs when we want to expand single disk raid0 array.
This is done via degraded 2 disks raid4 array. When new spare disk
for reshape is added to array, md immediately initiates recovery before
mdadm can configure and start reshape. This is due fact that 2 disk
raid4/5 array is special md case.
Mdmon does nothing here because container is blocked.
This is caused because after takeover array is not in frozen state in md.
Put array in to frozen state after takeover to allow mdadm to finish
configuration before reshape is executed in md.
Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
---
Grow.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/Grow.c b/Grow.c
index e77ab80..88e03ef 100644
--- a/Grow.c
+++ b/Grow.c
@@ -1677,6 +1677,7 @@ static int reshape_array(char *container, int fd, char *devname,
fprintf(stderr, Name ": level of %s changed to %s\n",
devname, c);
orig_level = info->array.level;
+ sysfs_freeze_array(info);
if (reshape.level > 0 && st->ss->external) {
/* make sure mdmon is aware of the new level */
next prev parent reply other threads:[~2011-02-08 13:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-08 13:30 [PATCH 0/6] Reshape fixes (expansion) Adam Kwolek
2011-02-08 13:30 ` [PATCH 1/6] imsm: FIX: Wrong output string format Adam Kwolek
2011-02-08 13:30 ` [PATCH 2/6] UT FIX: imsm container can have different blocks number Adam Kwolek
2011-02-08 13:30 ` [PATCH 3/6] FIX: Compare the same units Adam Kwolek
2011-02-08 13:31 ` [PATCH 4/6] FIX: compare blocks on all data disks Adam Kwolek
2011-02-08 13:31 ` [PATCH 5/6] FIX: Container can be left frozen Adam Kwolek
2011-02-08 13:31 ` Adam Kwolek [this message]
2011-02-09 3:10 ` [PATCH 0/6] Reshape fixes (expansion) NeilBrown
2011-02-09 7:31 ` Kwolek, Adam
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=20110208133117.8787.6335.stgit@gklab-128-013.igk.intel.com \
--to=adam.kwolek@intel.com \
--cc=dan.j.williams@intel.com \
--cc=ed.ciechanowski@intel.com \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.de \
--cc=wojciech.neubauer@intel.com \
/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