Re: Does --freeze-reshape only work during initrd boot phase?
From: NeilBrown <hidden>
Date: 2015-05-25 02:20:33
On Fri, 22 May 2015 06:30:09 -0400 (EDT) Xiao Ni [off-list ref] 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 Attachments
- (unnamed) [application/pgp-signature] 811 bytes