Detach Volume from Server
The Detach Volume feature allows you to remove a volume from a server without data loss. This is useful for replacing, removing, or transferring volumes to other servers.
Pre-Detachment Preparation
To ensure safe volume detachment, follow preparation steps:
1. Stop Processes Using Volume
Critical Warning
Before detaching, you must stop all processes writing data to the volume. Otherwise, data corruption or loss may occur.
For Linux:
-
Identify processes using the volume:
sudo lsof /mnt/mount-path
-
Stop those processes:
sudo kill -TERM [PID]
-
Unmount the volume:
sudo umount /mnt/mount-path
For Windows:
- Close all applications using the volume
- In Disk Management, right-click volume and select "Change Drive Letter and Paths"
- Remove all assigned paths for the volume
2. Verify Critical Data
- Ensure important data is backed up if needed
- Document mount point information for easy reconfiguration later
Volume Detachment Process
Server volume management interface
1. Access Management Interface
- Access server details page
- Scroll to Instance Volumes section
2. Perform Volume Detachment
- Find volume to detach in the list
- Click the action menu (three dots) on the right of the volume
- Select Detach Volume
3. Confirm Detachment
Volume detachment confirmation dialog
When confirmation dialog appears:
- Verify volume name to ensure detaching correct volume
- Read warning message carefully
- Decide on permanent deletion:
- If only detaching: DO NOT check "Delete volume permanently"
- If permanently deleting: Check "Delete volume permanently"
- Click Detach to confirm
Permanent Deletion Warning
If you choose permanent deletion:
- All volume data will be deleted
- Data cannot be recovered after deletion
- No further charges for this volume
Use Cases
Detach Only (No Deletion)
In this case, volume remains in system and billing continues. Suitable when:
- Moving volume to another server
- Temporarily detaching for troubleshooting
- Changing server configuration
Detach and Permanently Delete
Suitable when:
- No longer need the volume
- Want to stop all volume charges
- Volume data no longer needed
Common Errors and Solutions
Error | Cause | Solution |
---|---|---|
"Unable to detach volume" | Volume in use by system or applications | Unmount volume before detaching |
"Operation not permitted" | Insufficient permissions | Check account access permissions |
"Disk busy" | Processes using volume | Find and stop processes using volume |
Cannot detach system volume | System volume with OS cannot be detached | Only data volumes can be detached |
After Detachment
If Not Deleted
After successful detachment:
- Volume status changes to "Available"
- You can:
- Attach volume to another server
- Create snapshots of volume
- Expand volume size
- Delete volume later if no longer needed
If Permanently Deleted
- Volume and all data completely removed
- Volume no longer appears in volume list
- System stops billing for this volume
Billing Notes
- Detached but not deleted volumes continue to be billed
- Only permanent deletion stops volume billing
- Volumes charged by allocated capacity, regardless of server attachment status
Best Practices
Recommendations
- Always unmount volume in OS before detaching
- Document configuration including mount points and related applications
- Create snapshots before detaching volumes containing important data
- Never detach system volumes - only detach data volumes
- After attaching to another server, may need to reconfigure fstab for auto-mount on boot