software raid init script problems

Bug #108971 reported by Giacomo Graziosi
30
Affects Status Importance Assigned to Milestone
mdadm (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: mdadm

I'm on Ubuntu Server 7.04, the software raid 1 is working perfectly but I got an error message on the startup and on the shutdown.

This is what I get on the startup:
Starting up ...
Loading, please wait...
mdadm: No devices listed in conf file were found.

And this is what I get on the shutdown:
Stopping MD array md0 [fail]

Please note that the raid appears to be perfectly up and running:
root@sema:~# mount | grep md0
/dev/md0 on / type ext3 (rw,errors=remount-ro)
I tried to reinstall everything after a dd if=/dev/zero of=/dev/sdX on both drives but the problem is still there.

These are some infos about my hard drives:
Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot Start End Blocks Id System
/dev/sda1 1 62 497983+ 82 Linux swap / Solaris
/dev/sda2 63 9729 77650177+ fd Linux raid autodetect

Disk /dev/sdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot Start End Blocks Id System
/dev/sdb1 1 62 497983+ 82 Linux swap / Solaris
/dev/sdb2 63 9729 77650177+ fd Linux raid autodetect

Thank you.
Giacomo Graziosi.

Revision history for this message
Giacomo Graziosi (g.graziosi) wrote :
Revision history for this message
Giacomo Graziosi (g.graziosi) wrote :

Ok, looks like I was too optimistic: my system just failed to boot with the message "mount: Mounting /dev/md0 on /root failed: Device or resource busy" and showed the initramfs prompt, after rebooting the system was able to boot again!

root@sema:~# grep UUID /etc/mdadm/mdadm.conf
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=8db4bd85:07887cb0:64410288:9cfb7b87
root@sema:~# vol_id -u /dev/md0
c80bb816-1bc4-4cc1-ad12-edc9fc412425

Is this normal?

Revision history for this message
Giacomo Graziosi (g.graziosi) wrote :

The UUID is good:
root@sema:~# mdadm -D /dev/md0
/dev/md0:
        Version : 00.90.03
  Creation Time : Sun Apr 22 17:18:35 2007
     Raid Level : raid1
     Array Size : 77650112 (74.05 GiB 79.51 GB)
    Device Size : 77650112 (74.05 GiB 79.51 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 0
    Persistence : Superblock is persistent

    Update Time : Sun Apr 22 18:29:25 2007
          State : active
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           UUID : 8db4bd85:07887cb0:64410288:9cfb7b87
         Events : 0.19

    Number Major Minor RaidDevice State
       0 8 2 0 active sync /dev/sda2
       1 8 18 1 active sync /dev/sdb2

Revision history for this message
Giacomo Graziosi (g.graziosi) wrote :

I tried with another partition scheme:
Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot Start End Blocks Id System
/dev/sda1 1 243 1951866 83 Linux
/dev/sda2 244 9729 76196295 fd Linux raid autodetect

Disk /dev/sdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot Start End Blocks Id System
/dev/sdb1 1 243 1951866 82 Linux swap / Solaris
/dev/sdb2 244 9729 76196295 fd Linux raid autodetect

The operating system is installed on /dev/sda1, the swap is on /dev/sdb1 and the raid 1 array (/dev/sda2, /dev/sdb2) is mounted on /home.
Now I don't get the error message on the shutdown but I still get the one on the boot (mdadm: No devices listed in conf file were found.)

Revision history for this message
Gianluca (gianluca-sabena-gmail) wrote :

I have Ubuntu server 7.04 and get the same problem.
The system works well, but I do not know how dangerous is to use it.

Revision history for this message
Borahshadow (codyregister) wrote :

I believe I have the same problem
after the
Starting up ...
Loading, please wait...
mdadm: No devices listed in conf file were found.
error something about kinit would come up and I would boot the problem came when I tried to simulate drive failure by removing one drive (with the machine turned off) I could then not boot it would hang for several minuted after the mdadm: No devices listed in conf file were found. error and drop me into a busybox shell from there I could run mdrun and start my array but then I could not continue to boot with ctrl-d
remember it would boot fine with both drives
 I tried a fix involving sleep 10 in the init scripts or something but that didn't seem to help

Revision history for this message
Hazamonzo (h-ward) wrote :

I too have had the same problem with a software raid setup and Ubuntu Server edition 7

I setup my software raid using the Ubuntu installer process and installed the server software. After a reboot i recieved the message:

Starting up...
Loading, please wait
mdadm: No devices listed in conf file were found.
Kinit: name_to_dev_key(/dev/md2) = md2(9,2)
Kinit: trying to resume from /dev/md2
Kinit: no resume image, doing normal boot
mount: Mounting /dev/md0 on /root failed: Device or resource busy
mount: Mounting /root/dev on /dev/.static/dev failed: no such file or directory
mount: Mounting /sys on /root/sys failed: no such file or directory
mount: Mounting /proc on /root/proc failed: no such file or directory
Target filesystem doesn't have /sbin/init

BusyBox v1.1.3 (ect ect ect)

/bin/sh: cant access tty; job control turned off
(initramfs) [ 11.896015] md: raid array is not clean -- starting background reconstruction

Revision history for this message
nestor2509 (nestor2509) wrote :

As I understand mdadm is when Raid hard disk are in the PC. But I post this:
https://answers.launchpad.net/ubuntu/+source/mdadm/+question/6538

And the thing I can't understand i that I doesn't have Raid device. My only hard disk is a SATA disk.
Anyone with an idea?
Thanks

Revision history for this message
SkyCapten (artemiosmakris) wrote :

i had the same problem with Ubuntu Server 7.04 and found the solution in another forum. Here is the solution:

"The problem is as far as I can understand is that the HDD isn't yet detected in the kernel when RAID is assembled. I quickly fixed it only if I manually edit /usr/share/initramfs-tools/init and put sleep 10 after line log_begin_msg "Mounting root file system...". After this I updated initramfs with sudo update-initramfs -k all -u"

I hope it helps...

Revision history for this message
brainstorm (brainstorm) wrote :

Thank you SkyCapten,

With the "sleep 10" I got rid of the "mdadm: No devices listed in conf file were found.". Now I have to figure why my system does not boot on degraded mode (2 out of 3 drives connected).... I'm following the next thread:

http://ubuntuforums.org/showthread.php?t=507074

Thanks again !

Revision history for this message
brainstorm (brainstorm) wrote :

The following patch allows to boot a RAID array in degraded mode:

http://launchpadlibrarian.net/8884018/failed-raid.patch

Why it's not applied upstream ? IMHO a RAID should try to boot in degraded mode: one of the purposes of RAID is high availability, isn't it ?.

Cheers

Revision history for this message
xteejx (xteejx-deactivatedaccount) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. You reported this bug a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue for you. Can you try with the latest Ubuntu release? Thanks in advance.

Changed in mdadm (Ubuntu):
status: New → Incomplete
Revision history for this message
brainstorm (brainstorm) wrote :

Actually, since intrepid, this issue has been resolved (marking it accordingly..):

https://wiki.ubuntu.com/BootDegradedRaid

Regards,
Roman

Changed in mdadm (Ubuntu):
status: Incomplete → Fix Released
Revision history for this message
Peter Funk (pf-artcom-gmbh) wrote : Re: [Bug 108971] Re: software raid init script problems

Hello,

brainstorm schrieb am Dienstag, den 19.05.2009 um 06:46:
> Actually, since intrepid, this issue has been resolved (marking it
> accordingly..):
>
> https://wiki.ubuntu.com/BootDegradedRaid
>
> Regards,
> Roman
>
> ** Changed in: mdadm (Ubuntu)
> Status: Incomplete => Fix Released

What about the latest ubuntu LTS (which is Hardy at the moment) ?

This issue mostly effects servers, because software raid is rarely
used on the average desktop machine.

We prefer to install the latest Ubuntu coming with long term support
on servers. It is very important, that these servers are able to boot
unattended especially if one of the disks has failed.

Regards, Peter
--
Peter Funk, ✉Oldenburger Str.86, D-27777 Ganderkesee
office: ArtCom GmbH, ✉Haferwende 2, D-28357 Bremen, Germany
tel:+49-421-20419-0 cell:+49-179-640-8878 <http://www.artcom-gmbh.de/>

Revision history for this message
Alex Muntada (alex.muntada) wrote :

@Peter you can nominate for release and add then mark hardy.

IIRC, the (Ubuntu) target above refers to latest version only.

Revision history for this message
xteejx (xteejx-deactivatedaccount) wrote :

If you need a fix for the bug in previous versions of Ubuntu, please do steps 1 and 2 of the SRU Procedure [1] to bring the need to a developer's attention.

[1]: https://wiki.ubuntu.com/StableReleaseUpdates#Procedure

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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