Mdadm

mdadm reshape raid6 無法啟動

  • November 9, 2016

在使用實際設備之前,嘗試讓自己熟悉一些 raid 管理選項。所以我正在使用 USB 記憶棒上的幾個小分區。

目標是用 4 個分區和一個附加分區擴展現有的 raid6。我用了

mdadm --add /dev/md127 /dev/sdd9
mdadm -v --grow --raid-devices=5 /dev/md127

這似乎成功地開始了重塑過程。但是,reshape 已經在 0% 處掛起大約一個小時了:

as01449@P-H-287-04:~> cat /proc/mdstat                                                                                                                              
Personalities : [raid6] [raid5] [raid4]                                                                                                                                           
md127 : active raid6 sdd9[4] sdd8[3] sdd7[2] sdd6[1] sdd5[0]                                                                                                                      
     2099200 blocks super 1.2 level 6, 512k chunk, algorithm 2 [5/5] [UUUUU]                                                                                                     
     [>....................]  reshape =  0.0% (0/1049600) finish=41.7min speed=406K/sec                                                                                          

unused devices: <none>                                                                                                                                                            
as01449@P-H-287-04:~> sudo mdadm --detail /dev/md127                                                                   /dev/md127:                                                                                                                                                                       
       Version : 1.2                                                                                                                                                             
 Creation Time : Thu Nov 10 03:52:45 2016                                                                                                                                        
    Raid Level : raid6                                                                                                                                                           
    Array Size : 2099200 (2.00 GiB 2.15 GB)                                                                                                                                      
 Used Dev Size : 1049600 (1025.17 MiB 1074.79 MB)                                                                                                                                
  Raid Devices : 5
 Total Devices : 5
   Persistence : Superblock is persistent

   Update Time : Thu Nov 10 04:19:00 2016
         State : clean, reshaping 
Active Devices : 5
Working Devices : 5
Failed Devices : 0
 Spare Devices : 0

        Layout : left-symmetric
    Chunk Size : 512K

Reshape Status : 0% complete
 Delta Devices : 1, (4->5)

          Name : P-H-287-04.site:raidbackup  (local to host P-H-287-04.site)
          UUID : a8bed6ee:57936286:509a6406:63a314e3
        Events : 22

   Number   Major   Minor   RaidDevice State
      0       8       53        0      active sync   /dev/sdd5
      1       8       54        1      active sync   /dev/sdd6
      2       8       55        2      active sync   /dev/sdd7
      3       8       56        3      active sync   /dev/sdd8
      4       8       57        4      active sync   /dev/sdd9

預計完成時間只是在不斷增長。我錯過了什麼?

男人mdadm:

  --backup-file=
         This is needed when --grow is used to  increase  the  number  of
         raid-devices  in  a RAID5 or RAID6 if there are no spare devices
         available, or to shrink, change RAID level or layout.   See  the
         GROW  MODE section below on RAID-DEVICES CHANGES.  The file must
         be stored on a separate device, not  on  the  RAID  array  being
         reshaped.

引用自:https://serverfault.com/questions/814025