1 |
On Thursday 28 May 2015 08:44:27 Rich Freeman wrote: |
2 |
> On Wed, May 27, 2015 at 8:01 PM, Peter Humphrey |
3 |
<peter@××××××××××××.uk> wrote: |
4 |
> > My mdadm.conf is now this: |
5 |
> > DEVICE /dev/sd[ab]1 |
6 |
> > DEVICE /dev/sd[ab]5 |
7 |
> > DEVICE /dev/sd[ab]7 |
8 |
> > ARRAY /dev/md1 devices=/dev/sda1,/dev/sdb1 |
9 |
> > ARRAY /dev/md5 devices=/dev/sda5,/dev/sdb5 |
10 |
> > ARRAY /dev/md7 devices=/dev/sda7,/dev/sdb7 |
11 |
> > |
12 |
> > I'll see how that goes; so far no complaints about finding no arrays in |
13 |
> > the |
14 |
> > config file. I've never used UUIDs, preferring to be able to read what I'm |
15 |
> > specifying. |
16 |
> |
17 |
> The problem with this sort of approach is that you're hard-coding |
18 |
> device names. If for whatever reason your devices are lettered |
19 |
> differently, mdadm may not assemble the array. |
20 |
> |
21 |
> Here is an example of one of my old mdadm.conf files: |
22 |
> DEVICE /dev/sd[abcdefgh][12345] /dev/hd[abcde][12345] |
23 |
> #ARRAY /dev/md126 UUID=e424848a:593e3c8e:0e120ac2:958f662e |
24 |
> #ARRAY /dev/md124 UUID=dae2458d:e144dbde:34d5107b:2f8c859e |
25 |
> #ARRAY /dev/md127 UUID=4096c546:a0d9d5c4:5063dd02:38d16c75 |
26 |
> |
27 |
> This tells mdadm to scan all those permutations of device names, find |
28 |
> anything with those UUIDs and attempt to assemble the arrays, giving |
29 |
> them the preferred minor numbers. |
30 |
> |
31 |
> Some of those device names probably don't even exist (not all of those |
32 |
> drives have 5 partitions, etc). It doesn't matter - mdadm just checks |
33 |
> the ones that do exist. Then if for whatever reason sdd is now hdc it |
34 |
> doesn't matter. |
35 |
> |
36 |
> With an approach like yours, mdadm will attempt to create md1 by |
37 |
> looking ONLY at sda1 and sdb1, and if that pair forms a valid array it |
38 |
> is started, and if not it is not. If you add a new drive to your |
39 |
> system or for whatever reason the kernel/udev rules change a little or |
40 |
> some race condition changes a little then your devices might get |
41 |
> different names, and the array will not be assembled. |
42 |
|
43 |
Hmm. I wonder if that's what's happening to me. Perhaps I'd better adopt |
44 |
UUIDs then, once I work out what mine are. Thanks for the advice. |
45 |
|
46 |
-- |
47 |
Rgds |
48 |
Peter |