I have a setup where my server runs Windows with two disks: Disk 1 has the OS, and Disk 2 holds the data. I'm using Hyper-V for virtualization. After wiping the OS, I reinstalled Windows but left the data disk alone. Now, I want to know if I can reattach the data disk without formatting it, but when I checked, Windows recognized it as unallocated space. Is there a way to recover or reattach the data disk without losing the data?
4 Answers
It’s also worth noting that if the disk had any sort of encryption previously, that could complicate things post-install. Have you checked for that?
Typically, reattaching a data disk should work without a hitch unless there’s a mismatch in the virtual disk types. If the disk was previously encrypted or has type conflicts, that might cause issues. Did you check if the disk types align with your VMs?
Just a recommendation: if everything else fails, consider creating a new disk and restoring your data from a backup if you have one. It’s a surefire way to keep your data safe if you can't reattach the original disk.
Did this happen in a VM environment? If so, how did you perform the wipe on the OS disk? Knowing that could clarify the situation.

I didn’t think about the disk type! I’ll make sure to verify that when I try again.