在运行系统上设置 Raid1

在运行系统上设置 Raid1

我有 2 个磁盘 sda 和 sdb,它们有几个分区。我必须为正在运行的系统创建一个 raid1。我设法在 root 上用 md0 设置了 raid1,但还有 2 个分区安装在 /home 和 /var 上,我无法将它们添加到 raid 中。以下是配置....有人能指导我哪里出了问题,以及如何将这些 md127 和 md2

NAME      MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT

sda         8:0    0 931.5G  0 disk
├─sda1      8:1    0   9.3G  0 part
│ └─md0     9:0    0   9.3G  0 raid1 /
├─sda2      8:2    0   7.5G  0 part  [SWAP]
├─sda3      8:3    0     1K  0 part
├─sda5      8:5    0  20.5G  0 part  /home
├─sda6      8:6    0  55.9G  0 part  /var
└─sda7      8:7    0 838.4G  0 part

sdb         8:16   0 931.5G  0 disk
├─sdb1      8:17   0   9.3G  0 part
│ └─md0     9:0    0   9.3G  0 raid1 /
├─sdb2      8:18   0   7.5G  0 part
├─sdb3      8:19   0     1K  0 part
├─sdb5      8:21   0  20.5G  0 part
│ └─md127   9:127  0  20.5G  0 raid1
└─sdb6      8:22   0  55.9G  0 part
  └─md2     9:2    0  55.9G  0 raid1

sr0        11:0    1  1024M  0 rom

-----------------------------------------------------------
md0 : active raid1 sdb1[1] sda1[2]
      9735168 blocks super 1.2 [2/2] [UU]
md127 : active (auto-read-only) raid1 sdb5[1]
    21466112 blocks super 1.2 [2/1] [_U]
md2 : active (auto-read-only) raid1 sdb6[1]
    58559488 blocks super 1.2 [2/1] [_U]
unused devices: <none>

-------------------------------------------------------
/dev/md127:
  
         Version : 1.2
  
   Creation Time : Mon Jun 26 18:21:00 2023
      Raid Level : raid1
      Array Size : 21466112 (20.47 GiB 21.98 GB)
   Used Dev Size : 21466112 (20.47 GiB 21.98 GB)
    Raid Devices : 2
   Total Devices : 1
     Persistence : Superblock is persistent
       Update Time : Mon Jun 26 18:21:00 2023
           State : clean, degraded
  
  Active Devices : 1
 Working Devices : 1
  Failed Devices : 0
   Spare Devices : 0


Consistency Policy : resync

              Name : dns003:1  (local to host dns003)
  
            UUID : xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  
          Events : 0

    Number   Major   Minor   RaidDevice State
  
     -       0        0        0      removed
  
     1       8       21        1      active sync   /dev/sdb5

sudo mdadm /dev/md127 -a /dev/sda5

mdadm:无法打开 /dev/sda5:设备或资源繁忙


相关内容