我正在运行 Ubuntu Server 12.04。我执行了 apt-get upgrade 并收到了来自 mdadm 的警告。
update-initramfs: Generating /boot/initrd.img-3.11.0-24-generic
W: mdadm: the array /dev/md3 with UUID e3d153f0:6edf1702:1f51fb89:78ee93fe
W: mdadm: is currently active, but it is not listed in mdadm.conf. if
W: mdadm: it is needed for boot, then YOUR SYSTEM IS NOW UNBOOTABLE!
W: mdadm: please inspect the output of /usr/share/mdadm/mkconf, compare
W: mdadm: it to /etc/mdadm/mdadm.conf, and make the necessary changes.
W: mdadm: the array /dev/md1 with UUID 76492e25:648c4dcd:1f51fb89:78ee93fe
W: mdadm: is currently active, but it is not listed in mdadm.conf. if
W: mdadm: it is needed for boot, then YOUR SYSTEM IS NOW UNBOOTABLE!
W: mdadm: please inspect the output of /usr/share/mdadm/mkconf, compare
W: mdadm: it to /etc/mdadm/mdadm.conf, and make the necessary changes.
我当前的 mdadm.conf 是:
# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#
# by default, scan all partitions (/proc/partitions) for MD superblocks.
# alternatively, specify devices to scan, using wildcards if desired.
DEVICE partitions
# auto-create devices with Debian standard permissions
CREATE owner=root group=disk mode=0660 auto=yes
# automatically tag new arrays as belonging to the local system
HOMEHOST <system>
# instruct the monitoring daemon where to send mail alerts
MAILADDR root
# definitions of existing MD arrays
# This file was auto-generated on Tue, 11 May 2010 20:53:30 +0200
# by mkconf $Id$
ARRAY /dev/md1 level=raid1 num-devices=2 devices=/dev/sda1,/dev/sdb1
ARRAY /dev/md3 level=raid1 num-devices=2 devices=/dev/sda3,/dev/sdb3
生成的配置/usr/share/mdadm/mkconf
是:
# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#
# by default (built-in), scan all partitions (/proc/partitions) and all
# containers for MD superblocks. alternatively, specify devices to scan, using
# wildcards if desired.
#DEVICE partitions
# auto-create devices with Debian standard permissions
CREATE owner=root group=disk mode=0660 auto=yes
# automatically tag new arrays as belonging to the local system
HOMEHOST <system>
# instruct the monitoring daemon where to send mail alerts
MAILADDR root
# definitions of existing MD arrays
ARRAY /dev/md1 UUID=76492e25:648c4dcd:1f51fb89:78ee93fe
ARRAY /dev/md3 UUID=e3d153f0:6edf1702:1f51fb89:78ee93fe
警告说 /dev/md1 和 /dev/md3 未列出,即使它们在配置中。将配置更改为第二个可以吗?或者这会导致问题吗?
答案1
我看到的唯一区别是这一行:
#DEVICE partitions
这在生成的配置文件中被注释掉了,但你的配置文件中没有。我只需取消注释并提交更改即可。如果配置一致,这样的警告往往是“提醒”而不是实际问题。