2

INTRO:

I have spent countless days attaching/detaching MOLEX->SATA power cables, rebooting machines and trying hundreds of edits and commands. I am on the verge of desperation and desperately in need of assistance.


PROBLEME:

As described in the title. I am a newbie, I followed mdadm RAID1+GPT installation guide. My partitioning setup is exactly as in the guide, with the exception of an additional HDD. It installed, synced the arrays and pretended to be "all dandy". However when I powered off the machine, unplugged one of the drives and attempted to boot it failed with the message:

Gave up waiting for root device. Common problems:
- Boot args (cat /proc/cmdline)
  - Check rootdelay= (did the system wait long enough?)
  - Check root= (did the system wait for the right device?)
- Missing modules (cat /proc/modules; ls /dev)
ALERT! /dev/disk/by-uuid/long-UUID-here does not exist.
Dropping to a shell!
modprobe: module ehci-orion not found in modules.dep

BusyBox v1.22.1 (Debian 1:1.22.0-9+deb8u1) built-in shell (ash)
Enter 'help' for a list of built-in commands.

/bin/sh: can't access tty; job control turned off
(initramfs) 

Where /dev/disk-by-uuid/long-UUID-here actually shows the UUID of the md0(RAID1 device 0 partition 1, used for root filesystem; as in guide)

Using cat /proc/mdstat and mdadm --detail /dev/md0 from that "(initramfs) emergency shell thingy" it shows that the RAID arrays md0 and md1 are inactive , marked as RAID0 and each RAID member has an [S] after it (likely indicating that it's a spare disk)

If I re-connect the detached HDDs it boots fine and pretends to be "clean". Showing all correct information as RAID1.


I will be happy to get you more specific information/command outputs if you ask. This thing is driving me crazy.


ADDITIONAL INFORMATION(full raid/all disks attached):

cat /proc/mdstat

Personalities : [raid1]
md0 : active raid1 sdc3[1] sdb3[0] sdd3[2]
      1945569280 blocks super 1.2 [3/3]  [UUU]
      bitmap: 0/15 pages [0KB], 65536KB chunk

md1 : active (auto-read-only) raid1 sdc2[1] sdb2[0] sdd2[2]
      7808000 blocks super 1.2 [3/3]  [UUU]

unused devices: <none>

mdadm --detail /dev/md0

/dev/md0:
        Version : 1.2
  Creation Time : Sun Apr 26 22:20:03 2015
     Raid Level : raid1
     Array Size : 1945569280 (1855.44 GiB 1992.26 GB)
  Used Dev Size : 1945569280 (1855.44 GiB 1992.26 GB)
   Raid Devices : 3
  Total Devices : 3
    Persistence : Superblock is persistent

  Intent Bitmap : Internal

    Update Time : Tue Apr 28 01:32:45 2015
          State : clean
 Active Devices : 3
Working Devices : 3
 Failed Devices : 0
  Spare Devices : 0

           Name : FluffyBunny:0  (local to host FluffyBunny)
           UUID : 9c0b29dd:ea96cffe:9431dc07:4bd35b5e
         Events : 4408

Number    Major    Minor    RaidDevice  State
  0         8       19           0      active sync  /dev/sdb3
  1         8       35           1      active sync  /dev/sdc3
  2         8       51           2      active sync  /dev/sdd3

fdisk -l

Disk /dev/sdc: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: A5E04E17-28EA-4205-96C4-40B0064241B9

Device        Start        End    Sectors  Size Type
/dev/sdc1      2048       4095       2048    1M BIOS boot
/dev/sdc2      4096   15628287   15624192  7.5G Linux RAID
/dev/sdc3  15628288 3907028991 3891400704  1.8T Linux RAID

Disk /dev/sdb: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 7232955A-62E8-4251-AF2F-B3EC70164234

Device        Start        End    Sectors  Size Type
/dev/sdb1      2048       4095       2048    1M BIOS boot
/dev/sdb2      4096   15628287   15624192  7.5G Linux RAID
/dev/sdb3  15628288 3907028991 3891400704  1.8T Linux RAID

Disk /dev/sdd: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 04C652AA-FC29-45D1-B866-CCEDAE4164D7

Device        Start        End    Sectors  Size Type
/dev/sdd1      2048       4095       2048    1M BIOS boot
/dev/sdd2      4096   15628287   15624192  7.5G Linux RAID
/dev/sdd3  15628288 3907028991 3891400704  1.8T Linux RAID

Disk /dev/md1: 7.5 GiB, 7995392000 bytes, 15616000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/md0: 1.8 TiB, 1992262942720 bytes, 3891138560 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

closed as off-topic by mdpc, fukawi2, user259412, Andrew Schulman, Hyppy Apr 28 '15 at 13:15

  • This question does not appear to be about server, networking, or related infrastructure administration within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • I have never tried it, but I wonder if you could set the force the root device to be /dev/md0 or whatever by editing your grub.cfg. If that did work you would have to do some tweaking to fix it so that the scripts that generate the grub.cfg create the right options. – Zoredache Apr 27 '15 at 21:11
  • @Zoredache Please keep in mind that I am a newbie. I not not know how to do that. I am assuming you meant the file located at "/boot/grub/grub.cfg" though. – Bob Apr 27 '15 at 22:24
  • @Zoredache Also please note that I mentioned that UUID that it searches for is actualy the UUID of the /dev/md0 – Bob Apr 27 '15 at 22:30
2

You need to install Grub2 on both disks. Try to run grub2-install /dev/sda; grub2-install /dev/sdb (or similar; check you grub man page for more information).

EDIT: after reading better your post, I think Grub2 is not the culprit here, as it seems that your system correctly load the required kernel. Try to substitute the UUID with the /dev/ entry pointing to your mdadm device (eg: /dev/md0). It changes something?

  • If you look at the very bottom of that guide (in the link I provided) it includes "root@debian:~# grub-install /dev/sdb". As such, I have carried out that exact operation on all 3 RAID members. – Bob Apr 27 '15 at 20:52
  • I have also tried editing the /etc/fstab to replace UUID with /dev/mdX. It outputs exactly identical error result. – Bob Apr 27 '15 at 20:53
  • Ah, I just edited my reply. Sorry for the noise. Unfortunately, I did have no clue about this problem. – shodanshok Apr 27 '15 at 20:53

Not the answer you're looking for? Browse other questions tagged or ask your own question.