Boot

mdadm:未找到 conf 文件中列出的設備 - 帶有 GPT 的 Debian 8

  • February 26, 2016

我有一個 Debian Jessie ( 3.16.7-ckt20-1+deb8u3) 系統,在 2 個 3TB 硬碟上帶有 RAID1。Grub 無法安裝到大於 2TB 的驅動器上的 MBR,因此我有帶有 1MB bios 分區的 GPT:

Device          Start        End    Sectors   Size Type
/dev/sda1        2048       4095       2048     1M BIOS boot
/dev/sda2        4096 1953128447 1953124352 931.3G Linux RAID
/dev/sda3  1953128448 5860532223 3907403776   1.8T Linux RAID

重新啟動後(核心升級deb8u2-> deb8u3)系統最終進入initramfs救援:

Loading, please wait...
mdadm: No device listed in conf file were found.   

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/5887d2e0-bae1-4ce8-ac6f-168fb183d7b0 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) 

從控制台我可以檢查 RAID 陣列是否正常:

cat /proc/mdstat 
Personalities : [raid1] 
md2 : active raid1 sda3[0] sdb3[1]
     1953570816 blocks super 1.2 [2/2] [UU]
     bitmap: 0/15 pages [0KB], 65536KB chunk

md1 : active raid1 sda2[0] sdb2[1]
     976431104 blocks super 1.2 [2/2] [UU]
     bitmap: 0/8 pages [0KB], 65536KB chunk

unused devices: <none>

失去的磁碟是根分區md1中不存在的設備。/dev/md/配置文件也/etc/mdadm/mdadm.conf顯示與以下內容相同的內容mdadm --examine --scan

$ mdadm --examine --scan
ARRAY /dev/md/1  metadata=1.2 UUID=c366b4e9:e33d2b69:3c738749:07b022c6 name=w02:1
ARRAY /dev/md/2  metadata=1.2 UUID=c32939b8:bc01f4ff:b85f00c6:b50aa29e name=w02:2

使用mdadm --examine /dev/sda2我檢查所有 RAID 分區是否處於乾淨狀態 ( AA)。我還能做些什麼嗎?

我可以嘗試繼續手動啟動嗎?怎麼做?我將如何增加rootdelay=下次重新啟動?(系統等待正確的設備,這不是第二個建議的問題)。

如果您只是exit從救援 shell 中,系統將嘗試繼續引導。如果你需要增加rootdelay你可以將它添加到你的核心選項中/etc/grub/default並執行update-grub

引用自:https://unix.stackexchange.com/questions/265884