• Image Management Service

ims
  1. Help Center
  2. Image Management Service
  3. User Guide
  4. Creating a Private Image
  5. Creating a System Disk Image Using a Linux ECS
  6. Detaching Data Disks from an ECS

Detaching Data Disks from an ECS

You must detach all EVS data disks from the ECS before using it to create a private image. Otherwise, new ECSs created using the private image may be unavailable.

This section describes how to detach data disks from an ECS.

Prerequisites

You have logged in to the ECS.

Procedure

  1. Run the following command to check data disks attached to the ECS:

    mount

    • If the command output does not contain any EVS disk information, no EVS data disks need to be detached.
    • If information similar to the following is displayed, go to 2:
      /dev/xvde1 on /mnt/test type ext4 (rw)
  2. Ensure that no data read and write operations are being performed on the disks to be detached. Otherwise, the detaching operation will fail.

    Run the following command to detach the disks:

    umount /dev/xvde1

  3. Run the following command to edit the fstab file:

    vi /etc/fstab

  4. Delete the disk configuration from the fstab file.

    The /etc/fstab file contains information about the file systems and storage devices automatically attached to the ECS when the ECS starts. The configuration about data disks automatically attached to the ECS needs to be deleted, for example, the last row shown in the following figure.

    Figure 1 EVS disk configuration in the fstab file
  5. Run the following command to check the data disks attached to the ECS:

    mount

    If the command output contain no information about the data disks, they have been detached from the ECS.