You are not logged in.

#1 2008-12-27 08:29:24

HyperBaton
Member
From: Belgium
Registered: 2008-01-18
Posts: 207

[RAID-1] mdadm and blkid report different UUID's

I have just setup a RAID-1 storage and I would like to mount this raid using it's UUID.
So I copied the UUID which is displayed in mdadm --detail /dev/md0 into fstab:

hb-server:etc # mdadm --detail /dev/md0
/dev/md0:
        Version : 00.90
  Creation Time : Fri Dec 26 23:41:13 2008
     Raid Level : raid1
     Array Size : 1465135936 (1397.26 GiB 1500.30 GB)
  Used Dev Size : 1465135936 (1397.26 GiB 1500.30 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 0
    Persistence : Superblock is persistent

    Update Time : Sat Dec 27 09:24:44 2008
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           UUID : c927700e:7ce9df8d:db346991:c1a338c1
         Events : 0.114

    Number   Major   Minor   RaidDevice State
       0       8        1        0      active sync   /dev/sda1
       1       8       17        1      active sync   /dev/sdb1

I try to mount, then it says this:

hb-server:etc # mount -a
mount: special device UUID="c927700e:7ce9df8d:db346991:c1a338c1" does not exist

So I check blkid:

hb-server:etc # blkid /dev/md0
/dev/md0: UUID="08ece369-e0dd-41d5-ac2b-5a0b122ad4dc" SEC_TYPE="ext2" TYPE="ext3"

Why are they different? Where does mdadm get this uuid from and where does blkid get it from? And how can I make sure they are consistent?

EDIT: Oh by the way, I tried changing the UUID set in mdadm.conf to the one specified by blkid, but when I try to assemble, mdadm reports this:

hb-server:etc # mdadm --assemble --scan
mdadm: no devices found for /dev/md0

Last edited by HyperBaton (2008-12-27 08:32:33)

Offline

#2 2008-12-27 12:04:16

Zariel
Member
Registered: 2008-10-07
Posts: 446

Re: [RAID-1] mdadm and blkid report different UUID's

I have this set up on my server (but dont mount with UUID's), whats the output of mdadm --detail --scan ? did you append that to your mdadm.conf?

Offline

#3 2008-12-27 12:19:44

HyperBaton
Member
From: Belgium
Registered: 2008-01-18
Posts: 207

Re: [RAID-1] mdadm and blkid report different UUID's

Well, I tried mounting the UUID reported in blkid and that works, so I guess the real problem is gone. But I would still like to know what the difference is... I'm pretty new to raid, so it's all a bit confusing to say the least.

This is the output of mdadm --detail --scan:

hb-server:hb # mdadm --detail --scan
ARRAY /dev/md0 level=raid1 num-devices=2 metadata=00.90 UUID=c927700e:7ce9df8d:db346991:c1a338c1

And yes, this is in my mdadm.conf, it assembles just fine now.

But from what I've read, shouldn't the UUID reported by mdadm for md0 be the same UUID reported by blkid for the seperate drives? Because that's not the case:

hb-server:hb # blkid
/dev/sda1: UUID="0e7027c9-8ddf-e97c-9169-34dbc138a3c1" TYPE="mdraid"
/dev/sdb1: UUID="0e7027c9-8ddf-e97c-9169-34dbc138a3c1" TYPE="mdraid"
/dev/sdc1: UUID="f81bfdd3-26d4-4572-9bd0-0a21e98d9e79" TYPE="ext3" SEC_TYPE="ext2"
/dev/sdc5: TYPE="swap" UUID="d41d40ed-0135-4823-b76e-c58efe85852c"
/dev/sde5: UUID="0f7356e3-2b09-4fa8-99b7-26eeee3c0367" SEC_TYPE="ext2" TYPE="ext3"
/dev/md0: UUID="08ece369-e0dd-41d5-ac2b-5a0b122ad4dc" SEC_TYPE="ext2" TYPE="ext3"

Last edited by HyperBaton (2008-12-27 12:20:39)

Offline

#4 2008-12-27 12:45:21

Zariel
Member
Registered: 2008-10-07
Posts: 446

Re: [RAID-1] mdadm and blkid report different UUID's

hm i dont know, add ARRAY /dev/md0 level=raid1 num-devices=2 metadata=00.90 UUID=c927700e:7ce9df8d:db346991:c1a338c1 to the bottom of mdadm.conf and reboot

Offline

#5 2008-12-27 13:20:33

HyperBaton
Member
From: Belgium
Registered: 2008-01-18
Posts: 207

Re: [RAID-1] mdadm and blkid report different UUID's

Yeah, that's not the problem anymore, the raid is working fine and mounting works as well. I'm just trying to figure out what the difference is.

Offline

Board footer

Powered by FluxBB