apt-get update mdadm可怕的警告


8

只需在我的一台专用服务器上运行apt-get更新,然后留下一个相对可怕的警告:

Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-2.6.26-2-686-bigmem
W: mdadm: the array /dev/md/1 with UUID c622dd79:496607cf:c230666b:5103eba0
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/md/2 with UUID 24120323:8c54087c:c230666b:5103eba0
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/md/6 with UUID eef74de5:9267b2a1:c230666b:5103eba0
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/md/5 with UUID 5d45b20c:04d8138f:c230666b:5103eba0
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.

按照指示,我检查了/ usr / share / mdadm / mkconf的输出,并与/etc/mdadm/mdadm.conf进行了比较,它们是完全不同的。

这是/etc/mdadm/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
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=b93b0b87:5f7c2c46:0043fca9:4026c400
ARRAY /dev/md1 level=raid1 num-devices=2 UUID=c0fa8842:e214fb1a:fad8a3a2:28f2aabc
ARRAY /dev/md2 level=raid1 num-devices=2 UUID=cdc2a9a9:63bbda21:f55e806c:a5371897
ARRAY /dev/md3 level=raid1 num-devices=2 UUID=eca75495:9c9ce18c:d2bac587:f1e79d80

# This file was auto-generated on Wed, 04 Nov 2009 11:32:16 +0100
# by mkconf $Id$

这是/ usr / share / mdadm / mkconf中的输出

# 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
ARRAY /dev/md1 UUID=c622dd79:496607cf:c230666b:5103eba0
ARRAY /dev/md2 UUID=24120323:8c54087c:c230666b:5103eba0
ARRAY /dev/md5 UUID=5d45b20c:04d8138f:c230666b:5103eba0
ARRAY /dev/md6 UUID=eef74de5:9267b2a1:c230666b:5103eba0

# This configuration was auto-generated on Sat, 25 Feb 2012 13:10:00 +1030
# by mkconf 3.1.4-1+8efb9d1+squeeze1

据我了解,我需要将/etc/mdadm/mdadm.conf文件中以'ARRAY'开头的四行替换为/ usr / share / mdadm / mkconf输出中的四行'ARRAY'。

当我这样做并运行update-initramfs -u时,不再有警告。

我上面做的正确吗?我现在害怕重新启动服务器,因为担心它不会重新启动,并且作为远程专用服务器,这肯定意味着停机,并且可能再次运行很昂贵。

跟进(回答问题):

mount的输出:

/dev/md1 on / type ext3 (rw,usrquota,grpquota)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
/dev/md2 on /boot type ext2 (rw)
/dev/md5 on /tmp type ext3 (rw)
/dev/md6 on /home type ext3 (rw,usrquota,grpquota)

mdadm-细节/ dev / md0

mdadm: md device /dev/md0 does not appear to be active.

mdadm --detail / dev / md1

