Need Help Fixing OS Raid 1

Hello,

The server OS RAID 1 is failed one disk.. now It has been replace new disk.
I need someone to rebuild the raid. via rescue mode

Comments

  • tetechtetech OG
    edited January 2023

    If you're not comfortable doing it, you should hire a tech.
    @skorupion was looking for work?

  • If I had time I would rebuild it for him. Just a little bit in my plate for now. @skorupion should be able to handle it. If he isn't able or something comes up feel free to PM and we will see if we can sort it

    "I would have gotten away with it too, if it wasn't for that meddling Frankz and Mason!!"

  • RadiRadi Hosting ProviderOG
    edited January 2023

    Steps to replace a broken disk in software RAID array.

    Mark the disk as failed:
    mdadm --manage /dev/md0 --fail /dev/sdb1

    Verify:
    cat /proc/mdstat

    Example output:
    Personalities : [linear] [multipath] [raid0] [raid1] [raid5] [raid4] [raid6] [raid10]
    md0 : active raid1 sda1[0] sdb1 [2] (F)
    976773168 blocks [2/1] [U_]

    md1 : active raid1 sda2[0] sdb2[1]
    976773168 blocks [2/2] [UU]

    Remove disk from array:
    mdadm --manage /dev/md0 --remove /dev/sdb1

    P.S. You need to do the step 2 for each array, respectively replacing the partitions.

    Replace disk on machine.

    Copy partition table from the healthy disk to the replaced one.
    sfdisk -d /dev/sda | sfdisk /dev/sdb

    Add the replaced disk back to the array:
    mdadm --manage /dev/md0 --add /dev/sdb1

    P.S. You need to do the step 5 for each array, respectively replacing the partitions.

    Verify with:
    /sbin/mdadm --detail /dev/md0
    or again:
    cat /proc/mdstat

    Thanked by (4)ariq01 ehab bdl Not_Oles

    Get some hosting at https://drserver.net .

  • First step should be taking a full backup of all data while it's still accessible. If the remaining disk dies during rebuild you'll be f*cked. Any sysadmin taking on such jobs should clarify on the risks before and whose liability that is. Just saying. 😉

  • @skorupion did this get sorted or what? I want to drop it off my radar and move on.

    "I would have gotten away with it too, if it wasn't for that meddling Frankz and Mason!!"

  • skorupionskorupion Services Provider

    @AuroraZero said:
    @skorupion did this get sorted or what? I want to drop it off my radar and move on.

    Yeah fixed itself, and was resynchronizing.

    Thanked by (2)AuroraZero AlwaysSkint
  • @skorupion said:

    @AuroraZero said:
    @skorupion did this get sorted or what? I want to drop it off my radar and move on.

    Yeah fixed itself, and was resynchronizing.

    Ok 👍 off to do some writing.

    "I would have gotten away with it too, if it wasn't for that meddling Frankz and Mason!!"

Sign In or Register to comment.