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