我有一台 HP N40L 微型服务器,有 2 个相同的驱动器,我使用系统对它们进行硬件 RAID 作为镜像。大约一年前,我在系统上安装了 mint。
这一直运行得很完美,更新等等,直到我升级到 Mint 17。
我认为一切都很好,但我注意到 mint 仅使用其中一个驱动器来启动,然后由于某种原因显示了另一个驱动器的内容。
即它启动sdb1
,但df
显示sda1
。我是当然 df
用于显示/dev/mapper/pdc_bejigbccdb1
RAID 阵列的驱动器。因此,对 Grub 的任何更新都会转到sda1
,但它会启动sdb1
然后加载 fs sda1
。
N40L marty # df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 233159608 113675036 107617644 52% /
none 4 0 4 0% /sys/fs/cgroup
/dev 2943932 12 2943920 1% /media/sda1/dev
tmpfs 597588 1232 596356 1% /run
none 5120 0 5120 0% /run/lock
none 2987920 0 2987920 0% /run/shm
none 102400 4 102396 1% /run/user
从cat /etc/fstab
N40L marty # cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
/dev/mapper/pdc_bejigbccdb1 / ext4 errors=remount-ro 0 1
/dev/mapper/pdc_bejigbccdb5 none swap sw 0 0
如果我这样做ls /dev/mapper/
我得到
N40L marty # ls /dev/mapper
total 0
crw------- 1 root root 10, 236 Jul 24 17:03 control
如何恢复我的 raid 以及如何让 grub 启动它?
进一步更新:
N40L grub # dmraid -r
/dev/sdb: pdc, "pdc_bejigbccdb", mirror, ok, 486328064 sectors, data@ 0
/dev/sda: pdc, "pdc_bejigbccdb", mirror, ok, 486328064 sectors, data@ 0
N40L grub # dmraid -s
*** Set
name : pdc_bejigbccdb
size : 486328064
stride : 128
type : mirror
status : ok
subsets: 0
devs : 2
spares : 0
N40L grub # dmraid -ay -vvv -d
WARN: locking /var/lock/dmraid/.lock
NOTICE: /dev/sdb: asr discovering
NOTICE: /dev/sdb: ddf1 discovering
NOTICE: /dev/sdb: hpt37x discovering
NOTICE: /dev/sdb: hpt45x discovering
NOTICE: /dev/sdb: isw discovering
DEBUG: not isw at 250059348992
DEBUG: isw trying hard coded -2115 offset.
DEBUG: not isw at 250058267136
NOTICE: /dev/sdb: jmicron discovering
NOTICE: /dev/sdb: lsi discovering
NOTICE: /dev/sdb: nvidia discovering
NOTICE: /dev/sdb: pdc discovering
NOTICE: /dev/sdb: pdc metadata discovered
NOTICE: /dev/sdb: sil discovering
NOTICE: /dev/sdb: via discovering
NOTICE: /dev/sda: asr discovering
NOTICE: /dev/sda: ddf1 discovering
NOTICE: /dev/sda: hpt37x discovering
NOTICE: /dev/sda: hpt45x discovering
NOTICE: /dev/sda: isw discovering
DEBUG: not isw at 250059348992
DEBUG: isw trying hard coded -2115 offset.
DEBUG: not isw at 250058267136
NOTICE: /dev/sda: jmicron discovering
NOTICE: /dev/sda: lsi discovering
NOTICE: /dev/sda: nvidia discovering
NOTICE: /dev/sda: pdc discovering
NOTICE: /dev/sda: pdc metadata discovered
NOTICE: /dev/sda: sil discovering
NOTICE: /dev/sda: via discovering
DEBUG: _find_set: searching pdc_bejigbccdb
DEBUG: _find_set: not found pdc_bejigbccdb
DEBUG: _find_set: searching pdc_bejigbccdb
DEBUG: _find_set: not found pdc_bejigbccdb
NOTICE: added /dev/sdb to RAID set "pdc_bejigbccdb"
DEBUG: _find_set: searching pdc_bejigbccdb
DEBUG: _find_set: found pdc_bejigbccdb
DEBUG: _find_set: searching pdc_bejigbccdb
DEBUG: _find_set: found pdc_bejigbccdb
NOTICE: added /dev/sda to RAID set "pdc_bejigbccdb"
DEBUG: checking pdc device "/dev/sda"
DEBUG: checking pdc device "/dev/sdb"
DEBUG: set status of set "pdc_bejigbccdb" to 16
DEBUG: checking pdc device "/dev/sda"
DEBUG: checking pdc device "/dev/sdb"
DEBUG: set status of set "pdc_bejigbccdb" to 16
RAID set "pdc_bejigbccdb" was not activated
WARN: unlocking /var/lock/dmraid/.lock
DEBUG: freeing devices of RAID set "pdc_bejigbccdb"
DEBUG: freeing device "pdc_bejigbccdb", path "/dev/sda"
DEBUG: freeing device "pdc_bejigbccdb", path "/dev/sdb"
因此,我的系统看到这两个驱动器,并认为它们应该是阵列的一部分,但不会激活该阵列,并且不会创建该阵列,/dev/mapper/pdc_bejigbccdb
因此我无法将 grub 加载到它并从它启动。
如何让 dmraid 激活并创建映射器条目?
答案1
我修复了它,但我不能诚实地告诉你如何修复。
基本上,我启动了 Mint 17 的 LiveUSB 版本。我注意到 raid 阵列运行良好,因此我安装了系统并对其进行了 chroot。
然后我再次安装了 dmraid 和 mdadm(不知道为什么我这样做),更新了我的 grub 设置并将 grub 安装到了阵列中。
重新启动后,它抱怨 mdadm,但一切都很好,现在正在从阵列启动。
真的很惊喜。谢谢你的帮助。