1 |
On Tuesday 26 August 2014 14:21:19 Kerin Millar wrote: |
2 |
> On 26/08/2014 10:38, Peter Humphrey wrote: |
3 |
> > On Monday 25 August 2014 18:46:23 Kerin Millar wrote: |
4 |
> >> On 25/08/2014 17:51, Peter Humphrey wrote: |
5 |
> >>> On Monday 25 August 2014 13:35:11 Kerin Millar wrote: |
6 |
--->8 |
7 |
> Again, can you find out what the exit status is under the circumstances that |
8 |
> mdadm produces a blank error? I am hoping it is something other than 1. |
9 |
|
10 |
I've remerged mdadm to run this test. I'll report the result in a moment. |
11 |
[...] In fact it returned status 1. Sorry to disappoint :) |
12 |
|
13 |
> >>> Here's the position: |
14 |
> >>> 1. I've left /etc/init.d/mdraid out of all run levels. I have nothing |
15 |
> >>> but comments in mdadm.conf, but then it's not likely to be read anyway |
16 |
> >>> if the init script isn't running. |
17 |
> >>> 2. I have empty /etc/udev rules files as above. |
18 |
> >>> 3. I have kernel auto-assembly of raid enabled. |
19 |
> >>> 4. I don't use an init ram disk. |
20 |
> >>> 5. The root partition is on /dev/md5 (0.99 metadata) |
21 |
> >>> 6. All other partitions except /boot are under /dev/vg7 which is built |
22 |
> >>> on top of /dev/md7 (1.x metadata). |
23 |
> >>> 7. The system boots normally. |
24 |
> >> |
25 |
> >> I must confess that this boggles my mind. Under these circumstances, I |
26 |
> >> cannot fathom how - or when - the 1.x arrays are being assembled. |
27 |
> >> Something has to be executing mdadm at some point. |
28 |
> > |
29 |
> > I think it's udev. I had a look at the rules, but I no grok. I do see |
30 |
> > references to mdadm though. |
31 |
> So would I, only you said in step 2 that you have "empty" rules, which I |
32 |
> take to mean that you had overridden the mdadm-provided udev rules with |
33 |
> empty files. |
34 |
|
35 |
Correct; that's what I did, but since removing mdadm I've also removed the |
36 |
corresponding, empty /etc/udev files. |
37 |
|
38 |
I don't think it's udev any more; I now think the kernel is cleverer than we |
39 |
gave it credit for (see below and attached dmesg). |
40 |
|
41 |
> If all of the conditions you describe were true, you would have eliminated |
42 |
> all three of the aformentioned contexts in which mdadm can be invoked. Given |
43 |
> that mdadm is needed to assemble your 1.x arrays (see below), I would expect |
44 |
> such conditions to result in mount errors on account of the missing arrays. |
45 |
--->8 |
46 |
> Again, 1.x arrays must be assembled in userspace. The kernel cannot |
47 |
> assemble them by itself as it can with 0.9x arrays. If you uninstall |
48 |
> mdadm, you will be removing the very userspace tool that is employed for |
49 |
> assembly. Neither udev nor mdraid will be able to execute it, which |
50 |
> cannot end well. |
51 |
|
52 |
I had done that, with no ill effect. I've just booted the box with no mdadm |
53 |
present. It seems the kernel can after all assemble the arrays (see attached |
54 |
dmesg.txt, edited). Or maybe I was wrong about the metadata and they're all |
55 |
0.99. In course of checking this I tried a couple of things: |
56 |
|
57 |
# lvm pvck /dev/md7 |
58 |
Found label on /dev/md7, sector 1, type=LVM2 001 |
59 |
Found text metadata area: offset=4096, size=1044480 |
60 |
# lvm vgdisplay |
61 |
--- Volume group --- |
62 |
VG Name vg7 |
63 |
System ID |
64 |
Format lvm2 |
65 |
Metadata Areas 1 |
66 |
Metadata Sequence No 14 |
67 |
VG Access read/write |
68 |
VG Status resizable |
69 |
MAX LV 0 |
70 |
Cur LV 13 |
71 |
Open LV 13 |
72 |
Max PV 0 |
73 |
Cur PV 1 |
74 |
Act PV 1 |
75 |
VG Size 500.00 GiB |
76 |
PE Size 4.00 MiB |
77 |
Total PE 127999 |
78 |
Alloc PE / Size 108800 / 425.00 GiB |
79 |
Free PE / Size 19199 / 75.00 GiB |
80 |
VG UUID ll8OHc-if2H-DVTf-AxrQ-5EW0-FOLM-Z73y0z |
81 |
|
82 |
Can you tell from that which metadata version I used when I created vg7? It |
83 |
looks like 1.x to me, since man lvm refers to formats (=metadata types) lvm1 |
84 |
and lvm2 - or am I reading too much into that? |
85 |
|
86 |
See here what the postinst message said when I remerged sys-fs/mdadm-3.3.1-r2 |
87 |
for the return-code test you asked for: |
88 |
|
89 |
* If you're not relying on kernel auto-detect of your RAID |
90 |
* devices, you need to add 'mdraid' to your 'boot' runlevel: |
91 |
* rc-update add mdraid boot |
92 |
|
93 |
Could be thought ambiguous. |
94 |
|
95 |
Is nobody else experiencing this behaviour? |
96 |
|
97 |
-- |
98 |
Regards |
99 |
Peter |