Repair dynamic disks that go foreign

How to repair dynamic disks that go foreign or will not reactivate

Sometimes when frequently switching dynamic disks among machines, moving parts of the disks of a group amongst machines, or doing something not very simple sometimes the LDM (Logical Disk Manager) will break and some or all of the disks will go foreign or missing. The LDM is the table that contains information about all disks layout - partitions, stripes, etc.

In many cases you will be able to get to your volumes using “Import foreign disks” or “Reactivate disk“. Sadly sometimes the Windows Logical Disk Manager goes berserk and fails with “Disk group has no configuration copies” or some other cryptic error.

Consider you have done everything you thought of, and you don’t have a backup of your LDM created with Tiger Technology’s Dynamic Disk Optimizer tool (which would have saved you). Then there is the last measure - re-building your dynamic disk configuration manually. The rest of this post will explain how do do it.

I assume you:

Lets use a stripe of two disks as an example. It won’t import. It looks like this in disk management:

foreign.jpg

Step 1: First we have to backup the first 4096 bytes of your NTFS. Use a hex editor (like WinHex) to find the NTFS (it should be on disk 1). Depending on weather the disk is MBR, GPT, and how you partitioned the NTFS(es) might be in different places. Look for the string NTFS with the hex editor, and when you find it - check if it matches this picture:

backup.jpg

Then from the start of the NTFS sector, write 4096 bytes to a file somewhere. This is the important info to rebuild the volume. If you don’t successfully backup that, and continue - the data is LOST. Also remember disk number and offset where you took the backups from.

You have to do this step for each volume (not disk). You should end up with as many NTFS backup files as many volumes you had. If you had partitions in the middle of the disk - it might be tricky to find all NTFS headers.
Step 2: Convert the disks to basic
convert.jpg

Step 3: Convert back to dynamic

convertdyn.jpg

Step 4: Create your volumes again as they were. EXACTLY the same. When Windows ask to format the new volume DO NOT ALLOW.

format.jpg

Step 5: Write back all the NTFS headers you backed up in Step 1 (you remembered disk offsets and numbers as I told you right? If not - search for the NTLDR signature as screen on the WinHex screen shot above - it is on the next sector as you can see from the screen shot, and it will be there).

Step 6: Try to mount/access the volume. You should see your data :)

Comments

One Response to “Repair dynamic disks that go foreign”

  1. ByteBack on 2007-04-11 1:07 am

    I found your article to be very informative. I had a ‘Foreign’ Dynamic Volume which repaired using the Windows Disk Management tools. This was the mirror on a software Raid 1. The primary drive failed and the mirrored drive did not boot. I managed to get the drive back to allow me to read the data, but it will not boot into W2003 SBS although everything seems intact. The drive just hands after system POST.

Leave a Reply

You must be logged in to post a comment.