From: Andy Smith <andy@strugglers.net>
To: NeilBrown <neilb@suse.de>
Cc: linux-raid@vger.kernel.org
Subject: Re: Shrinking number of devices on a RAID-10 (near 2) array
Date: Fri, 29 Aug 2014 20:45:04 +0000 [thread overview]
Message-ID: <20140829204502.GT19874@bitfolk.com> (raw)
In-Reply-To: <20140829160443.3893adaa@notabene.brown>
Hi Neil,
On Fri, Aug 29, 2014 at 04:04:43PM +1000, NeilBrown wrote:
> On Fri, 29 Aug 2014 04:42:26 +0000 Andy Smith <andy@strugglers.net> wrote:
> > In fact I can't increase it by 1, and /bin/echo doesn't say why.
> >
>
> Hmm.... I've obviously been assuming something that was wrong.
>
> So I did some experiments myself....
>
> If you apply the following patch to mdadm, stop the array, and then assemble
> with --update=devicesize, you should then be able to reshape the array to
> fewer devices.
Thanks, I think we are getting somewhere:
# ./mdadm --stop /dev/md2
mdadm: stopped /dev/md2
# ./mdadm --assemble --update=devicesize /dev/md2
Size was 618726528
Size is 618727392
Size was 618726528
Size is 618727392
Size was 618726528
Size is 618727392
Size was 618726528
Size is 618727392
Size was 618726528
Size is 618727392
Size was 618726528
Size is 618727392
mdadm: /dev/md2 has been started with 6 drives.
# logout
$ head -5 /proc/mdstat
Personalities : [raid1] [raid10]
md2 : active raid10 sdd3[0] sda3[5] sdc3[4] sdb3[3] sdf3[2] sde3[1]
928089792 blocks super 1.0 64K chunks 2 near-copies [6/6] [UUUUUU]
$ sudo ./mdadm /dev/md2 --grow --raid-devices=4
mdadm: this change will reduce the size of the array.
use --grow --array-size first to truncate array.
e.g. mdadm --grow /dev/md2 --array-size 618726528
unfreeze
$ sudo ./mdadm --grow /dev/md2 --array-size 618726528
$ sudo ./mdadm /dev/md2 --grow --raid-devices=4
$ head -5 /proc/mdstat
Personalities : [raid1] [raid10]
md2 : active raid10 sdd3[0] sda3[5] sdc3[4] sdb3[3] sdf3[2] sde3[1]
618726528 blocks super 1.0 64K chunks 2 near-copies [4/4] [UUUU]
[>....................] reshape = 0.0% (211136/618726528) finish=244.1min speed=42227K/sec
> Thanks for your patience.
No problem, glad we got to the bottom of it!
Cheers,
Andy
next prev parent reply other threads:[~2014-08-29 20:45 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-23 16:31 Shrinking number of devices on a RAID-10 (near 2) array Andy Smith
2014-08-24 3:09 ` NeilBrown
2014-08-24 6:28 ` Craig Curtin
2014-08-24 6:45 ` NeilBrown
2014-08-24 13:19 ` Andy Smith
2014-08-24 14:39 ` Andy Smith
2014-08-25 10:32 ` Andy Smith
2014-08-25 11:26 ` NeilBrown
2014-08-25 11:34 ` Andy Smith
2014-08-28 9:53 ` Andy Smith
2014-08-29 3:53 ` NeilBrown
2014-08-29 4:02 ` Andy Smith
2014-08-29 4:18 ` NeilBrown
2014-08-29 4:26 ` Andy Smith
2014-08-29 4:35 ` NeilBrown
2014-08-29 4:42 ` Andy Smith
2014-08-29 6:04 ` NeilBrown
2014-08-29 20:45 ` Andy Smith [this message]
2014-08-29 20:47 ` [PATCH 1/1] Grow: Report when grow needs metadata update Andy Smith
2014-09-03 3:28 ` 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=20140829204502.GT19874@bitfolk.com \
--to=andy@strugglers.net \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.de \
/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).