Repurposing an old RAID disk

So I have installed a new motherboard, CPU, memory, ya-de-ya. In my garage, as I was routing around for cables and stuff, I found a fresh looking western digital 2Tb disk from my old NAS, which was previously mounted as part of a RAID stack. When I try to run fsck or anything else it tells me that /dev/sdc is in use, which it isn’t.

The question is: Can I recover the information on this disk? GParted looks like this:

2 Likes

The answer is it depends but likely not. RAID has several different formats, including but not limited to:

  • mirrored
  • striped (aka split bandwidth)
  • parity

and a mix of them. If the drive was RAID 1 (mirrored) then yes, it’ll be quite easy. If it’s parity, then things get a little more complicated as you need to reconstruct the data, and that often includes more than one drive. If it’s striped, you need all of them.

Basically RAID1 is your only hope. Otherwise my answer is that it’s very unlikely you can recover the data.

1 Like

Thank you for answering. It’s mirrored.

1 Like

Yeah, then it should be possible. You’ll need to assemble the raid, hopefully it’s 1 of 2 drives and not one of more. There’s a tool called mdadm that might be useful in order to assemble it.

2 Likes
sudo mdadm --examine /dev/sdc5
/dev/sdc5:
          Magic : a92b4efc
        Version : 1.1
    Feature Map : 0x0
     Array UUID : 9b2776f5:fce81304:94dfdedb:49fc9bb6
           Name : DiskServer1:2
  Creation Time : Sat Mar 26 16:48:15 2011
     Raid Level : raid1
   Raid Devices : 2

 Avail Dev Size : 3897561464 sectors (1858.50 GiB 1995.55 GB)
     Array Size : 1948780672 KiB (1858.50 GiB 1995.55 GB)
  Used Dev Size : 3897561344 sectors (1858.50 GiB 1995.55 GB)
    Data Offset : 264 sectors
   Super Offset : 0 sectors
   Unused Space : before=192 sectors, after=120 sectors
          State : clean
    Device UUID : ad3e75a9:d4ee43bc:a987fbad:c619edd8

    Update Time : Mon Mar 20 10:40:18 2023
       Checksum : c14812e8 - correct
         Events : 18305388


   Device Role : Active device 1
   Array State : AA ('A' == active, '.' == missing, 'R' == replacing)

Well, at least I can talk to it. Now I have to understand mdadm! Many thanks

2 Likes

No worries, glad to be of help on short notice :smiley:

2 Likes

Again thank you! I’ll just leave this topic open until I can post a full solution.

2 Likes

@NothingConspicous I expect you’re not surprised: I tried assembling a RAID array of one so that I could --fail it or --remove it but kept hitting POSIX compliance errors. Whatever I did with mdadm was unsuccessful. Funny thing was I could only get mdadm to recognise /dev/sdc5 as that was all that was in /proc/mdstat. Even though I changed the partition type from linux-raid to Linux using fdisk, (and pressed w to exit), and fdisk showed the changes, GParted reported the partitions unchanged. The disk had sat in my garage for a while, nothing on it was important, so I gave up and created one big ext4 partition. Thanks for your help anyway.

2 Likes

From what I can find, that’s an issue with the naming of the device; but too late ig. Glad to have helped where I could.

2 Likes

Looks like you guys figured this out. Technically recoverable, but if nothing on it matters, reformatting is definitely the simpler choice.