Linux软件raid无法为一个RAID1阵列包含一个设备

前端之家收集整理的这篇文章主要介绍了Linux软件raid无法为一个RAID1阵列包含一个设备前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
当我重启系统时,我的四个 Linux软件raid阵列中的一个会丢弃其中一个设备.其他三个阵列工作正常.我在内核版本2.6.32-5-amd64上运行RAID1.每次重新启动时,/ dev / md2只会出现一个设备.我可以通过说$sudo mdadm / dev / md2 –add / dev / sdc1来手动添加设备.这很好用,mdadm确认设备已重新添加如下:
mdadm: re-added /dev/sdc1

添加设备并允许数组时间重新同步后,这就是$cat / proc / mdstat的输出

Personalities : [raid1] 
md3 : active raid1 sda4[0] sdb4[1]
      244186840 blocks super 1.2 [2/2] [UU]

md2 : active raid1 sdc1[0] sdd1[1]
      732574464 blocks [2/2] [UU]

md1 : active raid1 sda3[0] sdb3[1]
      722804416 blocks [2/2] [UU]

md0 : active raid1 sda1[0] sdb1[1]
      6835520 blocks [2/2] [UU]

unused devices: <none>

然后我重新启动后,这就是$cat / proc / mdstat的输出

Personalities : [raid1] 
md3 : active raid1 sda4[0] sdb4[1]
      244186840 blocks super 1.2 [2/2] [UU]

md2 : active raid1 sdd1[1]
      732574464 blocks [2/1] [_U]

md1 : active raid1 sda3[0] sdb3[1]
      722804416 blocks [2/2] [UU]

md0 : active raid1 sda1[0] sdb1[1]
      6835520 blocks [2/2] [UU]

unused devices: <none>

在重启期间,这里是$sudo cat / var / log / syslog |的输出grep mdadm:

Jun 22 19:00:08 rook mdadm[1709]: RebuildFinished event detected on md device /dev/md2
Jun 22 19:00:08 rook mdadm[1709]: SpareActive event detected on md device /dev/md2,component device /dev/sdc1
Jun 22 19:00:20 rook kernel: [ 7819.446412] mdadm: sending ioctl 1261 to a partition!
Jun 22 19:00:20 rook kernel: [ 7819.446415] mdadm: sending ioctl 1261 to a partition!
Jun 22 19:00:20 rook kernel: [ 7819.446782] mdadm: sending ioctl 1261 to a partition!
Jun 22 19:00:20 rook kernel: [ 7819.446785] mdadm: sending ioctl 1261 to a partition!
Jun 22 19:00:20 rook kernel: [ 7819.515844] mdadm: sending ioctl 1261 to a partition!
Jun 22 19:00:20 rook kernel: [ 7819.515847] mdadm: sending ioctl 1261 to a partition!
Jun 22 19:00:20 rook kernel: [ 7819.606829] mdadm: sending ioctl 1261 to a partition!
Jun 22 19:00:20 rook kernel: [ 7819.606832] mdadm: sending ioctl 1261 to a partition!
Jun 22 19:03:48 rook kernel: [ 8027.855616] mdadm: sending ioctl 1261 to a partition!
Jun 22 19:03:48 rook kernel: [ 8027.855620] mdadm: sending ioctl 1261 to a partition!
Jun 22 19:03:48 rook kernel: [ 8027.855950] mdadm: sending ioctl 1261 to a partition!
Jun 22 19:03:48 rook kernel: [ 8027.855952] mdadm: sending ioctl 1261 to a partition!
Jun 22 19:03:49 rook kernel: [ 8027.962169] mdadm: sending ioctl 1261 to a partition!
Jun 22 19:03:49 rook kernel: [ 8027.962171] mdadm: sending ioctl 1261 to a partition!
Jun 22 19:03:49 rook kernel: [ 8028.054365] mdadm: sending ioctl 1261 to a partition!
Jun 22 19:03:49 rook kernel: [ 8028.054368] mdadm: sending ioctl 1261 to a partition!
Jun 22 19:10:23 rook kernel: [    9.588662] mdadm: sending ioctl 1261 to a partition!
Jun 22 19:10:23 rook kernel: [    9.588664] mdadm: sending ioctl 1261 to a partition!
Jun 22 19:10:23 rook kernel: [    9.601990] mdadm: sending ioctl 1261 to a partition!
Jun 22 19:10:23 rook kernel: [    9.601991] mdadm: sending ioctl 1261 to a partition!
Jun 22 19:10:23 rook kernel: [    9.602693] mdadm: sending ioctl 1261 to a partition!
Jun 22 19:10:23 rook kernel: [    9.602695] mdadm: sending ioctl 1261 to a partition!
Jun 22 19:10:23 rook kernel: [    9.605981] mdadm: sending ioctl 1261 to a partition!
Jun 22 19:10:23 rook kernel: [    9.605983] mdadm: sending ioctl 1261 to a partition!
Jun 22 19:10:23 rook kernel: [    9.606138] mdadm: sending ioctl 800c0910 to a partition!
Jun 22 19:10:23 rook kernel: [    9.606139] mdadm: sending ioctl 800c0910 to a partition!
Jun 22 19:10:48 rook mdadm[1737]: DegradedArray event detected on md device /dev/md2

