Recovering a corrupted RAID setup

  • I'm looking for a bit of guidance on the method to recover a (software) RAID volume. I've only ever done simple recoveries before, so I'd like to try and get the bigger picture first for a more complex setup. There's nothing on the array that's absolutely critical - that's backed up elsewhere. BUT, I figure this is a really good chance to try and learn a bit about it.


    It's a Microserver G8, but as it's software RAID am I right in thinking the hardware is irrelevant? OMV is running on an SD card, and there was a pair of matching data drives. Fairly simple setup.

    I've been using that pair of drives in a RAID-1 setup (setup via OMV5 software), and on that array a single File System, in BTRFS format.


    I believe what's happened is that the drives have been plugged into a Windows install, and someone has attempted to initialize one or both of them using the Windows Disk Manager. At this stage, I don't believe anything more was attempted/done to the drives.

    Am I right in thinking the first step is to somehow get the RAID recognized again by OMV?


    At the minute, I can't see anything in the RAID Management section of OMV, and in File Systems the BTRFS volume has a status of Missing.


    I know this isn't specifically OMV help, but is anyone on here able to give me a runthrough of how to approach this please?


  • I guess I shouldn't be seeing the Microsoft Reserved Partitions on the two drives, but ties in with what happened.

    • Official Post

    I guess I shouldn't be seeing the Microsoft Reserved Partitions on the two drives, but ties in with what happened

    You guessed right, that Raid is 'hosed' :( you can't recover something that isn't showing.


    what's the output of wipefs -n /dev/sda

  • Code
    root@Columbia:~# wipefs -n /dev/sda
    DEVICE OFFSET        TYPE UUID LABEL
    sda    0x200         gpt
    sda    0x74702555e00 gpt
    sda    0x1fe         PMBR

    SDB is an identical output.


    In my head, I'm picturing the actual data is there but the drives have had the "header" data trashed. (Forgive my terminology, Going into this type of detail is new to me). If that's the case, in theory it's a simple fix - although the reality of being able to recreate such header data may be not as easy as the theory.

    • Official Post

    In my head, I'm picturing the actual data is there but the drives have had the "header" data trashed

    Technically I would agree, but is the metadata for the raid still intact, possibly not, the next question is do you have a backup of the data.

  • Yes, fortunately all the data that needed to be backed up is.

    I'll have a look at the disks in gparted later and see if it's possible to recreate the partition table somehow.


    Seems like a good opportunity to dive into the details of this, try to understand it a bit more and how things work. I try not to waste these opportunities!

    • Official Post

    Yes, fortunately all the data that needed to be backed up is.

    I'll have a look at the disks in gparted later and see if it's possible to recreate the partition table somehow.

    Well you have a backup, whilst trying to sort this out is an excellent learning curve, why not just start again which is the simplest approach.

    My question would be is how, why did both disks get shafted by Windows, Windows does play with other file systems, there are ways around it but as this was BTRFS it was never going to be readable.

    Putting BTRFS on an mdadm is a waste of time as one cannot use/benefit from BTRFS utils. Also why bother using Raid1 when you can set up one drive for data and use the second as a backup using rsync.

  • Stuck in lockdown with not a lot to do, and no real need to access the data means lots of free time!


    I decided to run gparted, which was able to pick up both drives as a single linux partition and write the new partition table. Did it one disk at a time and it seems to have worked a treat... except the RAID is no more. Each disk is seen as the same BTRFS partition - but the RAID itself isn't recognised/detected at all. I can remove either disk and it will function fine, but it's as though the RAID never existed!


    Although, good highlight of using BTRFS on RAID... I set it up a pretty short notice and didn't really look into it. Now is a good time to rebuild it properly! I think I'll go down the path you say of using rsync and a backup drive.


    I did run a deep gparted scan on one of the drives, and after the 20 hours or so to run went through the results. I found it amazing how it was able to detect pretty much every disk image stored on there (think embedded devices) and flagged it as a potential partition.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!