"No devices listed in conf file were found" due to mdadm RAID1 array UUID different from actual UUID reported by vol_id

Bug #126499 reported by Tim Miller Dyck
6
Affects Status Importance Assigned to Milestone
mdadm (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Early in the boot process for Feisty, I get a message from mdadm

    No devices listed in conf file were found

When I read Bug #120504 (maybe this is a duplicate of that), I got a clue that the UUIDs in /etc/mdadm/mdadm.conf might not match the actual UUID. This was the case for two out of my four arrays. The other two arrays had blank UUIDs are reported by vol_id and started fine.

The bug is is that mdadm and vol_id are reporting different UUIDs for the same device.

# uname -a
Linux atlas 2.6.20-16-generic #2 SMP Thu Jun 7 20:19:32 UTC 2007 i686 GNU/Linux

# vol_id /dev/md0
ID_FS_USAGE=filesystem
ID_FS_TYPE=ext3
ID_FS_VERSION=1.0
ID_FS_UUID=bff2d095-4504-4dcb-937a-c687422beadc
ID_FS_LABEL=/boot
ID_FS_LABEL_SAFE=boot

# mdadm --detail /dev/md0
/dev/md0:
        Version : 00.90.03
  Creation Time : Sun Jul 31 00:58:00 2005
     Raid Level : raid1
     Array Size : 979840 (957.04 MiB 1003.36 MB)
    Device Size : 979840 (957.04 MiB 1003.36 MB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 0
    Persistence : Superblock is persistent

    Update Time : Tue Jul 17 02:48:22 2007
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           UUID : f69e981b:39a7f096:c5346ca4:0f25f4c2
         Events : 0.11860

    Number Major Minor RaidDevice State
       0 22 1 0 active sync /dev/hdc1
       1 3 1 1 active sync /dev/hda1

# ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 9 2007-07-17 02:29 3d721ac2-b42f-4f53-ba48-63828d30013e -> ../../md4
lrwxrwxrwx 1 root root 28 2007-07-17 02:29 630f92e4-3406-42ee-982f-9abdb9696a4f -> ../../mapper/vg_root-lv_root
lrwxrwxrwx 1 root root 10 2007-07-17 02:29 a3150b2e-5416-4052-901f-f17bb8affc4f -> ../../sdc1
lrwxrwxrwx 1 root root 9 2007-07-17 02:29 bff2d095-4504-4dcb-937a-c687422beadc -> ../../md0

# mdadm --detail --scan
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=f69e981b:39a7f096:c5346ca4:0f25f4c2
ARRAY /dev/md1 level=raid1 num-devices=2 UUID=6b73608b:f42d5d48:c5346ca4:0f25f4c2
ARRAY /dev/md2 level=raid1 num-devices=2 UUID=711d6d5c:dc49dd88:c5346ca4:0f25f4c2
ARRAY /dev/md4 level=raid1 num-devices=2 UUID=8e449434:a93efdbf:c5346ca4:0f25f4c2

# vol_id -u /dev/md0
bff2d095-4504-4dcb-937a-c687422beadc

# vol_id /dev/md1
ID_FS_USAGE=raid
ID_FS_TYPE=LVM2_member
ID_FS_VERSION=LVM2 001
ID_FS_UUID=
ID_FS_LABEL=
ID_FS_LABEL_SAFE=

# vol_id /dev/md2
ID_FS_USAGE=other
ID_FS_TYPE=swap
ID_FS_VERSION=2
ID_FS_UUID=
ID_FS_LABEL=
ID_FS_LABEL_SAFE=

# vol_id /dev/md4
ID_FS_USAGE=filesystem
ID_FS_TYPE=ext3
ID_FS_VERSION=1.0
ID_FS_UUID=3d721ac2-b42f-4f53-ba48-63828d30013e
ID_FS_LABEL=data
ID_FS_LABEL_SAFE=data

Since the recommended method to create mdadm.conf is through appending the output of "mdadm --detail --scan", if mdadm isn't getting UUIDs the same way vol_id is, problems result.

I started having this problem after upgrading to Feisty.

In my case, my arrays did start OK even with this error because (I think) they are type FD and the kernel was able to start them by itself.

This occurs with:
mdadm 2.5.6-7ubuntu5
volumeid 108-0ubuntu4

mdadm superblock versions are .90. Perhaps this bit from the mdadm man page is relevant:
       For version-0.90
              superblocks part of the SHA1 hash of the hostname will be stored in the later half
              of the UUID.

I haven't tried updating the UUID with mdadm --update. I'm not sure if this can be done without losing the array.

FIX:

Manually editing the UUIDs in /etc/mdadm/mdadm.conf to match those from vol_id fixes the mdadm error on boot and allows it to find all its devices.

Revision history for this message
Tim Miller Dyck (timmillerdyck) wrote :

Regarding the fix, after updating mdadm.conf, one also needs to regenerate the initrd.img files:

     update-initramfs -k all -u

Revision history for this message
Matthias Urlichs (smurf) wrote :

mdadm --update=uuid (plus replacing the uuid in /etc/mdadm/mdadm.conf) fixes the problem.

However, that still leaves people who had a perfectly working Feisty system, which happened to have this inconsistency, with a machine that cannot boot after upgrading to Gutsy.

Revision history for this message
Matthias Urlichs (smurf) wrote :

NB: I have two affected MD partitions; I've tested the --update solution with one, but left the other alone, so that I can test whether a distro upgrade solves the problem.

Matthias Urlichs (smurf)
Changed in mdadm:
status: New → Confirmed
Revision history for this message
Asif (vadud3) wrote :

I tried to follow the fix. After which my box could not reboot since it now cannot find /dev/md0

Revision history for this message
ceg (ceg) wrote :

vol_id has been replaced with blkid by now

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.