1

More details can be provided, but here's the basis for the question. I just had a RAID-1 hardware failure which has resulted in an unusual situation:

  • Disk A, containing the file catalog data, but no file content data. The disk mounts and all files/folders are visible and valid and properly sized/attributed, but their contents are null/corrupt. I'm guessing the RAID broke down in the middle of a restore.

  • Disk B, containing the file content data, but no file catalog data. The disk mounts but appears as a blank/reformatted disk. With an undelete tool, the file contents are recoverable but without any names/folder structure/metadata (and many file types cannot be recovered).

As you may know, recovering raw data from a disk with no catalog is a horrendous undertaking, even with the proper tools.

So I'm wondering if it's possible to copy the catalog data from Disk A to Disk B, using a tool like dd (low-level, exact-block-level-copy). Normally this would be out of the question, but I suspect it would be possible in theory if RAID-1 mirrored disks maintain identical data at the block level (same positions and lengths, not fragmented any differently). And keeping in mind that the catalog data for the same filesystem is always in the same place and format.

I just don't know if RAID-1 works this way by default, or if it throws blocks wherever it wants (like to avoid a bad block on one disk, or to optimize for seek times, putting the data in reverse order on each disk, etc).

I can of course make full disk backups with dd and try it out, but I wanted to know first since I'm working with a lot of data (~4TiB).

Another option: I've read that the NTFS filesystem stores a copy of the catalog in the middle of the volume. Unfortunately I'm using HFS+; does it do anything similar?

Update: Reading up a bit on Logical Block Addressing (LBA). It seems hard disks translate blocks to physical locations on the disk, which are arbitrary. So if two RAID-1 mirrors use identical block arrangements, then manually copying over known good blocks should be possible, even if the underlying magnetic bits are scattered all over each disk in different ways.

Update 2: Fixed the problem, though it was a bit involved. I'll post more details when I have a moment, in case it might help others who run into similar issues.

6
  • What's the issue you see that indicates hardware failure? Each disk should be an identical copy in a RAID configuration 1 so help me understand what the issue is exactly that you see indicating there's a hardware failure. If one disk fails, the other should take over if you have a disk fail so please clarify this level of the issue. Nov 4, 2017 at 20:42
  • @TheFurryITSnuggleBuddy Ultimately, the RAID device was failing to restore to the 2nd disk; it did so partially then remained idle whenever powered on, doing nothing. Wouldn't mount either disk. I removed both disks and connected them individually to see the current state as mentioned above. I know that RAID-1 devices auto-restore, etc. but I seem to be past that point.
    – Beejor
    Nov 4, 2017 at 21:00
  • At the moment I'm wary of testing whether or not the RAID-1 will rebuild in the suspect hardware because it may just wipe it all and make a new array, or copy the data entirely from either disk, when neither is in a proper state. That is, what if one disk has no catalog and the other has no data? Does the hardware know which one is correct, by maintaining checksums in memory, etc? I'd rather try to backup the disks first.
    – Beejor
    Nov 4, 2017 at 21:02
  • Okay so you have a single drive failure occur in your RAID 1, you swapped out the failed drive from the RAID with a different drive, and it failed to rebuild with errors and such? What RAID utility do you use and what hardware is the RAID running on? Is this hardware RAID with a controller card or software RAID? You say "RAID broke down in the middle of a restore" so I assume by "restore" you mean rebuild. What is the make and model hardware and OS you are working with here too while you're at disclosing some of the hardware detail please let us know as it cannot hurt & may be clarifying. Nov 5, 2017 at 2:15
  • Be sure the RAID 1 drive is of the same size or larger physical capacity wise as trying to put in a drive smaller in size capacity than the mirror it's supposed to clone per the RAID, that can cause the rebuild to have issues but this is just a guess based on the detail you have provided so far. Nov 5, 2017 at 2:17

0

You must log in to answer this question.