Dynamic Disks and Recovery
Posted by kyle on December 10th, 2009 filed in Misc, Windows 7, Windows 7 DeploymentSo – you might recall my post a little while ago about my boot to VHD issues – that I solved by making room on the drive.
So .. all was working well until as part of a demo I used the only machine that was available at the time and used that box to demo converting the disk drive to a dynamic disk – this then enabled me to do volume spanning etc..
So – fast forward to me the booting up into my VHD boot again – and then once more getting Blue Screens – mmm.. i thought I had solved that problem .. indeed.. I had – then I created another one!
So the issue was that for boot to VHD to work – it cannot be stored on a parent disk configured as a dynamic disk – this I did not know – and only found when I was hunting to see what the issue might have been.. http://technet.microsoft.com/en-us/library/dd799282(WS.10).aspx
So.. therefore I needed to convert from Dynamic to Basic – not an operation to be taken lightly as it traditionally involves taking the option to “Convert to Basic Disk” in Disk Management – and by convert it means – wipe everything and start again. So I was ready to do a complete rebuild – when a friend (Kim – you know who you are!) suggested to use the image backup in Windows 7 to do the full back up – destroy the disk and then start again – good thinking.. so I set about do this. For good measure I also used the backup facility on my Windows Home Server to create another copy… so far so good..
Then I began the process of doing a system restore – and then the troubles started
So .. what it seems (and further reading leans this way – but more testing is required and will be forthcoming – that doing image backups of a dynamic disk is not a good idea – I have found on various blogs (including the Windows Backup Team’s blog) that there is issues with backing up to a dynamic disk – basically you can do it but not restore from it – but I have also found that the image backup itself will not restore if it was from a dynamic disk in the first place. The backup completes – the files are certainly there – but the restore process does not work.
When I tried to use the system image restore option of the Windows 7 disk – I was given an error about not having the correct version of winpe (the 64bit version – which is what I was using) or the image was corrupt.
So – I went looking for other options – and found this. A handy hex editor that will edit the disk configuration. So there is a non-distructive way of changing from Dynamic to Basic disks (with a very large addendum as you will see!) Also read the whole thing before you start – you will see that there are some big gotcha’s..
The steps that I used were:
WARNING – THIS HAS THE ABILITY TO COMPLETELY DESTROY ALL ACCESS TO YOU YOUR DATA – DO THIS AT YOUR OWN RISK – DO NOT BLAME ME IF IT GOES HORRIBLY WRONG – just saying is all .. this is all on you
1. Do a complete back up – I did 2 – the image backup and the WHS backup.
2. Download Hxd – I used the non-install version – and put it on a USB disk – you could equally download the install version – but I used the non-install version so I did not have to put anything on the HDD.
3. Run the exe. As this is on a Windows 7 machine I needed to run it as Administrator (yes – I run my own boxes with UAC turned on
4. I then selected my disk – using the menu –
then
– in this case I knew the drive that I wanted to convert back – so I selected the disk 1 – disk 2 here is actually not a drive but a mounted VHD – more on that later. When you uncheck the Read-Only – which you need to do and then click on ok here you get a warning about the drive and what you are doing and how it could destroy your data – just in case my warning above was not enough.
5. Now you will see the contents of your drive – in hex form – do not change anything apart from what you need to – otherwise bad things will happen to your data (plague of frogs, etc)
Basically look in the Sector 0 1B0 – 1F0 area for the value 42 – logically you will have one for every volume you have – I had 3 – and then change the 42 to 07 – that is it – no changing any thing else.. at all .. then close and save changes.
6. I went then to Disk Management and found that disk 1 was now a basic disk – hooray – then I refreshed the view and got a Blue Screen of Death – ok – so this was not so cool.
7. Rebooted machine and Windows started fine – but then when I opened up Disk Management I found that my data drive had corrupted – mmm.. ok .. so why was that? Well – it was a spanned volume that had different parts of the drive – and that didn’t transfer across to the basic disk.
8. So that was fine as I had my backups right? yeeeeahhhh.. I went to the image restore option in Windows 7 and it could not find a valid image in the location that it was.. ok .. so I then head to Windows Home Server (remembering that I had backed up to both locations). Windows Home Server shows the backups – but I can’t restore the data drive – gets to 97% and then fails – mmm .. ok .. so Kyle is starting to get a little worried now – I noticed in WHS backup that the location for the backup for this machine is “missing” well.. that could be the problem – I wonder if that is due to the dynamic disk (a quick check of other backups restore fine and they have a location – but they are all for basic disks – so more testing to come on that)
9. So – I then looked in the location that I had put the system image backups – the vhd’s that were created were there – so the backup did work – it was just the restore process. No mind… I crack open Disk Management and then mount the VHD of the data drive and then manually copy the files to the newly recreated data partition on my laptop.
So – not the prettiest solution – but what the heck – it works – and it meant that I did not have to do a complete rebuild to convert from Dynamic to Basic.
I will be doing some more testing to see if any of the backup issues were actually from the Dynamic Disk or if it was just strange coincidence.. I am betting against strange coincidence.. but we shall see..
Anyway – enjoy!
Cheers
kyle
January 7th, 2010 at 1:08 pm
I ran in to a similar scenario a couple years ago at a clients office, they had a Dell entry level server running SBS 2003, the server had mirrored drives but no raid controller, it used windows raid, which meant dynamic disks. i had built them a new server and wanted to forklift the SBS install to the new server, however the dynamic disks kept giving me fits trying to image them on the new servers raid 10. i spent hours upon days searching for a solution when i stumbled upon a little know gem of an imaging utility called r-drive image. this little gem could, amongst other things, image dynamic disks to basic disks, and it did it well. i was able to image the windows mirrored disks to a single basic disk and then in turn image the basic disk on to the raid 10 array without a hitch.
Not only was this utility a life saver, the company R-Tools Technology makes only one version of r-drive image that works on all flavors of windows, including servers! and, it was reasonably priced, i dont remember exactly what i paid for it, but i believe it was around $40.00