Transitioning to use MDADM by default for some of the FakeRAID devices

Registered by Dimitri John Ledkov

[USER STORIES]
* configured supported external metadata RAIDs just work with assembly by smdadm and monitored with mdmon
* ubuntu specific dmraid45 kernel module is no longer required for dmraid operations

[ASSUMPTIONS]
* other external metadata RAID continues to be functioning with dmraid
* one can choose to not use mdadm or fallback to dmraid on per metadata format
* on upgrade, mdadm takes over assembling (DDF / ISW) from dmraid
* dmraid45 kernel module usage is superseded by using other stock kernel modules in dmraid

[RISKS]
* mdadm failing to assemble devices previously managed by dmraid, and dmraid assembly disabled.
* dmraid45 kernel module usage is not replaced with stock kernel modules in dmraid

[IN SCOPE]
* rootfs on DDF/ISW managed with dmraid or mdadm
* other partitions on DDF/ISW managed with dmraid or mdadm
* multiple dmraid and mdadm managed external metadata RAID (some managed by dmraid and some by mdadm)

[OUT OF SCOPE]
* d-i / ubiquity support

[USER ACCEPTANCE]

[RELEASE NOTE/BLOG]
mdadm is now used to manage Intel® Matrix Storage Technology RAID devices.
dmraid45 kernel module is no longer required by dmraid user-space utility.

[TEST PLAN]

* [DONE] Make sure dmraid alone can be upgraded from precise -> trusty
* [DONE] Make sure mdadm alone can be upgraded from precise -> trusty
* [DONE] Make sure when both dmraid & mdadm are installed, upgrading either from precise -> trusty pull-in a compatible second package (using breaks)
* Make sure mdadm fallsback to dmraid, upon separate requests to do so for DDF & ISW
* Make sure new dmraid can assemble RAID4 and RAID5
* Make sure new mdadm can assemble non-root DDF & ISW
* Make sure new mdadm can assemble root-fs DDF & ISW
* (possibly make sure installer uses mdadm to install fakeraid devices)
* (possibly make sure ubiquity uses mdadm to activate existing fakeraid devices)

Blueprint information

Status:
Not started
Approver:
Steve Langasek
Priority:
Undefined
Drafter:
Dimitri John Ledkov
Direction:
Needs approval
Assignee:
Dimitri John Ledkov
Definition:
Pending Approval
Series goal:
Accepted for trusty
Implementation:
Unknown
Milestone target:
None

Whiteboard

[vUDS whiteboard notes]

mdadm has gained ability to manage external metadata raid devices (fakeraid) which previously were managed by dmraid package.
For some devices, e.g. Intel Matrix Raid (aka imsm and other names), mdadm is preferred over dmraid.
Discuss and draft implementation plan to transition to mdadm by default:
Installer
review, merge & fix mdadm external metadata d-i/partman patches
Initramfs
new installs should default to mdadm
how to transition existing dmraid/imsm users to mdadm
Consider DDF and other devices supported by dmraid, which are not supported by imsm

* will need ubiquity support
 * debian installer enablement will bring much of this, but will need extra dialogs

* dmraid45

* dmraid4-5 kernel module
 * we want to deprecate this as it has been abandoned upstream in favour of dmraid (md under LVM)

 * there are only three controllers supported by dmraid4-5
  * intel
   * this is already supported by mdadm
   * we have a couple of these for testing
  * DDF
   * this may be already supported, but it is not clear as yet
   * we have no h/w to confirm/deny this currently
  * nvidia

We should definatly drop this old support for T+1. It should have very few users as it is mostly only useful for sharing with windows, or if you set it up in BIOS.

* Request who needs dmraid45 (with nvidia)

* get stats who uses dmraid45 (launchpad bug crawl)

* fallback - add quirks to check for unsupported (e.g. missing dmraid45 kernel module with no alternative user-space, or not updated dmraid, etc.)

==============

Required changes:

* New and upgraded installations should use mdadm for fakeraid configurations (Intel Matrix & DDF)
* A fallback/revert path back to dmraid should be provided
* dmraid45 kernel module should be deprecated

==============

(?)

Work Items

Work items for ubuntu-14.04:
[brad-figg] See if it's possible to get statistics on dm_raid45 use: DONE
[xnox] integrate d-i installation with mdadm/mdmon instead of dmraid: INPROGRESS
[xnox] make sure ubiquity correctly calls dmraid or mdadm to auto-assemble fake-raids, if any are present: TODO
[xnox] make necessary changes to initramfs-tools to start mdmon from initramfs, if rootfs is on fake-raid: DONE
[xnox] make upgrades from dmraid -> mdadm work: INPROGRESS
[xnox] upgrade / downgrade (older initramfs/kernels), dmraid fallback testing: DONE
[smb] investigate to make dmraid use the dm-raid module instead of dm-raid45 for raid4 and raid5: DONE