1 |
Greetings, |
2 |
|
3 |
I discovered a possible reason for mdadm always marking my raid array as |
4 |
bad on reboot. The problem is I don't know how to check for the issue. |
5 |
|
6 |
When using root on a native mdadm raid, the kernel handles the array |
7 |
state transition at shutdown, so it's not a big deal. However, it's |
8 |
different when using external metadata - mdadm must be called before the |
9 |
reboot. |
10 |
|
11 |
Apparently mdadm must be called after the root filesystem is mounted |
12 |
read-only. Then it can mark the array as clean and not rebuild every |
13 |
single reboot. |
14 |
|
15 |
Where do I check this? The /etc/init.d/mdadm script happens well before |
16 |
root is mounted read-only. |
17 |
|
18 |
Apparently `mdadm --wait-clean --scan` needs to be called so the |
19 |
external metadata is updated correctly. If you use this command with a |
20 |
native mdadm raid it does nothing, but it's critical apparently to the |
21 |
health of other metadata types. |
22 |
|
23 |
I've grepped through /etc/init.d/ and found nothing. |
24 |
|
25 |
Dan |