Consider the following scenario:
- Using Disk Management or DiskPart, you create a new partition on a disk.
- Shortly after creating the partition, the computer loses power or crashes and you are forced to reboot.
- In Disk Management, if you try to format the partition, you may receive the error message: "An unexpected error has occurred. Check the System Event Log for more information on the error. Close the Disk Management console, then restart Disk Management or restart the computer."
- In Disk Management, you can successfully choose "Delete Volume." However, if you then try to recreate it, by choosing "New Simple Volume," Disk Management hangs for a long time. After several minutes, you receive the error message: "The operation failed to complete because the Disk Management console view is not up-to-date. Refresh the view by using the refresh task. If the problem persists close the Disk Management console, then restart Disk Management or restart the computer."
The disk partition gets successfully recreated, but the volume never gets formatted, or associated with a drive letter.
- In DiskPart, you can use the "select partition" command to select the problematic partition, and the "delete partition" command to successfully delete it. However, if you then use a command such as "create partition primary" to recreate the partition, DiskPart hangs for a long time. After several minutes, you receive the following error message:
Virtual Disk Service error:
The operation timed out.
DiskPart has referenced an object which is not up-to-date.
Refresh the object by using the RESCAN command.
If the problem persists exit DiskPart, then restart DiskPart or restart the computer.
This problem occurs because the computer created a new volume, but unexpectedly crashed or lost power before all the appropriate registry entries for the newly created volume device were successfully written to disk. As a result, the volume has been only partially installed. When you attempt to delete and recreate the volume, the creation fails because the old, improperly installed volume interferes with the creation of the new one.
- Start Device Manager. (From the Start menu, right-click on Computer and select Properties. Then click on "Device Manager.")
- Expand the Storage Volumes category.
- In the Storage Volumes category, right-click on any devices labeled "Unknown device" and select Uninstall.
- Close Device Manager.
- Using Disk Management or DiskPart, delete the problematic partition.
You should now be able to successfully create and format the volume using Disk Management or DiskPart.