Preemptible instances may be forcefully reclaimed due to price fluctuations or changes in market supply and demand. This topic describes how to recover the data of a preemptible instance by attaching the system disk or data disks to a new instance after the preemptible instance is forcefully reclaimed.

Background information

When you create a preemptible instance, the system disk or data disks of the instance are configured not to release with the instance. After the preemptible instance is forcefully reclaimed, the system disk or data disks of the instance are retained as data disks. You can use the data disks to recover the data of the reclaimed preemptible instance.

This topic describes how to configure the system disk or data disks of a preemptible instance not to release with the instance when you create the instance and how to attach the disks to a new instance as data disks after the preemptible instance is reclaimed.

Note You can choose an existing instance or create an instance as the new instance to which you want to attach the disks. For information about how to create an instance, see Create an instance by using the wizard.

Step 1: Create a preemptible instance

When you create a preemptible instance, configure the system disk or data disks not to release with the instance. For information about how to create a preemptible instance, see Create an instance by using the wizard.

In the Basic Configurations step, configure the following settings:
  • In the Billing Method section, select Preemptible Instance. Select Preemptible Instance
  • In the Storage section, clear Release with Instance. Clear Release with Instance in the Basic Configurations step

Step 2: Attach a data disk

For information about the prerequisites for attaching data disks, see Attach a data disk.

This topic describes how to attach a data disk on the Instances page. You can also choose Storage & Snapshots > Disks in the left-side navigation pane. Find the disk that you want to attach and choose More > Attach in the Actions column to attach the disk to an instance.

  1. Log on to the ECS console.
  2. In the left-side navigation pane, choose Instances & Images > Instances.
  3. In the top navigation bar, select a region.
  4. On the Instances page, find the instance to which you want to attach the data disk and click the instance ID.
  5. Click the Cloud Disk tab. In the upper-left corner of the Cloud Disk tab, click Batch Attach.
  6. In the Attach Disk dialog box, configure parameters to attach a disk.
    Attach a data disk to a new instance
    1. Select the disk that you want to attach and configure the release settings for the disk.
      Parameter or option Description
      Disk Select the disk that you want to attach.
      Note You can choose Storage & Snapshots > Disks to view the information of the retained disks of the reclaimed preemptible instance in the disk list.
      Release Disk with Instance If you select this option, the disk is automatically released when its associated instance is released. If you do not select this option, the disk is retained when its associated instance is released.
      Delete Automatic Snapshots While Releasing Disk If you select this option, automatic snapshots of the disk are released when the disk is released. We recommend that you do not select this option and instead retain the automatic snapshots of the disk.
    2. Click Next.
      If the data disk is attached to the new instance, a message indicating that the disk is attached to the instance appears, and the disk enters the In Use state.