更换了 RAID 控制器,RAID 配置丢失,服务器无法启动

更换了 RAID 控制器,RAID 配置丢失,服务器无法启动

我的 raid 控制器坏了,我的主机商 OVH 更换了它。他们只提供硬件支持,所以在更换控制器后,他们让机器处于救援模式。当我将其置于正常 HD 启动模式时,它不会启动。

我有 2 个驱动器软件 RAID1 设置,用于托管 CentOS 文件。

我有 4 个驱动器软件 RAID10,里面有我的文件。

在救援模式下,我使用以下命令检查了阵列:

cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [multipath] [faulty]
unused devices: <none>

fdisk 显示:

root@rescue:/mnt# fdisk -l

Disk /dev/ram0: 50 MiB, 52428800 bytes, 102400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram1: 50 MiB, 52428800 bytes, 102400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram2: 50 MiB, 52428800 bytes, 102400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram3: 50 MiB, 52428800 bytes, 102400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram4: 50 MiB, 52428800 bytes, 102400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram5: 50 MiB, 52428800 bytes, 102400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram6: 50 MiB, 52428800 bytes, 102400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram7: 50 MiB, 52428800 bytes, 102400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram8: 50 MiB, 52428800 bytes, 102400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram9: 50 MiB, 52428800 bytes, 102400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram10: 50 MiB, 52428800 bytes, 102400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram11: 50 MiB, 52428800 bytes, 102400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram12: 50 MiB, 52428800 bytes, 102400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram13: 50 MiB, 52428800 bytes, 102400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram14: 50 MiB, 52428800 bytes, 102400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram15: 50 MiB, 52428800 bytes, 102400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/sda: 447.1 GiB, 480103981056 bytes, 937703088 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 7D555295-0B10-4D4B-9A17-6EEFBBA3CB99

Device         Start       End   Sectors   Size Type
/dev/sda1       2048   1048575   1046528   511M EFI System
/dev/sda2    1048576  42006527  40957952  19.5G Linux RAID
/dev/sda3   42006528 936644607 894638080 426.6G Linux RAID
/dev/sda4  936644608 937691135   1046528   511M Linux swap

Disk /dev/sdb: 447.1 GiB, 480103981056 bytes, 937703088 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 63C7B674-C42F-4F25-A610-F72AFACD5134

Device         Start       End   Sectors   Size Type
/dev/sdb1       2048   1048575   1046528   511M EFI System
/dev/sdb2    1048576  42006527  40957952  19.5G Linux RAID
/dev/sdb3   42006528 936644607 894638080 426.6G Linux RAID
/dev/sdb4  936644608 937691135   1046528   511M Linux swap

Disk /dev/sde: 10.9 TiB, 12000138625024 bytes, 23437770752 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 6FDD3C33-DE0C-4DF0-9554-677826FC34F6

Device     Start         End     Sectors  Size Type
/dev/sde1   2048 23437770718 23437768671 10.9T Linux RAID

Disk /dev/sdf: 10.9 TiB, 12000138625024 bytes, 23437770752 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 433686A7-5E89-4AE4-8BF8-3AAC9E9BDD82

Device     Start         End     Sectors  Size Type
/dev/sdf1   2048 23437770718 23437768671 10.9T Linux RAID

Disk /dev/sdd: 10.9 TiB, 12000138625024 bytes, 23437770752 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 638E004E-798E-4C77-BEFD-5FF5AADEA855

Device     Start         End     Sectors  Size Type
/dev/sdd1   2048 23437770718 23437768671 10.9T Linux RAID

Disk /dev/sdc: 10.9 TiB, 12000138625024 bytes, 23437770752 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 42B1E5D7-697E-4BD5-8B9B-86B664022E25

Device     Start         End     Sectors  Size Type
/dev/sdc1   2048 23437770718 23437768671 10.9T Linux RAID

所有磁盘都完好无损,因此所有文件都还在那里。但只有 RAID 设置不再存在。我该如何重新创建 RAID1 和 RAID10 设置,以便再次启动 CentOS?

我的托管商提供 0 支持,OVH 真的很糟糕。

我是否应该简单地使用 mdadm 来创建新阵列?我担心会破坏某些东西。我看到了一些警告,所以我没有按继续:

root@rescue:/mnt# mdadm --create /dev/md127 --level raid10 --name data --raid-disks 4 /dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdf1
mdadm: /dev/sdc1 appears to be part of a raid array:
       level=raid10 devices=4 ctime=Mon Oct  7 12:02:49 2019
mdadm: partition table exists on /dev/sdc1 but will be lost or
       meaningless after creating array
mdadm: /dev/sdd1 appears to be part of a raid array:
       level=raid10 devices=4 ctime=Mon Oct  7 12:02:49 2019
mdadm: partition table exists on /dev/sdd1 but will be lost or
       meaningless after creating array
mdadm: /dev/sde1 appears to be part of a raid array:
       level=raid10 devices=4 ctime=Mon Oct  7 12:02:49 2019
mdadm: partition table exists on /dev/sde1 but will be lost or
       meaningless after creating array
mdadm: /dev/sdf1 appears to be part of a raid array:
       level=raid10 devices=4 ctime=Mon Oct  7 12:02:49 2019
mdadm: partition table exists on /dev/sdf1 but will be lost or
       meaningless after creating array
Continue creating array?

相关内容