This topic describes how to re-initialize a system disk in the ECS console. After a system disk is re-initialized, it is restored to the status when it was created.
Prerequisites
- Data is lost after the disk is re-initialized. You must create snapshots for the disk to back up data. For more information, see Create a normal snapshot.
- The instance must be in the Stopped state before you re-initialize the disk. Your
business is interrupted when you stop your instance. Proceed with caution. For more
information, see Stop an instance.
You must select Retain Instance and Continue Charging After Instance Is Stopped when you stop a pay-as-you-go instance.Notice If you select No Charges After Instance Is Stopped, you may not be able to start the instance after you re-initialize the disk. For more information, see No Fees for Stopped Instances (VPC-Connected).
- You cannot re-initialize a disk that has local snapshots. You can create local snapshots only for enhanced SSDs (ESSDs). Therefore, if the disk is an ESSD, make sure that it does not have local snapshots.
- (Applicable only to Linux instances) If you want to use an SSH key pair for authentication when you re-initialize a system disk, you must have created or imported an SSH key pair. For more information, see Create an SSH key pair and Import an SSH key pair.
Background information
When a disk is attached to an ECS instance, you can re-initialize the disk to restore it to the status when it was created. The following list provides the changes of a system disk after you re-initialize it:
- The system disk is restored to the status when it was created.
For example, if you use a public image that runs Windows Server 2012 R2 to create an instance. After you re-initialize the system disk of the instance, the instance still runs Windows Server 2012 R2 but the applications that are installed and data generated after the instance was created are deleted.
Note If you re-initialize the system disk after you replace the system disk, the new system disk is re-initialized instead of the old one. - If an automatic snapshot policy is applied to the system disk, the policy remains valid after the system disk is re-initialized.
- The IP address and system disk ID of the ECS instance are not changed.
- The automatic and manual snapshots of the system disk remain available. You can use these snapshots to roll back the disk. For more information, see Roll back a disk by using a snapshot.
Procedure
What to do next
- (Applicable only to Linux instances) If data disks have been attached to the ECS instance
before you re-initialize its system disk, you must recreate the mount point information
and mount file systems to the instance. For more information, see the How do I reattach data disks after I re-initialize the system disk of a Linux instance? section of the Elastic Block Storage FAQ topic.
Note After you re-initialize the system disk of a Linux instance, data within the data disks that are attached to the instance is not changed, but the mount point information is lost.
- After the system disk is re-initialized, you must redeploy the applications and reconfigure the parameters on the disk to restore your business as soon as possible.
- If you have created snapshots for the system disk, you can use the snapshots to create data disks and attach the data disks to the instance to obtain data in the original system disk. For more information, see Create a disk from a snapshot.