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