From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 8950A138CD3 for ; Thu, 28 May 2015 14:36:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 42356E08FF; Thu, 28 May 2015 14:36:07 +0000 (UTC) Received: from smarthost01d.mail.zen.net.uk (smarthost01d.mail.zen.net.uk [212.23.1.7]) by pigeon.gentoo.org (Postfix) with ESMTP id ED46FE0896 for ; Thu, 28 May 2015 14:36:05 +0000 (UTC) Received: from [82.69.80.10] (helo=wstn.localnet) by smarthost01d.mail.zen.net.uk with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1Yxyui-0006d8-UZ for gentoo-user@lists.gentoo.org; Thu, 28 May 2015 14:36:05 +0000 From: Peter Humphrey To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] General weirdness - a tale of woe. Date: Thu, 28 May 2015 15:36:04 +0100 Message-ID: <4877493.0ZaXbKOvBr@wstn> User-Agent: KMail/4.14.3 (Linux/3.18.12-gentoo; KDE/4.14.3; x86_64; ; ) In-Reply-To: References: <2988031.1MpZN5Nf01@wstn> <2435178.sru4gdrlxQ@wstn> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Originating-smarthost01d-IP: [82.69.80.10] X-Archives-Salt: efa90288-82c5-474c-98d3-1bf097c5873a X-Archives-Hash: 0e428199ce7c6e8cb54dbbf81878a2af On Thursday 28 May 2015 08:44:27 Rich Freeman wrote: > On Wed, May 27, 2015 at 8:01 PM, Peter Humphrey 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