这是mdadm.conf文件

ARRAY /dev/md0 Metadata=0.90 UUID=92121d42:37f46b82:926983e9:7d8aad9b
ARRAY /dev/md1 Metadata=0.90 UUID=9c1bafc3:1762d51d:c1ae3c29:66348110
ARRAY /dev/md2 Metadata=0.90 UUID=98cea6ca:25b5f305:49e8ec88:e84bc7f0
ARRAY /dev/md3 Metadata=1.2 name=rook:3 UUID=ca3fce37:95d49a09:badd0ddc:b63a4792

我还运行了$sudo smartctl -t long / dev / sdc,没有检测到硬件问题.只要我不重启,/ dev / md2似乎工作正常.有没有人有什么建议?

以下是重新添加设备并让它重新同步后$sudo mdadm -E / dev / sdc1的输出

/dev/sdc1:
          Magic : a92b4efc
        Version : 0.90.00
           UUID : 98cea6ca:25b5f305:49e8ec88:e84bc7f0 (local to host rook)
  Creation Time : Sun Jul 13 08:05:55 2008
     Raid Level : raid1
  Used Dev Size : 732574464 (698.64 GiB 750.16 GB)
     Array Size : 732574464 (698.64 GiB 750.16 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 2

    Update Time : Mon Jun 24 07:42:49 2013
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0
       Checksum : 5fd6cc13 - correct
         Events : 180998


      Number   Major   Minor   RaidDevice State
this     0       8       33        0      active sync   /dev/sdc1

   0     0       8       33        0      active sync   /dev/sdc1
   1     1       8       49        1      active sync   /dev/sdd1

以下是重新添加设备并让它重新同步后$sudo mdadm -D / dev / md2的输出

/dev/md2:
        Version : 0.90
  Creation Time : Sun Jul 13 08:05:55 2008
     Raid Level : raid1
     Array Size : 732574464 (698.64 GiB 750.16 GB)
  Used Dev Size : 732574464 (698.64 GiB 750.16 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 2
    Persistence : Superblock is persistent

    Update Time : Mon Jun 24 07:42:49 2013
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           UUID : 98cea6ca:25b5f305:49e8ec88:e84bc7f0 (local to host rook)
         Events : 0.180998

    Number   Major   Minor   RaidDevice State
       0       8       33        0      active sync   /dev/sdc1
       1       8       49        1      active sync   /dev/sdd1

解决方法

你在/ dev / sdc1上设置了分区类型’fd’吗?它应该设置为自动检测启动时间,但您仍然可以使用分区类型83手动添加它.
原文链接:https://www.f2er.com/linux/398826.html

猜你在找的Linux相关文章