Merge lp://qastaging/~csurbhi/mdadm/mdadm-fix.728435 into lp://qastaging/~ubuntu-core-dev/mdadm/ubuntu

Proposed by Surbhi Palande
Status: Merged
Merged at revision: 6
Proposed branch: lp://qastaging/~csurbhi/mdadm/mdadm-fix.728435
Merge into: lp://qastaging/~ubuntu-core-dev/mdadm/ubuntu
Diff against target: 43 lines (+20/-3)
2 files modified
debian/changelog (+12/-0)
debian/initramfs/init-premount (+8/-3)
To merge this branch: bzr merge lp://qastaging/~csurbhi/mdadm/mdadm-fix.728435
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+54011@code.qastaging.launchpad.net

Description of the change

The udev rule for mdadm uses incremental mode to create an array and/or to add member disks to it. The correct way to start such a partially assembled array in degraded is to use the Incremental mode. So, adding the " mdadm --incremental --scan --run " to the mdadm/mountroot_failure().

Previously mdadm --assemble --scan --run worked because the arrays were stopped before scan assembling them. Assemble scan mode is good for assembling arrays not created by Incremental mode, when member disks unassociated with any array are available for assembling a *new* array. So keeping the "mdadm --assemble --scan --run" for assembling arrays which were not partially created by Incremental mode. We should ideally not land in a situation where the arrays were not incrementally created. However, should we do (due to udevd failure say), then mdadm --assemble scan will never the less assemble a new array.

Please consider this change for natty.

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) wrote :

Thanks for your contribution to Ubuntu!

I've updated lp:~ubuntu-core-dev/mdadm/ubuntu to match the current archive. Please could you merge from that branch, resolve any changelog conflicts, and then re-push to lp:~csurbhi/mdadm/mdadm-fix.728435? (You don't need to file a new merge proposal - this one will update automatically.)

Secondly, patch files in debian/patches/ should only be used when patching upstream source code. When changing files in debian/, you should just change them directly rather than with a patch file. In this case, you should just be able to undo your changes to debian/patches/, since your branch already changes debian/initramfs/init-premount as well.

Finally, there are some confusing typos in the changelog - according to mdadm(8), -r is short for --remove while -R is short for --run. As such, I think the two mentions of -Ars should be corrected to -ARs, while the mention of -Irs should be corrected to -IRs.

review: Needs Fixing
6. By Surbhi Palande

mdadm udev rule incrementally adds mdadm member when detected. Starting
such an array in degraded mode is possible by mdadm -IRs. Using mdadm -ARs
without stopping the array first does nothing when no mdarray-unassociated
device is available. Using mdadm -IRs to start a previously partially
assembled array through incremental mode. Keeping the mdadm -ARs for
assembling arrays which were for some reason not assembled through
incremental mode (i.e through mdadm's udev rule). (LP: #728435)

Revision history for this message
Colin Watson (cjwatson) wrote :

Thanks for the fixes!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches