Detach and Delete Cloud Block Storage Volumes

Previous section: Create and use Cloud Block Storage snapshots

Detaching a Cloud Block Storage volume is useful and necessary when you want to perform the following tasks:

  • Prevent writes to the volume while you take a snapshot.
  • Take the volume offline for archival purposes.
  • Move the volume to another server.
  • Resize the server to which the volume is mounted.
  • Delete the volume.

In all cases, you must unmount the volume before you detach it. This article provides Linux® and Windows® instructions for unmounting, detaching, and deleting a volume.

Unmount a Volume

Before you detach a volume from a server, unmount it to prevent errors.

Unmount a Volume from a Linux Server

📘

You cannot unmount and detach the operating system disk. For more information, see the Detach an operating system disk that uses the boot-from-volume functionality section at the end of this article.

  1. Log in to the Cloud Control Panel.

  2. In the Cloud Control Panel, confirm how the volume is presented to the cloud server.

  3. On your server, use the df -h command to see how the volume is mounted.

  4. Use the value under Mounted on in the unmount command.

  5. Comment out the second line (highlighted in the screenshot) in the /etc/fstab file to prevent the volume from trying to mount on the next boot.

    # umount /dev/xvdb1/
    

Unmount a Volume from a Windows Server

📘

You cannot unmount and detach the operating system disk (C:). For more information, see the Detach an operating system disk that uses the boot-from-volume functionality section at the end of this article.

  1. Log in to the Cloud Control Panel.

  2. In the Cloud Control Panel, confirm how the volume is presented to the cloud server.

  3. In the Server Manager, select File and Storage Services > Disks.

  4. In the Disks section, right-click the Cloud Block Storage volume and select Take Offline.

  5. If the Take Disk Offline warning window appears, click Yes.

The Cloud Block Storage volume no longer displays as a drive under Computer.

Detach a Volume

Use the following steps to detach a volume:

  1. Log in to the Cloud Control Panel.

  2. In the top navigation bar, click Select a Product > Rackspace Cloud.

  3. Select Storage > Block Storage Volumes.

  4. On the Block Storage Volumes page, click the gear icon next to the volume name and select Detach Volume.

  5. In the pop-up dialog box, click Detach Volume.

📘

It might take several minutes for the volume to detach.

Delete a Volume

Before you can delete an attached volume, you must detach it from the server. If a snapshot of the volume exists, you must delete the snapshot before deleting the volume.

  1. In the top navigation bar of the Cloud Control Panel, click Storage > Block Storage Volumes.

  2. On the Block Storage Volumes page, click the gear icon next to the volume name and select Delete Volume.

Detach an operating system disk that uses the boot-from-volume functionality

If your server boots from a Block Storage Volume and you need to detach the boot volume, you must first shut the server down completely. After the server's status displays as Shutoff in the Control Panel, you can then detach the
volume as you would any other.