Bug 441633 - mdadm failed to set --write-mostly when --add a device
mdadm failed to set --write-mostly when --add a device
Status: CLOSED NEXTRELEASE
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: mdadm (Show other bugs)
5.0
All Linux
low Severity medium
: rc
: ---
Assigned To: Doug Ledford
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-09 04:19 EDT by masanari iida
Modified: 2008-04-09 22:20 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-04-09 11:16:26 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description masanari iida 2008-04-09 04:19:51 EDT
Description of problem:
I can set --write-mostly when I initially create an md.
If one of the device failed and I wanted to re-add
the device, I could not set --write-mostly with --add option.

Version-Release number of selected component (if applicable):
mdadm-2.5.4-3.el5

How reproducible:
Always

Steps to Reproduce:
1. Create RAID1 device.
One of a device has a "write-mostly" setting.

2. Make "fail" one of the device within RAID1.
This device has a "write-mostly" flag.
/sbin/mdadm --fail /dev/md0 /dev/VolGroup00/realdisk

3. Remove the failed device from md0.
/sbin/mdadm -r /dev/md0 /dev/VolGroup00/realdisk

4. Re-add the device with "--write-mostly" option
/sbin/mdadm /dev/md0 --add /dev/VolGroup00/realdisk --write-mostly
 or
/sbin/mdadm /dev/md0 --add --write-mostly /dev/VolGroup00/realdisk

Actual results:
The "--add" works ok, but "--write-mostly" flag is not in the
"state" part of the mdadm -D output.

Expected results:
The disk should be added into md with write-mostly option enabled.

Additional info:
The man page said  "subsequent device lists in --build, --create
or --add command will be flagged as write-mostly."
But as I test the "--add" with write-mostly, it didn't work.

As I see mdadm upstream site, this symptom seemed to be fixed.
http://neilb.web.cse.unsw.edu.au/source/mdadm/ANNOUNCE

> Release 2.6.4 adds a few minor bug fixes to 2.6.3
> 
> Changelog Entries:
>    -   Make "--create --auto=mdp" work for non-standard device names.
>    -   Fix restarting of a 'reshape' if it was stopped in the middle.
>    -   Fix a segfault when using v1 superblock.
>    -   Make --write-mostly effective when re-adding a device to an array. <==

So I request Red Hat to back port this bug fix.
Comment 1 Doug Ledford 2008-04-09 11:16:26 EDT
mdadm-2.6.4-1.el5 is already part of the rhel5.2 beta release.
Comment 2 masanari iida 2008-04-09 22:20:47 EDT
Download mdadm-2.6.4-1.el5 from RHN beta channel,
and I did the same test.

I have confirmed  --add with --write-mostly option works OK now.

Thanks

Note You need to log in before you can comment on or make changes to this bug.