This topic describes how to re-initialize a system disk in the Elastic Compute Service (ECS) console. After a system disk is re-initialized, it is restored to the state when it was created.
- Snapshots are created for the system disk that you want to re-initialize. For more information, see Create a snapshot of a disk. Warning When the system disk is re-initialized, all data stored on the disk is deleted. Before you re-initialize the system disk, we recommend that you create snapshots for the disk to back up data.
- The instance to which the system disk is attached is in the Stopped state. For more information, see Stop an instance. Important If the billing method of an instance is pay-as-you-go and the network type of the instance is VPC, you must enable the standard mode for the instance when you stop the instance. If you enable the economical mode for the instance, you may not be able to start the instance after you re-initialize the disk.
- The instant access feature is not enabled for the snapshots of the disk if the disk is an enhanced SSD (ESSD). ESSDs whose snapshots have instant access enabled cannot be re-initialized. For more information, see Enable or disable the instant access feature.
- An SSH key pair is created or imported if you want to bind the key pair to a Linux instance when you re-initialize its system disk. For more information, see Create an SSH key pair and Import an SSH key pair.
For the system disk that is attached to an instance, you can re-initialize the disk to restore it to the initial state when it was created. The system disk re-initialization operation has the following impacts:
- The system disk is restored to the state when it was created.
For example, after you re-initialize the system disk of an instance that was created from a Windows Server 2012 R2 public image, the instance still runs Windows Server 2012 R2. However, the applications that were installed and data that was generated after the instance was created are deleted from the instance.Note If the system disk of an instance is replaced, the new system disk instead of the original system disk is re-initialized.
- If an automatic snapshot policy was applied to the system disk, the policy remains in effect for the disk.
- The IP addresses and disk IDs of the instance remain unchanged.
- The snapshots of the system disk are retained. 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 whose system disk you want to re-initialize and click the instance ID to go to the Instance Details page.
- Click the Cloud Disk tab.
- Find the system disk and click Re-initialize Disk in the Actions column.
- In the Re-initialize Disk dialog box, configure the parameters described in the following table.
Parameter or option Description Username Select a username that you want to use to log on to the operating system. Logon Credentials For a Windows instance, select Password to reset the logon password of the instance. You can use the original password or specify a new password. For a Linux instance, select Key Pair or Password.
- Key Pair: Specify an SSH key pair to bind to the instance. Then, you can log on to the instance by using the specified SSH key pair.
- Password: Reset the logon password of the instance. You can use the original password or specify a new password.
Security Hardening If you select Enable for Free, security components are loaded to the instance free-of-charge. These components provide security features such as webshell detection, alerting of unusual logons, and protection against brute-force attacks. Instance Startup Policy If you select Start Instance After Re-initializing Disk, the instance automatically starts after the system disk is re-initialized.
- Click Confirm to re-initialize the system disk. The disk enters the Initializing state. After the system disk is initialized, the disk enters the In Use state.
What to do next
- If data disks are attached to a Linux instance before you re-initialize the system disk of the instance, you must re-create mount points for the data disk partitions and mount the file systems. For more information, see How do I re-attach data disks after I re-initialize the system disk of a Linux instance?. Note After you re-initialize the system disk of a Linux instance, data stored on the data disks of the instance remains unchanged, but the mount information of the data disks is lost. You must re-create mount points for the data disk partitions and mount the file systems.
- After the system disk is re-initialized, you must redeploy applications and configurations to restore your business.
- If you created a snapshot for the system disk before the system disk is re-initialized, you can use the snapshot to create a data disk and attach the data disk to the instance to obtain data that was originally stored on the system disk. For more information, see Create a disk from a snapshot.
|What do I do if the ||The error is reported because the instant access feature is enabled for the snapshots of the disk. Disks whose snapshots have the instant access feature enabled cannot be re-initialized. For information about how to disable the instant access feature, see Enable or disable the instant access feature.|
|What are the differences between a system disk re-initialization operation and a system disk replacement operation?||For more information, see What are the differences between a system disk re-initialization operation and a system disk (operating system) replacement operation?.|