linux – RAID-1镜像已成为单个硬盘
作者:互联网
我有一台HP N40L微服务器,有两个相同的驱动器,我使用系统将它们硬件RAID作为镜像.大约一年前我在系统上安装了mint.
这已经完美运行,更新等等,直到我升级到Mint 17.
我认为一切都很好,但我注意到薄荷只使用其中一个驱动器启动,然后由于某种原因显示另一个驱动器的内容.
即它引导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激活并创建映射器条目?
解决方法:
我修好了,但我不能老实告诉你怎么做.
基本上我启动了一个LiveUSB版本的Mint 17.我注意到raid阵列很高兴,所以我安装了系统并将其chrooted入其中.
然后我再次安装了dmraid和mdadm(不知道我为什么这样做),更新了我的grub设置并安装了grub到数组.
重新启动后,它抱怨mdadm,但一切都很顺利,它现在从阵列启动.
真是一个惊喜.谢谢你的帮助.
标签:linux,raid,mdadm,device-mapper,fakeraid 来源: https://codeday.me/bug/20190815/1662347.html