Description of problem: When a temporarily missing RAID 1 component becomes available, an incremental assembly should consult the write intent map and resynchronize the device with those blocks recorded as changed. Instead, "mdadm -I --run /dev/sdc1" declares the temporarily missing component "invalid". Version-Release number of selected component (if applicable): mdadm-3.2.2-125.fc16.x86_64 kernel-3.1.5-6.fc16.x86_64 How reproducible: Always. Steps to Reproduce: 1. Create a RAID 1 device as so: mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb1 --write-mostly /dev/sdc1 --bitmap=/var/preserve/vg_extern0 --assume-clean 3. Record the result of "mdadm -D --brief /dev/md0" in /etc/mdadm.conf: ARRAY /dev/md0 metadata=1.2 bitmap=/var/preserve/extern0 name=myhost:md0 UUID=c84d260e:f10d4241:af5e0c24:1f18d143 2. Use the RAID device (i.e., create a logical volume group containing it, put a file system on one of the logical volumes). This works as expected. 3. Shut down the system. 4. Physically disconnect the /dev/sdc device. Leave /dev/sdb connected. 5. Boot the system. /dev/md0 will be assembled and run with the one available component. 6. Use the RAID 1 device. Activate the logical volume, mount the filesystem from it, and write a file in that file system. 7. Shut down the system. 8. Physically reattach the /dev/sdc device. 9. Boot the system. 10. /dev/md0 will be created with only the /dev/sdb component participating. 11. sudo mdadm -I --run /dev/sdc1 Actual results: mdadm: failed to add /dev/sdc1 to /dev/md0: Invalid argument. Expected results: /dev/sdc1 to participate in the RAID 1 array, and shown to by synchronizing in results of "cat /proc/mdstat". If the writes made to the one RAID component were small, the synchronization will be finished before you can observe the synchronization state, and the RAID device will contain both components up to date "[UU]". Additional info: This worked as expected in Fedora 14.
Stephen, What is the output from mdadm when you try to add the second device? It has to be more than just 'Invalid argument' Second, you shouldn't need to add --run when specifying -I, I don't know if that makes any difference. Jes
Stephen, Ok, I tried reproducing the bug here, and it looks like I am seeing the exact same as you. I will try and investigate further. Jes
Ok, this is strange. If I try to add the drive this way: mdadm -I --run /dev/sdf3 I get the same error as you. On the other hand if I do the following, it works just fine: mdadm -a /dev/md42 /dev/sdf3 Looks like something isn't detected correctly by either the kernel or mdadm when doing an Incremental add. This happens with the latest mdadm from Neil's git tree and Linus' top of tree kernel as well btw. Jes
Thanks for pursuing this and sorry for not responding; I'd been under the weather. I'll see if the "-a" version does what I need - if the write intent map gets ignored, I end up with a 16 hour sync that needs to finish in a 10 hour window.
Stephen, No worries, I've been battling being under the weather myself. I think you have a genuine bug here, but -a seems to work as a workaround for me. I think it respects the bitmap, but I would certainly appreciate it if you can confirm that it does. I will continue investigating why -I doesn't do the right thing. Cheers, Jes
I'm pleased to report that, with the -a workaround, the write intent map works as hoped. Thanks, - Stephen
Stephen, Thanks for confirming this. This means at least the core infrastructure seems to be working as expected. I'll look into why it doesn't do the right thing with -I Cheers, Jes
mdadm-3.2.3-7.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/mdadm-3.2.3-7.fc16
I have pushed mfadm-3.2.3-7 into updates-testing which should fix this problem. It solves the problem in my testing. Please give it a spin and report back. Thanks, Jes
I pulled the package from http://kojipkgs.fedoraproject.org/packages/mdadm/3.2.3/7.fc16/x86_64/mdadm-3.2.3-7.fc16.x86_64.rpm and it now works as expected for me. Thanks!
Package mdadm-3.2.3-7.fc16: * should fix your issue, * was pushed to the Fedora 16 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing mdadm-3.2.3-7.fc16' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-5032/mdadm-3.2.3-7.fc16 then log in and leave karma (feedback).
mdadm-3.2.3-7.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.
mdadm-3.2.3-9.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/mdadm-3.2.3-9.fc16
mdadm-3.2.4-2.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/mdadm-3.2.4-2.fc16
mdadm-3.2.4-3.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/mdadm-3.2.4-3.fc16
mdadm-3.2.5-1.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/mdadm-3.2.5-1.fc16
mdadm-3.2.5-1.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.