From: Oleksandr Shchirskyi <oleksandr.shchirskyi@linux.intel.com>
To: Nigel Croxon <ncroxon@redhat.com>, linux-raid@vger.kernel.org
Cc: "Tkaczyk, Mariusz" <mariusz.tkaczyk@linux.intel.com>,
Jes Sorensen <jes@trained-monkey.org>
Subject: Re: [PATCH] mdadm: fix reshape from RAID5 to RAID6 with backup file
Date: Mon, 22 Mar 2021 17:21:11 +0100 [thread overview]
Message-ID: <08b71ea7-bdd3-722d-d18f-aa065b8756c0@linux.intel.com> (raw)
In-Reply-To: <764426808.38181143.1615910368475.JavaMail.zimbra () redhat ! com>
Hello Nigel,
I have collected more info regarding this issue.
I can confirm what Mariusz said, it's a regression caused by patch 4ae96c802203
The reason for failure during the reshape, is that in this patch sync_max
value is set to max, but the function wait_for_reshape_imsm, used in some
reshape scenarios, relies on this parameter, and doesn't expect, that value
can be max. This leads to reshaping fail.
Here's an example of a debug log from this method, when the issue is hit:
mdadm: wait_for_reshape_imsm: wrong next position to set 4096 (2048)
mdadm: imsm_manage_reshape: wait_for_reshape_imsm returned error!
With this patch reverted, the issue is not observed. See my logs below:
# mdadm -CR imsm0 -e imsm -n4 /dev/nvme[0-3]n1 && mdadm -CR volume -l0
--chunk 64 --size=10G --raid-devices=1 /dev/nvme0n1 --force
# mdadm -D /dev/md/volume
/dev/md/volume:
Container : /dev/md/imsm0, member 0
Raid Level : raid0
Array Size : 10485760 (10.00 GiB 10.74 GB)
Raid Devices : 1
Total Devices : 1
State : clean
...
# mdadm -G /dev/md/imsm0 -n2
# mdadm -D /dev/md/volume
/dev/md/volume:
Container : /dev/md/imsm0, member 0
Raid Level : raid4
Array Size : 10485760 (10.00 GiB 10.74 GB)
Used Dev Size : 10485760 (10.00 GiB 10.74 GB)
Raid Devices : 3
Total Devices : 2
State : clean, degraded
...
# git revert 4ae96c802203ec3cfbb089240c56d61f7f4661b3
Auto-merging Grow.c
[master 1166854] Revert "mdadm: fix reshape from RAID5 to RAID6 with backup
file"
1 file changed, 2 insertions(+), 5 deletions(-)
# mdadm -Ss; wipefs -a /dev/nvme[0-3]n1
# make clean; make; make install-systemd; make install
# mdadm -CR imsm0 -e imsm -n4 /dev/nvme[0-3]n1 && mdadm -CR volume -l0
--chunk 64 --size=10G --raid-devices=1 /dev/nvme0n1 --force
# mdadm -G /dev/md/imsm0 -n2
# mdadm -D /dev/md/volume
/dev/md/volume:
Container : /dev/md/imsm0, member 0
Raid Level : raid0
Array Size : 20971520 (20.00 GiB 21.47 GB)
Raid Devices : 2
Total Devices : 2
State : clean
...
#
On 3/16/2021 4:59 PM, Nigel Croxon wrote:
> ----- Original Message -----
> From: "Mariusz Tkaczyk" <mariusz.tkaczyk@linux.intel.com>
> To: "Jes Sorensen" <jes@trained-monkey.org>, "Nigel Croxon" <ncroxon@redhat=
> .com>, linux-raid@vger.kernel.org, xni@redhat.com
> Sent: Tuesday, March 16, 2021 10:54:22 AM
> Subject: Re: [PATCH] mdadm: fix reshape from RAID5 to RAID6 with backup fil=
> e
>
> Hello Nigel,
>
> Blame told us, that yours patch introduce regression in following
> scenario:
>
> #mdadm -CR imsm0 -e imsm -n4 /dev/nvme[0125]n1
> #mdadm -CR volume -l0 --chunk 64 --raid-devices=3D1 /dev/nvme0n1 --force
> #mdadm -G /dev/md/imsm0 -n2
>
> At the end of reshape, level doesn't back to RAID0.
> Could you look into it?
> Let me know, if you need support.
>
> Thanks,
> Mariusz
>
> I=E2=80=99m trying your situation without my patch (its reverted) and I=E2=
> =80=99m not seeing success.
> See the dmesg log.
>
>
> [root@fedora33 mdadmupstream]# mdadm -CR volume -l0 --chunk 64 --raid-devic=
> es=3D1 /dev/nvme0n1 --force
> mdadm: /dev/nvme0n1 appears to be part of a raid array:
> level=3Dcontainer devices=3D0 ctime=3DWed Dec 31 19:00:00 1969
> mdadm: Creating array inside imsm container md127
> mdadm: array /dev/md/volume started.
>
> [root@fedora33 mdadmupstream]# cat /proc/mdstat=20
> Personalities : [raid6] [raid5] [raid4] [raid0]=20
> md126 : active raid0 nvme0n1[0]
> 500102144 blocks super external:/md127/0 64k chunks
>
> md127 : inactive nvme3n1[3](S) nvme2n1[2](S) nvme1n1[1](S) nvme0n1[0](S)
> 4420 blocks super external:imsm
>
> unused devices: <none>
> [root@fedora33 mdadmupstream]# mdadm -G /dev/md/imsm0 -n2
> [root@fedora33 mdadmupstream]# cat /proc/mdstat=20
> Personalities : [raid6] [raid5] [raid4] [raid0]=20
> md126 : active raid4 nvme3n1[2] nvme0n1[0]
> 500102144 blocks super external:-md127/0 level 4, 64k chunk, algorithm=
> 5 [2/1] [U_]
>
> md127 : inactive nvme3n1[3](S) nvme2n1[2](S) nvme1n1[1](S) nvme0n1[0](S)
> 4420 blocks super external:imsm
>
> unused devices: <none>
>
>
> dmesg says:
> [Mar16 11:46] md/raid:md126: device nvme0n1 operational as raid disk 0
> [ +0.011147] md/raid:md126: raid level 4 active with 1 out of 2 devices, a=
> lgorithm 5
> [ +0.044605] md/raid0:md126: raid5 must have missing parity disk!
> [ +0.000002] md: md126: raid0 would not accept array
>
> -Nigel
>
--
Regards,
Oleksandr Shchirskyi
next parent reply other threads:[~2021-03-22 16:22 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <764426808.38181143.1615910368475.JavaMail.zimbra () redhat ! com>
2021-03-22 16:21 ` Oleksandr Shchirskyi [this message]
2021-03-22 16:47 ` [PATCH] mdadm: fix reshape from RAID5 to RAID6 with backup file Nigel Croxon
2021-03-22 17:16 ` Nigel Croxon
2021-03-22 17:41 ` Oleksandr Shchirskyi
2021-03-23 16:36 ` Nigel Croxon
2021-03-23 20:58 ` Oleksandr Shchirskyi
2021-03-26 11:59 ` Nigel Croxon
2021-04-01 20:49 ` Jes Sorensen
2021-04-02 9:40 ` Oleksandr Shchirskyi
2021-04-06 18:31 ` Jes Sorensen
2021-01-20 20:05 Nigel Croxon
2021-02-16 14:28 ` Nigel Croxon
2021-02-26 22:06 ` Jes Sorensen
2021-03-16 14:54 ` Tkaczyk, Mariusz
2021-03-16 15:21 ` Nigel Croxon
2021-03-16 15:51 ` Nigel Croxon
2021-03-16 15:59 ` Nigel Croxon
2021-03-17 8:34 ` Tkaczyk, Mariusz
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=08b71ea7-bdd3-722d-d18f-aa065b8756c0@linux.intel.com \
--to=oleksandr.shchirskyi@linux.intel.com \
--cc=jes@trained-monkey.org \
--cc=linux-raid@vger.kernel.org \
--cc=mariusz.tkaczyk@linux.intel.com \
--cc=ncroxon@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).