我可以通过更改为 raid 5 来增加 raid 1 的容量吗?

1 linux mdadm raid5 raid1

我最初的 RAID 设置是使用 mdadm 的 2x2TB RAID 1。

我已经购买了第三个 2TB 驱动器,希望使用 mdadm 将 RAID 的总容量升级到 4 TB。

我已经运行了以下两个命令,但没有看到容量变化:

sudo mdadm --grow /dev/md0 --level=5
sudo mdadm --grow /dev/md0 --add /dev/sdd --raid-devices=3
Run Code Online (Sandbox Code Playgroud)

与mdadm的详细信息:

$ sudo mdadm --detail /dev/md0
[sudo] password for userd: 
/dev/md0:
           Version : 1.2
     Creation Time : Wed Jul  5 19:59:17 2017
        Raid Level : raid5
        Array Size : 1953383488 (1862.89 GiB 2000.26 GB)
     Used Dev Size : 1953383488 (1862.89 GiB 2000.26 GB)
      Raid Devices : 3
     Total Devices : 3
       Persistence : Superblock is persistent

     Intent Bitmap : Internal

       Update Time : Wed May 22 17:58:37 2019
             State : clean, reshaping 
    Active Devices : 3
   Working Devices : 3
    Failed Devices : 0
     Spare Devices : 0

            Layout : left-symmetric
        Chunk Size : 64K

Consistency Policy : bitmap

    Reshape Status : 5% complete
     Delta Devices : 1, (2->3)

              Name : userd:0  (local to host userd)
              UUID : 986fca95:68ef5344:5136f8af:b8d34a03
            Events : 13557

    Number   Major   Minor   RaidDevice State
       0       8        0        0      active sync   /dev/sda
       1       8       16        1      active sync   /dev/sdb
       2       8       48        2      active sync   /dev/sdd
Run Code Online (Sandbox Code Playgroud)

更新:随着重塑现在完成,只有 4TB 中的 2TB 可用。

/dev/md0:
           Version : 1.2
     Creation Time : Wed Jul  5 19:59:17 2017
        Raid Level : raid5
        Array Size : 3906766976 (3725.78 GiB 4000.53 GB)
     Used Dev Size : 1953383488 (1862.89 GiB 2000.26 GB)
      Raid Devices : 3
     Total Devices : 3
       Persistence : Superblock is persistent

     Intent Bitmap : Internal

       Update Time : Thu May 23 23:40:16 2019
             State : clean 
    Active Devices : 3
   Working Devices : 3
    Failed Devices : 0
     Spare Devices : 0

            Layout : left-symmetric
        Chunk Size : 64K

Consistency Policy : bitmap

              Name : userd:0  (local to host userd)
              UUID : 986fca95:68ef5344:5136f8af:b8d34a03
            Events : 17502

    Number   Major   Minor   RaidDevice State
       0       8        0        0      active sync   /dev/sda
       1       8       16        1      active sync   /dev/sdb
       2       8       48        2      active sync   /dev/sdd
Run Code Online (Sandbox Code Playgroud)

如何让 mdadm 使用所有 4TB 而不仅仅是 2TB?

roa*_*ima 5

查看重塑状态:

   Update Time : Wed May 22 17:58:37 2019
         State : clean, reshaping 
...
Reshape Status : 5% complete
 Delta Devices : 1, (2->3)
Run Code Online (Sandbox Code Playgroud)

在完成之前,您不会获得任何额外的存储空间,并且您提供的报告显示它目前仅完成了 5%。

在此重塑过程中,请勿中断该过程或尝试再次更改形状。