It looks like you're new here. If you want to get involved, click one of these buttons!
Had a server with OVH and my primary disk crashed but was running raid so had backup. They replaced the disk but how can i restore data back to new disk and bring server online?
1st: A raid is no backup.
2nd: Looks like you're using mdraid, so resilver it as soon as your faulty disk got replaced?
Hello! Here is the brief manual of how to do it:
Remove the failed disk:
mdadm /dev/md127 -r $FAILEDPARTITION
If encountering "devices or resource busy" error, follow these commands:
mdadm --manage /dev/md127 --fail $FAILEDPARTITION
Check drive and its partitions:
Prepare the new disk with the same partition layout:
sgdisk --backup=sdх_parttable_gpt.bak /dev/sda
sgdisk --load-backup=sdх_parttable_gpt.bak /dev/sdb
sfdisk --dump /dev/sdx > sdх_parttable_mbr.bak (Create)
sfdisk /dev/sdb < sdх_parttable_mbr.bak (Restore)
Note: Create a backup before pasting the partition table.
Add the new hard drive to the RAID1 array:
mdadm /dev/md127 -a /dev/sdx
After synchronization, check the status:
Best to take the help of the provider for a quicker and safe data recovery.