Bug 1885665
| Summary: | do no support write_behind disks with clustered bitmaps | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Nigel Croxon <ncroxon> |
| Component: | mdadm | Assignee: | XiaoNi <xni> |
| Status: | CLOSED ERRATA | QA Contact: | Fine Fan <ffan> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 8.3 | CC: | cwei, dledford, heinzm, jbrassow, ncroxon, xni |
| Target Milestone: | rc | Keywords: | Triaged |
| Target Release: | 8.6 | Flags: | pm-rhel:
mirror+
|
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | mdadm-4.2-rc3.el8 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-05-10 15:29:19 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Nigel Croxon
2020-10-06 16:09:44 UTC
/might/ be allowable if all machines have the same view and it is not allowed to change in an uncoordinated way. Need to discuss. (Perhaps disallowing is the best coarse of action until it can be assessed.) Reason:
Signed-off-by: Nigel Croxon <ncroxon>
---
Create.c | 9 +++++++--
Grow.c | 5 +++++
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/Create.c b/Create.c
index 6f84e5b..de9cdc4 100644
--- a/Create.c
+++ b/Create.c
@@ -898,8 +898,13 @@ int Create(struct supertype *st, char *mddev,
else
inf->disk.state = 0;
- if (dv->writemostly == FlagSet)
- inf->disk.state |= (1<<MD_DISK_WRITEMOSTLY);
+ if (dv->writemostly == FlagSet) {
+ if (major_num == BITMAP_MAJOR_CLUSTERED) {
+ pr_err("Can not set --write-mostly with a clustered bitmap\n");
+ goto abort_locked;
+ } else
+ inf->disk.state |= (1<<MD_DISK_WRITEMOSTLY);
+ }
if (dv->failfast == FlagSet)
inf->disk.state |= (1<<MD_DISK_FAILFAST);
diff --git a/Grow.c b/Grow.c
index 57db7d4..eea9ff1 100644
--- a/Grow.c
+++ b/Grow.c
@@ -421,6 +421,11 @@ int Grow_addbitmap(char *devname, int fd, struct context *c, struct shape *s)
dv = map_dev(disk.major, disk.minor, 1);
if (!dv)
continue;
+ if (((disk.state & (1 << MD_DISK_WRITEMOSTLY)) == 0) &&
+ (strcmp(s->bitmap_file, "clustered") == 0)) {
+ pr_err("disks marked write-mostly are not supported with clustered bitmap\n");
+ return 1;
+ }
fd2 = dev_open(dv, O_RDWR);
if (fd2 < 0)
continue;
--
2.18.4
Move it to ITM 22 Move ITM to 24 Move ITM to 26 On 8/23/21 8:48 AM, Nigel Croxon wrote: > Do not support creating an MD array on a clustered system > (--bitmap=clustered) and disks with the write mostly > (--write-mostly) flag set. > > Or do not grow an MD array on a non-clustered bitmap to a > clustered bitmap with disks having the write mostly flag set. > > The actual results is the MD array is created successfully. > But the expected results should be a failure with an > error message stating: > Can not set --write-mostly with a clustered bitmap. > and disks marked write-mostly are not supported with clustered bitmap. > > V2: > Added the device name in the error message during creation: > mdadm -CR /dev/md0 -l1 --raid-devices=2 /dev/sda --write-mostly /dev/sdb --bitmap=clustered > mdadm: Can not set /dev/sdb --write-mostly with a clustered bitmap. > > Added the array name in the error message when growing: > mdadm --grow /dev/md0 --bitmap=clustered > mdadm: /dev/md0 disks marked write-mostly are not supported with clustered bitmap > > Signed-off-by: Nigel Croxon <ncroxon> > --- > Create.c | 9 +++++++-- > Grow.c | 5 +++++ > 2 files changed, 12 insertions(+), 2 deletions(-) > Applied! Thanks Jes Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (mdadm bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2022:2087 |