1 |
On Sunday 24 August 2014 19:22:40 Kerin Millar wrote: |
2 |
> On 24/08/2014 14:51, Peter Humphrey wrote: |
3 |
--->8 |
4 |
> > So I decided to clean up /etc/mdadm.conf by adding these lines: |
5 |
> > |
6 |
> > DEVICE /dev/sda* /dev/sdb* |
7 |
> > ARRAY /dev/md5 devices=/dev/sda5,/dev/sdb5 |
8 |
> > ARRAY /dev/md7 devices=/dev/sda7,/dev/sdb7 |
9 |
> > ARRAY /dev/md9 devices=/dev/sda9,/dev/sdb9 |
10 |
> |
11 |
> Perhaps you should not include /dev/md5 here. |
12 |
|
13 |
I wondered about that. |
14 |
|
15 |
> As you have made a point of building the array containing the root |
16 |
> filesystem with 0.99 metadata, ... |
17 |
|
18 |
...as was instructed in the howto at the time... |
19 |
|
20 |
> I would assume that it is being assembled in kernelspace as a result of |
21 |
> CONFIG_MD_AUTODETECT being enabled. |
22 |
|
23 |
Yes, I think that's what's happening. |
24 |
|
25 |
> Alternatively, perhaps you are using an initramfs. |
26 |
|
27 |
Nope. |
28 |
|
29 |
> Either way, by the time the mdraid init.d script executes, the /dev/md5 |
30 |
> array must - by definition - be up and mounted. Does it make a |
31 |
> difference if you add the following line to the config? |
32 |
> |
33 |
> AUTO +1.x homehost -all |
34 |
> |
35 |
> That will prevent it from considering arrays with 0.99 metadata. |
36 |
|
37 |
No, I get the same result. Just a red asterisk at the left end of the line |
38 |
after "Starting up RAID devices..." |
39 |
|
40 |
Now that I look at /etc/init.d/mdraid I see a few things that aren't quite |
41 |
kosher. The first is that it runs "mdadm -As 2>&1", which returns null after |
42 |
booting is finished (whence the empty line before the asterisk). Then it tests |
43 |
for the existence of /dev/md_d*. That also doesn't exist, though /dev/md* |
44 |
does: |
45 |
|
46 |
# ls -l /dev/md* |
47 |
brw-rw---- 1 root disk 9, 0 Aug 25 10:03 /dev/md0 |
48 |
brw-rw---- 1 root disk 9, 5 Aug 25 10:03 /dev/md5 |
49 |
brw-rw---- 1 root disk 9, 7 Aug 25 10:03 /dev/md7 |
50 |
brw-rw---- 1 root disk 9, 9 Aug 25 10:03 /dev/md9 |
51 |
|
52 |
/dev/md: |
53 |
total 0 |
54 |
lrwxrwxrwx 1 root root 6 Aug 25 10:03 5_0 -> ../md5 |
55 |
lrwxrwxrwx 1 root root 6 Aug 25 10:03 7_0 -> ../md7 |
56 |
lrwxrwxrwx 1 root root 6 Aug 25 10:03 9_0 -> ../md9 |
57 |
|
58 |
Looks like I have some experimenting to do. |
59 |
|
60 |
I forgot to mention in my first post that, on shutdown, when the script runs |
61 |
"mdadm -Ss 2>&1" I always get "Cannot get exclusive access to /dev/md5..." |
62 |
I've always just ignored it until now, but perhaps it's important? |
63 |
|
64 |
> On a related note, despite upstream's efforts to make this as awkward as |
65 |
> possible, it is possible to mimic the kernel's autodetect functionality |
66 |
> in userspace with a config such as this: |
67 |
> |
68 |
> HOMEHOST <ignore> |
69 |
> DEVICE partitions |
70 |
> AUTO +1.x -all |
71 |
> |
72 |
> Bear in mind that the mdraid script runs `mdadm --assemble --scan`. |
73 |
> There is no need to specifically map out the properties of each array. |
74 |
> This is what the metadata is for. |
75 |
|
76 |
Thanks for the info, and the help. The fog is dispersing a bit... |
77 |
|
78 |
-- |
79 |
Regards |
80 |
Peter |