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.
- 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.
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.
- Log on to the ECS console.
- In the left-side navigation pane, choose .
- In the top navigation bar, select a region.
- Find the ECS instance for which you want to re-initialize the system disk, and click the instance ID to go to the Instance Details page.
- Click the Cloud Disk tab.
- Find the system disk and click Reinitialize Disk in the Actions column.
- In the Reinitialize Disk dialog box, configure the following parameters.
Parameter Description Security Windows instances: Select Set Password. You can use the old password or specify a new password. Linux instances: Select Set SSH Key or Set Password.
- Set SSH Key: binds an SSH key pair to the instance. You can then log on the instance by using the SSH key pair.
- Set Password: specifies a logon password. You can use the old password or specify a new password.
Security Hardening After you select Activate, security components are loaded to the instance free of charge. These components provide services such as webshell detection, remote logon reminder, and protection against brute-force attacks. Instance Startup Policy If you select Start Instance after Resetting Disk, the instance automatically starts after you re-initialize the system disk.
- Click Confirm.
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.