mdadm RAID - 增长期间重新启动 - 重塑未恢复

mdadm RAID - 增长期间重新启动 - 重塑未恢复

我使用的是 Debian 10,一周前全新安装。我从以前的服务器上移走了我的阵列,一切都很顺利。

然后我在阵列中添加了一个新驱动器并进行了增长。

mdadm --add /dev/md1 /dev/sda2
mdadm --grow /dev/md1 --raid-devices=5

但遗憾的是我忘记了重塑正在进行中,我彻底关闭了服务器。

重新启动时,突袭显示为“状态:干净”,但它没有恢复重塑。如果重塑完成,阵列大小显然应为 8000GB (2TB x4),而不是 6000GB。 “Delta Devices”这一行也仍然显示。所以有些事情很奇怪。

    # mdadm --detail /dev/md1
/dev/md1:
           Version : 1.2
     Creation Time : Wed Feb  1 20:36:04 2017
        Raid Level : raid5
        Array Size : 5860113408 (5588.64 GiB 6000.76 GB)
     Used Dev Size : 1953371136 (1862.88 GiB 2000.25 GB)
      Raid Devices : 5
     Total Devices : 5
       Persistence : Superblock is persistent

     Intent Bitmap : Internal

       Update Time : Sat Jan  9 02:28:28 2021
             State : clean
    Active Devices : 5
   Working Devices : 5
    Failed Devices : 0
     Spare Devices : 0

            Layout : left-symmetric
        Chunk Size : 512K

Consistency Policy : bitmap

     Delta Devices : 1, (4->5)

              Name : Debbie-NAS:1  (local to host Debbie-NAS)
              UUID : d1915c3c:c727e641:060346f9:a4f590ac
            Events : 18828

    Number   Major   Minor   RaidDevice State
       0       8      130        0      active sync   /dev/sdi2
       1       8      146        1      active sync   /dev/sdj2
       3       8       98        2      active sync   /dev/sdg2
       4       8      114        3      active sync   /dev/sdh2
       5       8        2        4      active sync   /dev/sda2

我尝试手动恢复重塑,但它什么也没做:

# mdadm --grow --continue /dev/md1 --raid-devices=5

mdadm --examine 的输出:

# mdadm --examine /dev/sd[ijgha]2
/dev/sda2:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x45
     Array UUID : d1915c3c:c727e641:060346f9:a4f590ac
           Name : Debbie-NAS:1  (local to host Debbie-NAS)
  Creation Time : Wed Feb  1 20:36:04 2017
     Raid Level : raid5
   Raid Devices : 5

 Avail Dev Size : 3906745344 (1862.88 GiB 2000.25 GB)
     Array Size : 7813484544 (7451.52 GiB 8001.01 GB)
  Used Dev Size : 3906742272 (1862.88 GiB 2000.25 GB)
    Data Offset : 259072 sectors
     New Offset : 254976 sectors
   Super Offset : 8 sectors
          State : clean
    Device UUID : 43eed232:f3d1d806:02e8bb5c:e1c90318

Internal Bitmap : 8 sectors from superblock
  Reshape pos'n : 2651604992 (2528.77 GiB 2715.24 GB)
  Delta Devices : 1 (4->5)

    Update Time : Sat Jan  9 02:28:28 2021
  Bad Block Log : 512 entries available at offset 16 sectors
       Checksum : 23eaf33b - correct
         Events : 18828

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 4
   Array State : AAAAA ('A' == active, '.' == missing, 'R' == replacing)
/dev/sdg2:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x45
     Array UUID : d1915c3c:c727e641:060346f9:a4f590ac
           Name : Debbie-NAS:1  (local to host Debbie-NAS)
  Creation Time : Wed Feb  1 20:36:04 2017
     Raid Level : raid5
   Raid Devices : 5

 Avail Dev Size : 3906745344 (1862.88 GiB 2000.25 GB)
     Array Size : 7813484544 (7451.52 GiB 8001.01 GB)
  Used Dev Size : 3906742272 (1862.88 GiB 2000.25 GB)
    Data Offset : 259072 sectors
     New Offset : 254976 sectors
   Super Offset : 8 sectors
          State : clean
    Device UUID : 2d31b7f3:57b1d12f:ba0d9e73:3cb36b33

Internal Bitmap : 8 sectors from superblock
  Reshape pos'n : 2651604992 (2528.77 GiB 2715.24 GB)
  Delta Devices : 1 (4->5)

    Update Time : Sat Jan  9 02:28:28 2021
  Bad Block Log : 512 entries available at offset 72 sectors
       Checksum : 401224d3 - correct
         Events : 18828

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 2
   Array State : AAAAA ('A' == active, '.' == missing, 'R' == replacing)
