1 |
On 25/08/2014 10:22, Peter Humphrey wrote: |
2 |
> On Sunday 24 August 2014 19:22:40 Kerin Millar wrote: |
3 |
>> On 24/08/2014 14:51, Peter Humphrey wrote: |
4 |
> --->8 |
5 |
>>> So I decided to clean up /etc/mdadm.conf by adding these lines: |
6 |
>>> |
7 |
>>> DEVICE /dev/sda* /dev/sdb* |
8 |
>>> ARRAY /dev/md5 devices=/dev/sda5,/dev/sdb5 |
9 |
>>> ARRAY /dev/md7 devices=/dev/sda7,/dev/sdb7 |
10 |
>>> ARRAY /dev/md9 devices=/dev/sda9,/dev/sdb9 |
11 |
>> |
12 |
>> Perhaps you should not include /dev/md5 here. |
13 |
> |
14 |
> I wondered about that. |
15 |
> |
16 |
>> As you have made a point of building the array containing the root |
17 |
>> filesystem with 0.99 metadata, ... |
18 |
> |
19 |
> ...as was instructed in the howto at the time... |
20 |
> |
21 |
>> I would assume that it is being assembled in kernelspace as a result of |
22 |
>> CONFIG_MD_AUTODETECT being enabled. |
23 |
> |
24 |
> Yes, I think that's what's happening. |
25 |
> |
26 |
>> Alternatively, perhaps you are using an initramfs. |
27 |
> |
28 |
> Nope. |
29 |
> |
30 |
>> Either way, by the time the mdraid init.d script executes, the /dev/md5 |
31 |
>> array must - by definition - be up and mounted. Does it make a |
32 |
>> difference if you add the following line to the config? |
33 |
>> |
34 |
>> AUTO +1.x homehost -all |
35 |
>> |
36 |
>> That will prevent it from considering arrays with 0.99 metadata. |
37 |
> |
38 |
> No, I get the same result. Just a red asterisk at the left end of the line |
39 |
> after "Starting up RAID devices..." |
40 |
|
41 |
It since dawned upon me that defining AUTO as such won't help because |
42 |
you define the arrays explicitly. Can you try again with the mdraid |
43 |
script in the default runlevel but without the line defining /dev/md5? |
44 |
|
45 |
> |
46 |
> Now that I look at /etc/init.d/mdraid I see a few things that aren't quite |
47 |
> kosher. The first is that it runs "mdadm -As 2>&1", which returns null after |
48 |
> booting is finished (whence the empty line before the asterisk). Then it tests |
49 |
|
50 |
Interesting. I think that you should file a bug because the implication |
51 |
is that mdadm is returning a non-zero exit status in the case of arrays |
52 |
that have already been assembled. Here's a post from the Arch forums |
53 |
suggesting the same: |
54 |
|
55 |
https://bbs.archlinux.org/viewtopic.php?pid=706175#p706175 |
56 |
|
57 |
Is the exit status something other than 1? Try inserting eerror "$?" |
58 |
immediately after the call to mdadm -As. Granted, it's just an annoyance |
59 |
but it looks silly, not to mention unduly worrying. |
60 |
|
61 |
> for the existence of /dev/md_d*. That also doesn't exist, though /dev/md* |
62 |
> does: |
63 |
> |
64 |
> # ls -l /dev/md* |
65 |
> brw-rw---- 1 root disk 9, 0 Aug 25 10:03 /dev/md0 |
66 |
> brw-rw---- 1 root disk 9, 5 Aug 25 10:03 /dev/md5 |
67 |
> brw-rw---- 1 root disk 9, 7 Aug 25 10:03 /dev/md7 |
68 |
> brw-rw---- 1 root disk 9, 9 Aug 25 10:03 /dev/md9 |
69 |
> |
70 |
> /dev/md: |
71 |
> total 0 |
72 |
> lrwxrwxrwx 1 root root 6 Aug 25 10:03 5_0 -> ../md5 |
73 |
> lrwxrwxrwx 1 root root 6 Aug 25 10:03 7_0 -> ../md7 |
74 |
> lrwxrwxrwx 1 root root 6 Aug 25 10:03 9_0 -> ../md9 |
75 |
> |
76 |
|
77 |
I think this has something to do with partitionable RAID. Yes, it is |
78 |
possible to superimpose partitions upon an md device, though I have |
79 |
never seen fit to do so myself. For those that do not, the md_d* device |
80 |
nodes won't exist. |
81 |
|
82 |
> Looks like I have some experimenting to do. |
83 |
> |
84 |
> I forgot to mention in my first post that, on shutdown, when the script runs |
85 |
> "mdadm -Ss 2>&1" I always get "Cannot get exclusive access to /dev/md5..." |
86 |
> I've always just ignored it until now, but perhaps it's important? |
87 |
|
88 |
I would guess that it's because a) the array hosts the root filesystem |
89 |
b) you have the array explicitly defined in mdadm.conf and mdadm is |
90 |
being called with -s/--scan again. |
91 |
|
92 |
> |
93 |
>> On a related note, despite upstream's efforts to make this as awkward as |
94 |
>> possible, it is possible to mimic the kernel's autodetect functionality |
95 |
>> in userspace with a config such as this: |
96 |
>> |
97 |
>> HOMEHOST <ignore> |
98 |
>> DEVICE partitions |
99 |
>> AUTO +1.x -all |
100 |
>> |
101 |
>> Bear in mind that the mdraid script runs `mdadm --assemble --scan`. |
102 |
>> There is no need to specifically map out the properties of each array. |
103 |
>> This is what the metadata is for. |
104 |
> |
105 |
> Thanks for the info, and the help. The fog is dispersing a bit... |
106 |
> |