From: Xiao Ni <xni@redhat.com>
To: linux-raid <linux-raid@vger.kernel.org>
Subject: Start reshape failed
Date: Mon, 28 Sep 2015 04:52:26 -0400 (EDT) [thread overview]
Message-ID: <842369480.28953435.1443430346579.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <152634201.28921946.1443426236655.JavaMail.zimbra@redhat.com>
Hi Neil
When I add one disk to a 3disks raid5 and try to run --grow to let raid devices to 4.
It's failed to start reshape. I used 4.3.0-rc2 and the latest mdadm git tree.
[root@storageqe-09 md]# mdadm --grow /dev/md0 --raid-devices=4
mdadm: Failed to initiate reshape!
[root@storageqe-09 md]# uname -r
4.3.0-rc2
[root@storageqe-09 md]# mdadm --version
mdadm - v3.3.4-24-g86a406c - 28th September 2015
After some analysis, I found some hints.
A: when run --grow, it want to write reshape to sync_action. Before that, it set SET_ARRAY_INFO
in impose_reshape first. When set SET_ARRAY_INFO, it get mutex lock mddev->reconfig_mutex, and
will call mddev_resume. In mddev_resume it set MD_RECOVERY_NEEDED.
B: At the same time raid5d run. And it call md_check_recovery. But it can't get the lock
mddev->reconfig_mutex. So it misses the chance to clear MD_RECOVERY_NEEDED.
After A, it write reshape to sync_action. It calls action_store. It will return EBUSY because
the MD_RECOVERY_NEEDED is already set.
} else if (test_bit(MD_RECOVERY_RUNNING, &mddev->recovery) ||
test_bit(MD_RECOVERY_NEEDED, &mddev->recovery))
return -EBUSY;
It's a little complex. I add md_check_recovery in action_store and the problem can be fixed.
But I think maybe it's not a right way to fix this.
Could you give some suggestions?
Best Regards
Xiao
next parent reply other threads:[~2015-09-28 8:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <152634201.28921946.1443426236655.JavaMail.zimbra@redhat.com>
2015-09-28 8:52 ` Xiao Ni [this message]
2015-12-16 7:47 Start reshape failed Kev Dorman
2015-12-21 1:09 ` 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=842369480.28953435.1443430346579.JavaMail.zimbra@redhat.com \
--to=xni@redhat.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 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.