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.
-
Log in to the Cloud Control Panel.
-
In the Cloud Control Panel, confirm how the volume is presented to the cloud server.
-
On your server, use the
df -h
command to see how the volume is mounted. -
Use the value under Mounted on in the
unmount
command. -
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.
-
Log in to the Cloud Control Panel.
-
In the Cloud Control Panel, confirm how the volume is presented to the cloud server.
-
In the Server Manager, select File and Storage Services > Disks.
-
In the Disks section, right-click the Cloud Block Storage volume and select Take Offline.
-
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:
-
Log in to the Cloud Control Panel.
-
In the top navigation bar, click Select a Product > Rackspace Cloud.
-
Select Storage > Block Storage Volumes.
-
On the Block Storage Volumes page, click the gear icon next to the volume name and select Detach Volume.
-
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.
-
In the top navigation bar of the Cloud Control Panel, click Storage > Block Storage Volumes.
-
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.
Updated about 1 year ago