This topic describes how to reinitialize a system disk in the ECS console. After the system disk is reinitialized, the system disk is restored to the status when it was created.
- Data will be lost after the system disk is reinitialized. You must create a snapshot from the disk to back up data. For more information, see Create a normal snapshot.
- You must stop the ECS instance before reinitializing a system disk. In this case,
your business will be interrupted. Proceed with caution. For more information, see
Stop an instance.
For a pay-as-you-go ECS instance, you must select Retain Instance and Continue Charging After Instance Is Stopped when you stop the instance.Notice If you select No Charges After Instance Is Stopped, you may not be able to start the instance after you reinitialize the system disk. For more information, see No Fees for Stopped Instances (VPC-Connected).
- (Only applicable to Linux instances) If you want to use an SSH key pair for authentication when reinitializing 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 data disk is attached to an ECS instance, you can reinitialize the disk to restore it to the status when it was created. After a successful reinitialization,
- The system disk is restored to the status when it was created. Assume that you have
an instance created using the Windows Server 2012 R2 public image. After the system
disk is reinitialized, the operating system will still be the initial Windows Server
2012 R2. Any applications that were installed after the instance was created and any
instance data is deleted.
Note If you reinitialize the system disk after changing it, the new system disk is reinitialized instead of the old one.
- You must deploy applications and configurations to restore your business as soon as possible.
- If an automatic snapshot policy is applied to a system disk, the policy will remain valid after the system disk is reinitialized.
- The IP address and 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 where you want to reinitialize a data disk, and click the instance ID to go to the Instance Details page.
- In the left-side navigation pane, click Disks.
- Find the target data disk, and click Reinitialize Disk in the Actions column.
- In the Reinitialize Disk dialog box that appears, configure the following settings:
- Set the authentication method.
- Windows instances: Specify a logon password again. You can use the old password or specify a new password.
- Linux instances: Select Key Pair or Password and then set a SSH key pair or specify a logon password again. You can use the old password or specify a new password.
- Optional:In the Security Enhancement field, select the Free open check box. After the security enhancement feature is enabled, security components are loaded to the instance. These components provide services such as webshell detection, remote logon reminder, and blocking of brute-force attack traffic.
- Optional:In the Instance startup field, select the Start instance after successfully resetting the disk check box. The instance will then start automatically.
- Click Confirm Disk Reinitialization.
- Set the authentication method.
What to do next
- (Only applicable to Linux instances) If data disks have been attached to the ECS instance
before you reinitialize the system disk, you must recreate the mount point and attach
the file system to the instance. For more information, see
How do I re-mount data disks after I reinitialize the system disk of a Linux instance? in Block storage FAQ.
Note After you reinitialize the system disk of a Linux instance, data within the data disks that are attached to the instance will not change, but the attachment information of the data disks will be lost. All data disks are detached.
- After the data disk is reinitialized, you must deploy applications and configurations to restore your business as soon as possible.