On Thu, May 28, 2015 at 1:03 PM, Peter Humphrey <pe...@prh.myzen.co.uk> wrote:
> On Thursday 28 May 2015 15:36:04 I wrote:
>> On Thursday 28 May 2015 08:44:27 Rich Freeman wrote:
>> > 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.
>
> I've found blkid, which tells me the UUIDs of my various devices, thus:
>
> # blkid /dev/md7
> /dev/md7: UUID="ycGMf9-hEP2-tjT4-AtkJ-n8RI-pZ44-RqvlEY"
> TYPE="LVM2_member"

Just keep in mind that the UUID that goes into mdadm.conf might not be
the same UUID returned by blkid.  I'm honestly not certain either way.
You can get the mdadm ID from mdadm --detail --scan.

>
> Two odd things:
> 1.      /dev/md7 is the physical volume in which logical volumes are defined,
> so I'm surprised to see TYPE="LVM2_member".

I'm pretty sure this is fine.  It recognizes it as an LVM pv, so that
makes it an LVM2 member.

> 2.      There is no entry corresponding to /dev/md7 under /dev/disk/by-uuid,
> though /dev/md1 and /dev/md5 do have entries there [1].

udev may be configured to not create uuid symlinks for LVM pvs (since
you wouldn't directly mount them anyway).  The others contain
filesystems and do get symlinks.


>
> What should I be doing about this?

I'd probably just edit your mdadm.conf to be more liberal with
scanning, and add the arrays output by mdadm --detail --scan to your
config file.  That alone may make your problems go away, and it should
be pretty harmless.

>
> I assume that the ../../dm-N links refer to the LVs - there are 15 of them.
> md7 is conspicuous by its absence. This seems like a problem to me, and it
> may account for /dev/md7 sometimes not being started at boot time.
>

LVM is just a wrapper around DM, so that is normal.  Nothing about
what you've written here concerns me.

-- 
Rich

Reply via email to