When you troubleshoot disks, data disk partitions may be lost. This topic describes the common issues related to data disk partition loss in Windows and the solutions to the issues.
Prerequisites
A snapshot is created for the data disk that lost a partition. If errors occur during data restoration, you can use the snapshot to roll back the data disk to the status before the restoration. For more information, see Create a snapshot and Roll back a disk by using a snapshot.
You are charged for snapshots. For more information, see Snapshots.
Foreign is displayed for a disk and no partitions are displayed for the disk
In the Disk Management window, a disk is in the Foreign state and no partitions are displayed for the disk.
Solution: Right-click the space next to Foreign for the disk and select Import Foreign Disks.
Offline is displayed for a disk and no partitions are displayed for the disk
In the Disk Management window, a disk is in the Offline state and no partitions are displayed for the disk.
Solution: Right-click the space next to Offline for the disk, such as Disk 1, and select Online. If the status of the disk changes to Online, the issue is resolved.
No driver letter is assigned to a disk
In the Disk Management window, you can find information about a data disk, but no drive letter is assigned to the data disk.
Solution: Right-click the primary partition of the disk, such as Disk 1, select Change Drive Letter and Paths, and then follow the on-screen instructions to complete other operations.
An error occurred during storage enumeration
In the Disk Management window, you cannot view data disks. An error message similar to An error occurred during storage enumeration is reported in the system log.
The error message may be similar to An error occurred during enumeration of volumes based on the version of your operating system.
Solution:
Open the Run dialog box.
Enter powershell and click OK to start PowerShell.
Run the
winrm quickconfig
command to check and configure Windows Remote Management (WinRM) service settings.When the
Make these changes [y/n]?
message appears, entery
to run the command.
After the command is run, you can view data disks in the Disk Management window.
A data disk is in the RAW format
In specific cases, you may find that a data disk in Windows is in the RAW format.
If the original file system of a disk is unrecognizable to Windows, such as New Technology File System (NTFS), the disk is displayed in the RAW format in Windows. In most cases, the preceding issue occurs when the partition table or boot sector that records the type or location of the file system is lost or damaged. The following common causes may lead to the loss or damage of the partition table or boot sector:
Safely remove hardware is not used when the external disk is disconnected.
Power outages or unexpected shutdowns cause disk issues.
Hardware faults occur.
Underlying disk-related drivers or applications cause issues. For example, when you use DiskProbe to modify the table structure of a disk, an accidental operation may damage the data structure of the disk. As a result, the partitions on the disk are lost or inaccessible.
Computer viruses exist.
Solution: Use data restoration software to repair the file system and restore data. For example, you can try to use the DiskGenius tool to repair it to the previously used file system such as NTFS, and then attempt to restore data.
Using Disk Genius to repair a file system carries risks of data loss. Create a snapshot and backup your data before you try to repair the file system.
Common mistakes and best practices
Data is the core asset of users. A large number of users build websites and databases such as MySQL, MongoDB, and Redis on ECS instances. Data loss may cause huge risks to business. The following section describes the common mistakes and best practices in data security:
Common mistakes
The underlying storage of Alibaba Cloud is based on the triplicate technology. As such, some users consider that no risk of data loss exists in the operating system. This is a misunderstanding. The three copies of data stored in the underlying layer provide physical layer protection for data disks. However, if errors occur in the cloud disk logic in the system, such as virus infection, accidental data deletion, and file system damage, the data may still be lost. In this case, you must use technologies such as snapshots and geo-redundancy to ensure data security.
Best practices
Data disk partition restoration and data restoration can be used to address data loss. However, these solutions may be unable to restore data as expected. We recommend that you use various backup solutions, such as snapshots, in advance to maximize the security of disk data. For more information, see ECS disaster recovery solutions.