On 24/08/2014 14:51, Peter Humphrey wrote:
Hello list,
For several years I've been running with / on /dev/md5 (0.99 metadata), which
is built on /dev/sd[ab]5. At each boot I see a message scroll by saying
something like "No devices found in config file or automatically" and then lvm
LVM does not handle md arrays.
continues to assemble md5 anyway and mount its file system. The rest of my
partitions are on /dev/md7 (1.0 metadata), which is built on /dev/sd[ab]7. Oh,
except for /boot, which is on /dev/sda1 with a copy on /dev/sdb1.
So I decided to clean up /etc/mdadm.conf by adding these lines:
DEVICE /dev/sda* /dev/sdb*
ARRAY /dev/md5 devices=/dev/sda5,/dev/sdb5
ARRAY /dev/md7 devices=/dev/sda7,/dev/sdb7
ARRAY /dev/md9 devices=/dev/sda9,/dev/sdb9
Perhaps you should not include /dev/md5 here. As you have made a point
of building the array containing the root filesystem with 0.99 metadata,
I would assume that it is being assembled in kernelspace as a result of
CONFIG_MD_AUTODETECT being enabled. Alternatively, perhaps you are using
an initramfs.
Either way, by the time the mdraid init.d script executes, the /dev/md5
array must - by definition - be up and mounted. Does it make a
difference if you add the following line to the config?
AUTO +1.x homehost -all
That will prevent it from considering arrays with 0.99 metadata.
On a related note, despite upstream's efforts to make this as awkward as
possible, it is possible to mimic the kernel's autodetect functionality
in userspace with a config such as this:
HOMEHOST <ignore>
DEVICE partitions
AUTO +1.x -all
Bear in mind that the mdraid script runs `mdadm --assemble --scan`.
There is no need to specifically map out the properties of each array.
This is what the metadata is for.
--Kerin