From: NeilBrown <neilb@suse.de>
To: Xiao Ni <xni@redhat.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: Does --freeze-reshape only work during initrd boot phase?
Date: Mon, 25 May 2015 12:20:33 +1000 [thread overview]
Message-ID: <20150525122033.5f943aa3@notabene.brown> (raw)
In-Reply-To: <1625238601.2947919.1432290609781.JavaMail.zimbra@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 3584 bytes --]
On Fri, 22 May 2015 06:30:09 -0400 (EDT) Xiao Ni <xni@redhat.com> wrote:
> Hi all
>
> I'm trying to use --freeze-reshape, I search how to use it, there is just some
> explanation in man mdadm. And I see the main usage about this is during initrd boot phase.
> Does --freeze-reshape only work during initrd boot phase?
No it can be used at any time.
However it doesn't apply to all array types, and that isn't clear from the
documentation.
--freeze-reshape is only relevant for arrays which require a user-space
process to help with the reshape - specifically to make temporary backups of
portions of the array while they are being reshaped.
If --freeze-reshape is given, then when mdadm discovers that it needs to
start such a helper, it doesn't and just leaves reshape frozen.
If it never finds that a helper is needed, there is no value in freezing the
reshape.
I should probably improve the documentation.
NeilBrown
>
> I tried this after the machine started. The steps are as follows:
> [root@intel-canoepass-02 tmp]# mdadm -CR /dev/md0 -l5 -n5 /dev/loop[0-4] --assume-clean
> mdadm: /dev/loop0 appears to be part of a raid array:
> level=raid5 devices=5 ctime=Fri May 22 06:14:35 2015
> mdadm: /dev/loop1 appears to be part of a raid array:
> level=raid5 devices=5 ctime=Fri May 22 06:14:35 2015
> mdadm: /dev/loop2 appears to be part of a raid array:
> level=raid5 devices=5 ctime=Fri May 22 06:14:35 2015
> mdadm: /dev/loop3 appears to be part of a raid array:
> level=raid5 devices=5 ctime=Fri May 22 06:14:35 2015
> mdadm: /dev/loop4 appears to be part of a raid array:
> level=raid5 devices=5 ctime=Fri May 22 06:14:35 2015
> mdadm: Defaulting to version 1.2 metadata
> mdadm: array /dev/md0 started.
> [root@intel-canoepass-02 tmp]# mdadm /dev/md0 -a /dev/loop5
> mdadm: added /dev/loop5
> [root@intel-canoepass-02 tmp]# mdadm -Es
> ARRAY /dev/md/0 metadata=1.2 UUID=24d3d007:8ec28d4e:edb482fe:db7cab71 name=0
> spares=1
> [root@intel-canoepass-02 tmp]# mdadm -Es > /etc/mdadm.conf
> [root@intel-canoepass-02 tmp]# mdadm --grow /dev/md0 --raid-devices 6
> [root@intel-canoepass-02 tmp]# cat /proc/mdstat
> Personalities : [raid6] [raid5] [raid4]
> md0 : active raid5 loop5[5] loop4[4] loop3[3] loop2[2] loop1[1] loop0[0]
> 2043904 blocks super 1.2 level 5, 512k chunk, algorithm 2 [6/6] [UUUUUU]
> [====>................] reshape = 23.9% (122368/510976) finish=0.8min speed=7648K/sec
>
> unused devices: <none>
> [root@intel-canoepass-02 tmp]# mdadm -S /dev/md0
> mdadm: stopped /dev/md0
> [root@intel-canoepass-02 tmp]# mdadm -As --freeze-reshape
> mdadm: /dev/md/0 has been started with 6 drives.
> [root@intel-canoepass-02 tmp]# cat /proc/mdstat
> Personalities : [raid6] [raid5] [raid4]
> md0 : active raid5 loop0[0] loop5[5] loop4[4] loop3[3] loop2[2] loop1[1]
> 2043904 blocks super 1.2 level 5, 512k chunk, algorithm 2 [6/6] [UUUUUU]
> [=========>...........] reshape = 46.9% (240128/510976) finish=0.1min speed=23808K/sec
>
> unused devices: <none>
>
> The reshape is not freeze. I think it should be freeze now, am I right? The reason I want to
> use this is that I want to use --grow --continue. I see --continue is used when reshape is
> interrupted.
>
> Best Regards
> Xiao
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 811 bytes --]
prev parent reply other threads:[~2015-05-25 2:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <2047702950.2945677.1432290136375.JavaMail.zimbra@redhat.com>
2015-05-22 10:30 ` Does --freeze-reshape only work during initrd boot phase? Xiao Ni
2015-05-25 2:20 ` NeilBrown [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=20150525122033.5f943aa3@notabene.brown \
--to=neilb@suse.de \
--cc=linux-raid@vger.kernel.org \
--cc=xni@redhat.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;
as well as URLs for NNTP newsgroup(s).