/dev/md1:
    Version : 0.90
  Creation Time : Sun Aug 14 09:43:08 2011
     Raid Level : raid1
     Array Size : 31463232 (30.01 GiB 32.22 GB)
  Used Dev Size : 31463232 (30.01 GiB 32.22 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 1
    Persistence : Superblock is persistent

    Update Time : Sat Feb 25 14:03:47 2012
      State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

       UUID : c622dd79:496607cf:c230666b:5103eba0
     Events : 0.24

    Number   Major   Minor   RaidDevice State
       0       8        1        0      active sync   /dev/sda1
       1       8       17        1      active sync   /dev/sdb1

mdadm --detail / dev / md2

/dev/md2:
    Version : 0.90
  Creation Time : Sun Aug 14 09:43:09 2011
     Raid Level : raid1
     Array Size : 104320 (101.89 MiB 106.82 MB)
  Used Dev Size : 104320 (101.89 MiB 106.82 MB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 2
    Persistence : Superblock is persistent

    Update Time : Sat Feb 25 13:20:20 2012
      State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

       UUID : 24120323:8c54087c:c230666b:5103eba0
     Events : 0.30

    Number   Major   Minor   RaidDevice State
       0       8        2        0      active sync   /dev/sda2
       1       8       18        1      active sync   /dev/sdb2

mdadm --detail / dev / md3

mdadm: md device /dev/md3 does not appear to be active.

mdadm --detail / dev / md5

/dev/md5:
    Version : 0.90
  Creation Time : Sun Aug 14 09:43:09 2011
     Raid Level : raid1
     Array Size : 2104448 (2.01 GiB 2.15 GB)
  Used Dev Size : 2104448 (2.01 GiB 2.15 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 5
    Persistence : Superblock is persistent

    Update Time : Sat Feb 25 14:09:03 2012
      State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

       UUID : 5d45b20c:04d8138f:c230666b:5103eba0
     Events : 0.30

    Number   Major   Minor   RaidDevice State
       0       8        5        0      active sync   /dev/sda5
       1       8       21        1      active sync   /dev/sdb5

mdadm --detail / dev / md6

/dev/md6:
    Version : 0.90
  Creation Time : Sun Aug 14 09:43:09 2011
     Raid Level : raid1
     Array Size : 453659456 (432.64 GiB 464.55 GB)
  Used Dev Size : 453659456 (432.64 GiB 464.55 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 6
    Persistence : Superblock is persistent

    Update Time : Sat Feb 25 14:10:00 2012
      State : active
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

       UUID : eef74de5:9267b2a1:c230666b:5103eba0
     Events : 0.31

    Number   Major   Minor   RaidDevice State
       0       8        6        0      active sync   /dev/sda6
       1       8       22        1      active sync   /dev/sdb6

跟进2(回答问题):

/ etc / fstab的输出

/dev/md1      /                    ext3 defaults,usrquota,grpquota 1 1
devpts         /dev/pts             devpts     mode=0620,gid=5       0 0
proc           /proc                proc       defaults              0 0
#usbdevfs       /proc/bus/usb        usbdevfs   noauto                0 0
/dev/cdrom     /media/cdrom         auto       ro,noauto,user,exec   0 0
/dev/dvd       /media/dvd           auto       ro,noauto,user,exec   0 0
#
#
#
/dev/md2       /boot    ext2       defaults 1 2
/dev/sda3       swap     swap       pri=42   0 0
/dev/sdb3       swap     swap       pri=42   0 0
/dev/md5       /tmp     ext3       defaults 0 0
/dev/md6       /home    ext3       defaults,usrquota,grpquota 1 2

1
它认为它们应该是1、2、5和6-您现有的配置将它们设置为0、1、2、3。有些不正确。您能否提供每个MD设备的输出mountmdadm --detail命令?
Shane Madden '02

谢谢-上面添加了
跟进

Answers:


2

看起来警告正确-您当前的布局与您的布局截然不同mdadm.conf

所提供的设置/usr/share/mdadm/mkconf似乎正确。只是为了验证-您/etc/fstab输入的内容是否与您当前的坐骑匹配?

由于该系统上似乎有些大的变化,因此我仍然会有点担心重新启动。先备份!


是的,/ etc / fstab似乎同意新的安装设置。我已经在上面添加了/ etc / fstab的输出(在原始问题的FOLLOW UP 2中)。奇怪,我不知道系统设置该如​​何改变...?是的,将在尝试重新启动之前备份所有重要数据。谢谢。
user568829 '02

是的,除了以外,似乎所有内容都已更新mdadm.conf。奇怪!也许检查修改时间戳/etc/fstab以猜测何时可能发生更改?
Shane Madden

回想一下可能与apt更新期间出现的一个问题有关。屏幕上出现“ Configuring mdadm”,询问我是否想要全部或全部,我不确定并且似乎无法在Google上找到任何信息,所以只需单击输入默认值即可,该默认值设置为All ...
user568829'2

-rw-r--r-- 1个根目录703 2011年8月14日/ etc / fstab
user568829

2
@ user568829,如果您想再次看到该对话框,可以重新运行dpkg-reconfigure mdadm。它询问您initrd需要哪些卷才能用于系统引导。通常,您只能选择全部,除非某些磁盘在网络启动(iSCSI)或类似操作之前不可用。
Linux Geek '02


1

我有一个类似的问题,但是mdadm.conf在Debian升级后(从Lenny转换为Squeeze),它变空了,而不是使用不同的数组。

W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.

相同的解决方案有效。我使用的输出mkconf作为我的mdadm.conf

/usr/share/mdadm/mkconf > /etc/mdadm/mdadm.conf

重新启动测试通过。


0

只是跟进。

最后,备份了服务器上的所有数据,然后重新启动,服务器重新启动没有问题。因此,上面概述的变化(在原始问题中)是正确的。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.