Monday, August 26, 2019

Not a lot of options for cloning dynamic disks

I recently discovered, by checking the SMART status, that my desktop's main hard drive was beginning to fail. I didn't expect this to be tough to fix since I had an extra hard drive in the machine (used only for backup) and a copy of Symantec Ghost. When I booted into my Ghost environment, though, it didn't see the hard drives, only the flash drive I'd booted from. I tried with a couple other tools from AOMEI and EaseUs, which each saw a whole disk as one partition. After some research I found that this was due to my drives being dynamic, a conversion I must have done a long time ago while they were involved in some kind of software RAID. I tried using TestDisk to turn the dynamic partition table into a normal one, which worked on the backup drive of only one partition, but got very confused on the main drive.

I decided to try just dd'ing (a low-level copy) the failing main drive onto the good backup one. First I used fdisk -l to see which drive was which Linux device. Fortunately the drives are exactly the same size. I used this command to perform the copy and see the progress:
dd if=/dev/SOURCE of=/dev/DEST bs=1M conv=sync,noerror iflag=fullblock status=progress

It did encounter a read error from the failing drive along the way, but proceeded to completion. Concerningly, there was a "disk full" error at the very end - hopefully it didn't get off by one block somewhere in the middle.

When I rebooted into Windows, it used the backup disk (since that was numbered first by the SATA controller, I think) and brought the old disk offline due to a signature collision. So far everything seems to be working great. Due to that read error, there's probably some blank bytes in some file somewhere that will be exciting when discovered, but for now the system seems OK!

No comments:

Post a Comment