RAID5 每次重启都需要添加驱动器

RAID5 每次重启都需要添加驱动器

我在 Ubuntu Server 14.04.3 LTS 上有一个 3 磁盘 RAID5 mdadm 阵列,总计 4TB。

由于由与阵列无关且已被替换的设备导致的内核恐慌,每次重新启动后阵列都会启动 [UU_] 因此我总是必须运行mdadm --add /dev/md0 /dev/sdd1并且它开始重建并且它确实成功重建。

Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : active raid5 sdd1[4] sdb1[3] sdc1[1]
      3906763776 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/3] [UUU]

unused devices: <none>

但是每次重启我都必须这样做,而且我注意到磁盘编号似乎错误:4、3 和 1,而不是 2、1 和 0。

root@Bt-Networks-Server:~# mdadm --detail /dev/md0
/dev/md0:
        Version : 1.2
  Creation Time : Fri Aug  1 00:53:53 2014
     Raid Level : raid5
     Array Size : 3906763776 (3725.78 GiB 4000.53 GB)
  Used Dev Size : 1953381888 (1862.89 GiB 2000.26 GB)
   Raid Devices : 3
  Total Devices : 3
    Persistence : Superblock is persistent

    Update Time : Mon Oct 26 17:40:43 2015
          State : clean
 Active Devices : 3
Working Devices : 3
 Failed Devices : 0
  Spare Devices : 0

         Layout : left-symmetric
     Chunk Size : 512K

           Name : Bt-Networks-Server:0  (local to host Bt-Networks-Server)
           UUID : 4e860a9e:0b433a00:54d2c991:78ca3d15
         Events : 83137

    Number   Major   Minor   RaidDevice State
       4       8       49        0      active sync   /dev/sdd1
       1       8       33        1      active sync   /dev/sdc1
       3       8       17        2      active sync   /dev/sdb1

我还在 dmesg 上发现有关启动非新磁盘的以下信息:

[    2.430966] md: raid1 personality registered for level 1
[    2.500019] raid6: sse2x1    3900 MB/s
[    2.568110] raid6: sse2x2    4957 MB/s
[    2.582322] md: bind<sdc1>
[    2.583992] md: bind<sdd1>
[    2.608030] usb 6-2: new low-speed USB device number 2 using uhci_hcd
[    2.619248] md: bind<sdb1>
[    2.620098] md: kicking non-fresh sdd1 from array!
[    2.620103] md: unbind<sdd1>
[    2.636013] raid6: sse2x4    6926 MB/s
[    2.636015] raid6: using algorithm sse2x4 (6926 MB/s)
[    2.636017] raid6: using ssse3x2 recovery algorithm
[    2.637624] xor: measuring software checksum speed
[    2.664021] usb 7-1: new low-speed USB device number 2 using uhci_hcd
[    2.676012]    prefetch64-sse: 10026.000 MB/sec
[    2.716011]    generic_sse:  8868.000 MB/sec
[    2.716013] xor: using function: prefetch64-sse (10026.000 MB/sec)
[    2.717321] async_tx: api initialized (async)
[    2.725129] md: raid6 personality registered for level 6
[    2.725131] md: raid5 personality registered for level 5
[    2.725133] md: raid4 personality registered for level 4
[    2.728509] md: export_rdev(sdd1)
[    2.729556] md/raid:md0: device sdb1 operational as raid disk 2
[    2.729559] md/raid:md0: device sdc1 operational as raid disk 1
[    2.729927] md/raid:md0: allocated 0kB
[    2.729976] md/raid:md0: raid level 5 active with 2 out of 3 devices, algorithm 2
[    2.729983] RAID conf printout:
[    2.729984]  --- level:5 rd:3 wd:2
[    2.729986]  disk 1, o:1, dev:sdc1
[    2.729988]  disk 2, o:1, dev:sdb1
[    2.730030] md0: detected capacity change from 0 to 4000526106624
[    2.731863] md: raid10 personality registered for level 10
[    2.755618]  md0: unknown partition table
[    2.812332] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)

我已经通过更新重新检查了 mdadm.conf:

root@Bt-Networks-Server:~# mdadm --detail --scan
ARRAY /dev/md/0 metadata=1.2 name=Bt-Networks-Server:0 UUID=4e860a9e:0b433a00:54d2c991:78ca3d15

保存到配置文件并运行update-initramfs -u

有什么解决方案可以避免每次重启时添加和重建/重新同步阵列?

谢谢!

编辑:

这是 /dev/sdd 的分区布局,分区表类型为 MBR:

Disk /dev/sdd: 2000.4 GB, 2000398934016 bytes
81 heads, 63 sectors/track, 765633 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0xdda80ffc

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1            2048  3907029167  1953513560   fd  Linux raid autodetect

相关内容