All Products
Search
Document Center

Elastic Compute Service:Re-initialize a data disk

Last Updated:Apr 21, 2026

Re-initialize a data disk attached to an ECS instance to restore it to its initial state at creation.

Limitations

If the source snapshot of a data disk is deleted or unshared, the disk remains usable but cannot be re-initialized.

Potential impacts

Understand the following consequences before you proceed.

Warning

Re-initializing a data disk permanently erases all data added after its creation. Back up the data disk by creating a snapshot before proceeding.

Item

Description

Windows instances

  • If created from a snapshot: The disk is restored to the snapshot state. Mount the file system again. Data added after creation is lost, but snapshot data, partitions, and file system are retained. * If created as an empty disk: The disk is reset with no data, partitions, or file system. Re-initialize it as described in Initialize Windows data disk.

Linux instances

  • If created from a snapshot: The disk is restored to the snapshot state. Mount the file system again. Data added after creation is lost, but snapshot data, partitions, and file system are retained.

  • If created as an empty disk: The disk is reset with no data, partitions, or file system. Re-initialize it as described in Initialize Linux data disk.

Procedure

Step 1: Prepare

  1. Re-initializing a data disk erases all its data. Back up your data by creating a snapshot before proceeding.

    Note

    Snapshots incur fees. See Snapshot billing.

  2. The data disk is attached to an ECS instance.

  3. Legacy Instant Access is not enabled for your ESSD cloud disk. Re-initialization is not supported if a snapshot has legacy Instant Access enabled. The new version of Instant Access does not affect re-initialization. Check the snapshot list to determine which version is in use.

    Determine which version of Instant Access is enabled

    • New version: The Instant Access status shows Enabled.image.png

    • Legacy version: The Instant Access status shows an expiration date, such as Oct 20, 2023, 11:07:07 Remaining Before Expiration.image.png

    Note

    To disable legacy Instant Access, set the DisableInstantAccess parameter in the ModifySnapshotAttribute operation.

  4. (Linux only) If /etc/fstab contains an auto-mount entry for the data disk partition, comment it out in /etc/fstab before re-initialization to prevent startup failures. Steps:

    1. Connect to the Linux instance.

    2. Run vim /etc/fstab.

    3. Press I to enter Insert mode.

    4. Add # at the beginning of the data disk partition mount entry to comment it out.

      # /dev/vdb1 /mnt ext4 defaults 0 0
      Note

      In this example, /dev/vdb1 is the data disk partition and /mnt is the mount point. Modify these values to match your actual configuration.

    5. Press Esc, then enter :wq to save and exit.

  5. Stop the ECS instance.

    Important

    If an ECS instance uses the pay-as-you-go billing method and resides in a VPC, you must enable the standard mode when you stop the instance. If you enable the economical mode, you may be unable to start the instance after you re-initialize the disks attached to the instance.

  6. The ESSD cloud disk does not have multi-attach enabled. Re-initialization is not supported for multi-attach data disks.

Step 2: Re-initialize the data disk

Warning

Re-initializing a data disk permanently erases all data added after its creation. Back up the data disk by creating a snapshot before proceeding.

  1. Go to ECS console - Instances.

  2. In the upper-left corner of the page, select a region and resource group.地域

  3. Find the target ECS instance and click its ID to go to the Instance Details page.

  4. Click the Block Storage tab, find the target data disk, and in the Actions column, click Re-initialize Disk.

    Re-initialize disk

  5. In the Re-initialize Disk dialog box, read the notes and click Confirm.

    截屏2024-12-11 18

    Re-initialization is complete when the disk status changes to In Use.

  6. Click Start to start the ECS instance.

  7. Perform post-initialization tasks based on your instance type.

    Linux instance

    • If created as an empty disk: The disk is reset with no data, partitions, or file system. Initialize the Linux data disk before use.

    • If created from a snapshot: Mount the file system again. Data added after creation is lost, but snapshot data, partitions, and file system are retained.

    Windows instance

After re-initialization, redeploy your applications and configurations to resume service.