我正在尝试将磁盘 (sdc1) 添加到降级的 RAID1 阵列 (md126),但我不知道如何继续。任何帮助都将不胜感激,因为我不想丢失驱动器上的任何数据。
cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md126 : active raid1 sdd[0]
9766433792 blocks super external:/md127/0 [2/1] [_U]
md127 : inactive sdd[0](S)
2940 blocks super external:imsm
unused devices: <none>
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 1.9T 0 disk
├─sda1 8:1 0 500M 0 part
├─sda2 8:2 0 1.9T 0 part
└─sda3 8:3 0 455M 0 part
sdb 8:16 0 1.9T 0 disk
├─sdb1 8:17 0 238.4M 0 part /boot
└─sdb2 8:18 0 1.9T 0 part
└─sdb2_crypt 253:0 0 1.9T 0 crypt /
sdc 8:32 0 9.1T 0 disk
└─sdc1 8:33 0 9.1T 0 part
sdd 8:48 0 9.1T 0 disk
└─md126 9:126 0 9.1T 0 raid1
└─md126p1 259:2 0 9.1T 0 md /mnt/10TB
sde 8:64 0 447.1G 0 disk
├─sde1 8:65 0 450M 0 part
├─sde2 8:66 0 100M 0 part
├─sde3 8:67 0 16M 0 part
└─sde4 8:68 0 446.6G 0 part
nvme0n1 259:0 0 1.1T 0 disk
答案1
阅读man dmraid
。其中部分内容如下:
{-R| --rebuild} RAID-set [device-path]
Rebuild raid array after a drive has failed and a new drive is added. For Intel chipset based systems, there are two methods in which a new drive is added to
the system.
1. Using OROM to identify a new drive
During system reboot, enter OROM and mark the new drive as the rebuild drive.
After booting to the OS, use the dmraid command to rebuild.
Example: dmraid -R raid_set
2. Using dmraid to identify a new drive
Boot to the OS and use the dmraid command with the new drive as the second parameter.
Example: dmraid -R raid_set /dev/sdc
3. Using hot spare drive
Mark a drive as hot spare using the "dmraid -f isw -S" command. Then use the dmraid command to start the rebuild.
Example: dmraid -R raid_set