Skip to main content

Detach a data disk

You need to detach a data disk from a VCS instance before deleting it or attaching it to a different VCS instance. Before detaching, please unmount the disk from the instance to avoid failed detaching.

caution

After detaching, the data disk will continue to be billed until deletion.


Step 1. Unmount a data disk

There are different ways to unmount a disk between Linux and Windows, please follow the steps according to the operating system (OS) of your instance.

Linux Instance
sudo umount -d /dev/vdb
Windows Instance

  • (1) Click Disk Management (2) Right-click the disk to be unmounted (3) Click Offline to unmount the disk


Step 2. Detach a data disk

After unmounting, you are able to detach the data disk .

info

The data disk can only be detached when the corresponding VCS state is Ready or Shutdown

  • Method 1:

    • Enter VCS Instance Details page, scroll the page to the bottom, and click DETACH DISK to detach the data disk from the attached instance.

    • Enter Data Disk Management page. When the disk enters the AVAILABLE state from the IN-USE state, you are able to delete the disk or attach it to a different VCS instance.

  • Method 2:

    • Enter Data Disk Details page and click DETACH to detach the data disk from the attached instance.

    • When the disk enters the AVAILABLE state from the IN-USE state, you are able to delete the disk or attach it to a different VCS instance.