介绍:
我花了无数天连接/断开 MOLEX->SATA 电源线、重启机器并尝试数百次编辑和命令。我快要绝望了,迫切需要帮助。
问题:
正如标题所述。我是新手,我关注了mdadm RAID1+GPT 安装指南。我的分区设置与指南中完全相同,除了额外的硬盘。它安装、同步阵列并假装“一切正常”。但是,当我关闭机器电源、拔下其中一个驱动器并尝试启动时,它失败并显示以下消息:
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)
在哪里/dev/磁盘-按-uuid/长 UUID 在此处实际上显示的是md0(RAID1 设备 0 分区 1,用于根文件系统;如指南中所述)
使用cat /proc/mdstat
并mdadm --detail /dev/md0
从“(initramfs)紧急 shell 东西”显示 RAID 阵列md0和md1是不活跃,标记为 RAID0和每个 RAID 成员后面都有一个 [S](可能表明它是备用磁盘)
如果我重新连接已拆下的硬盘,它就能正常启动并假装“干净”。显示所有正确信息为 RAID1。
如果您询问,我很乐意为您提供更具体的信息/命令输出。这东西快把我逼疯了。
附加信息(完整 raid/所有磁盘均已连接):
猫/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
答案1
您需要在两个都磁盘。尝试运行grub2-install /dev/sda; grub2-install /dev/sdb
(或类似命令;查看 grub 手册页以了解更多信息)。
编辑:仔细阅读您的帖子后,我认为 Grub2 不是罪魁祸首,因为您的系统似乎正确加载了所需的内核。尝试用指向您的 mdadm 设备的 /dev/ 条目替换 UUID(例如:/dev/md0)。这会改变什么吗?