I not only have a TODO list for linux/md/raid, but for mdadm -- the userspace md management tool -- too.
It is mostly focussed on getting 2.0 ready for release, but there are some bits that can wait until after 2.0
It includes a test-suite, a '--hostid' flag to tie arrays to host and make automatic assembly more possible, and improvements to support for version-1 superblocks.
# better error messages
# bitmap with version-1 superblock
# convert a single device into a linear
# --assume-clean for --create
# have --add remove the device first if it is failed
# Version-1 superblocks
# check and remove old superblocks on create
I really need a testsuite for mdadm. It does too many things and has broken too often for me to be confident in a new release without one.
This will probably involve creating some loop-back devices and building lots of different arrays with them.
It needs to test version0.90 and version1 superblocks, raid0, 1, 4, 5, 6, 10, linear, multipath, and various flavours of these (particularly raid10).
It needs to auto-create names in /dev.
It needs to work with config files and without
All different options in all different modes need to be tested.
Finding the right structure for it all will be the hard bit.
mdadm should never simply report an error code from the kernel, as the codes were not designed for md. It should always interpret and try to explain what really is going wrong. With --verbose it should sometimes give even more detail.
When creating a verion-1 array, we should leave room for an internal superblock, and allow it to be added afterwards.
This is a biggy.
The reason I don't like auto-discovery and auto-assembly is that if you pull drives from one machine and plug them into another, they might get autoassembled in the wrong place.
The fix for this is to encode something about the host machine into the superblock so that 'foreign' devices can be recognised. A 'hostname' would be ideal, if this were available.
--hostid=XXX would, on create, encode XXX, or a hash thereof into the UUID or NAME field of the superblock, and on assemble would look for only those uuids.
This is what people seem to expect. Either we do it, or we give a better error message.
There are currently some oddities when reporting on version-1 superblocks as spares are handled differently, and the position in the array is different from the role in the RAID. This all needs to be resolved.