1

My raid controller went bust, and my hoster OVH replaced it. They only offer hardware support, so after replacing the controller they left the machine in Rescue mode. When I put it in normal HD boot mode it won't boot up.

I had 2 drive software RAID1 setup which hosted the CentOS files.

And I had 4 drives software RAID10 which had my files.

In rescure mode I checked the array with:

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

and fdisk shows:

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

All the disks are intact, so all the files are still there. But just the raid setup isn't there anymore. How can I recreate my RAID1 and RAID10 setup so that I can boot into CentOS again?

My hoster offers 0 support, OVH is really terrible.

Should I simply use mdadm to create a new array? I'm worried I'm breaking something. I saw some warnings, so I didn't press continue:

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?
Mr.Boon
  • 1,471
  • 4
  • 24
  • 43
  • 3
    Before you go any further - do you have backups? Also, have you tried to `assemble` the existing array instead of `create`? `create` will make a *new* RAID array which is what you don't want! `mdadm --assemble` – Bert Oct 22 '19 at 16:11
  • Thank you, that is what I needed – Mr.Boon Oct 23 '19 at 06:32
  • are you talking about your software based RAID of Hardware based RAID controller? if there is something happened with the hardware based controller, then replacing it with a new controller, dosen't have to make any corruption to your data. unless if they have changed the location of the hard drives from their original bay numbers. – Zareh Kasparian Oct 23 '19 at 20:23

0 Answers0