/dev/sdh2:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x45
     Array UUID : d1915c3c:c727e641:060346f9:a4f590ac
           Name : Debbie-NAS:1  (local to host Debbie-NAS)
  Creation Time : Wed Feb  1 20:36:04 2017
     Raid Level : raid5
   Raid Devices : 5

 Avail Dev Size : 3906745344 (1862.88 GiB 2000.25 GB)
     Array Size : 7813484544 (7451.52 GiB 8001.01 GB)
  Used Dev Size : 3906742272 (1862.88 GiB 2000.25 GB)
    Data Offset : 259072 sectors
     New Offset : 254976 sectors
   Super Offset : 8 sectors
          State : clean
    Device UUID : 017bea40:0a6ce8e3:f4a5639e:97a33826

Internal Bitmap : 8 sectors from superblock
  Reshape pos'n : 2651604992 (2528.77 GiB 2715.24 GB)
  Delta Devices : 1 (4->5)

    Update Time : Sat Jan  9 02:28:28 2021
  Bad Block Log : 512 entries available at offset 72 sectors
       Checksum : 5eeeb1f0 - correct
         Events : 18828

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 3
   Array State : AAAAA ('A' == active, '.' == missing, 'R' == replacing)
/dev/sdi2:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x45
     Array UUID : d1915c3c:c727e641:060346f9:a4f590ac
           Name : Debbie-NAS:1  (local to host Debbie-NAS)
  Creation Time : Wed Feb  1 20:36:04 2017
     Raid Level : raid5
   Raid Devices : 5

 Avail Dev Size : 3906745344 (1862.88 GiB 2000.25 GB)
     Array Size : 7813484544 (7451.52 GiB 8001.01 GB)
  Used Dev Size : 3906742272 (1862.88 GiB 2000.25 GB)
    Data Offset : 259072 sectors
     New Offset : 254976 sectors
   Super Offset : 8 sectors
          State : clean
    Device UUID : 31b13e8c:ede4a229:8da4c45c:d7c1814d

Internal Bitmap : 8 sectors from superblock
  Reshape pos'n : 2651604992 (2528.77 GiB 2715.24 GB)
  Delta Devices : 1 (4->5)

    Update Time : Sat Jan  9 02:28:28 2021
  Bad Block Log : 512 entries available at offset 72 sectors
       Checksum : d5a77dd7 - correct
         Events : 18828

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 0
   Array State : AAAAA ('A' == active, '.' == missing, 'R' == replacing)
/dev/sdj2:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x45
     Array UUID : d1915c3c:c727e641:060346f9:a4f590ac
           Name : Debbie-NAS:1  (local to host Debbie-NAS)
  Creation Time : Wed Feb  1 20:36:04 2017
     Raid Level : raid5
   Raid Devices : 5

 Avail Dev Size : 3906745344 (1862.88 GiB 2000.25 GB)
     Array Size : 7813484544 (7451.52 GiB 8001.01 GB)
  Used Dev Size : 3906742272 (1862.88 GiB 2000.25 GB)
    Data Offset : 259072 sectors
     New Offset : 254976 sectors
   Super Offset : 8 sectors
          State : clean
    Device UUID : 3d5bc161:4f1b1a23:e16f3630:57fcee88

Internal Bitmap : 8 sectors from superblock
  Reshape pos'n : 2651604992 (2528.77 GiB 2715.24 GB)
  Delta Devices : 1 (4->5)

    Update Time : Sat Jan  9 02:28:28 2021
  Bad Block Log : 512 entries available at offset 72 sectors
       Checksum : b380641a - correct
         Events : 18828

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 1
   Array State : AAAAA ('A' == active, '.' == missing, 'R' == replacing)

但由于某种原因,该数组似乎是只读的,也许它阻止了重塑?

# cat /proc/mdstat
    Personalities : [raid6] [raid5] [raid4] [linear] [multipath] [raid0] [raid1] [raid10]
    md1 : active (auto-read-only) raid5 sdi2[0] sdh2[4] sdj2[1] sdg2[3] sda2[5]
          5860113408 blocks super 1.2 level 5, 512k chunk, algorithm 2 [5/5] [UUUUU]
          bitmap: 0/15 pages [0KB], 65536KB chunk

底层文件系统已正确安装,我可以访问我的数据。

但一定是某个地方出了问题,因为数组没有达到应有的大小,而且重塑也没有完成。但我不知道如何解决它。

也许我可以尝试开始“检查”?

echo 'check' > /sys/block/md1/md/sync_action

但我担心如果重塑不完整,它可能会破坏某些东西。

任何想法 ?

答案1

最后,我执行了以下命令来开始重新整形:

mdadm --readwrite /dev/md1

cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4] [linear] [multipath] [raid0] [raid1] [raid10]
md1 : active raid5 sdi2[0] sdh2[4] sdj2[1] sdg2[3] sda2[5]
      5860113408 blocks super 1.2 level 5, 512k chunk, algorithm 2 [5/5] [UUUUU]
      [======>..............]  reshape = 33.9% (662920160/1953371136) finish=6817.6min speed=3152K/sec
      bitmap: 0/15 pages [0KB], 65536KB chunk

所以看起来一切都很好。这次我会在关闭服务器之前让重塑完成

相关内容