Overview
Attaching a volume connects a persistent block device to a running compute instance, making it accessible as a disk inside the guest operating system. A volume with status Available can be attached to any instance in the same availability zone. After attachment, the volume appears as a new block device (e.g.,/dev/vdb) inside the instance — you must format and mount it before use if it is a new blank volume.
Prerequisites
- A volume with status Available
- A running compute instance in the same availability zone as the volume
- SSH access to the instance for filesystem preparation
Attach a Volume
- Dashboard
- CLI
Open the Volumes list
Log in to the Xloud Dashboard (
https://connect.<your-domain>) and navigate to
Project → Volumes → Volumes.Attach to instance
Locate the volume with status Available. Click the Actions dropdown and
select Manage Attachments.In the dialog, select the target instance from the Attach to Instance dropdown
and click Attach Volume.
Format and Mount (First Use)
After attaching a new blank volume, prepare the filesystem inside the instance:Identify the new device
SSH into the instance and list block devices:The new volume appears as an unformatted disk — typically
List block devices
/dev/vdb or the next
available device letter.Persist the mount across reboots
Add the mount to
/etc/fstab so it survives instance reboots:Add to /etc/fstab
Detach a Volume
- Dashboard
- CLI
Unmount inside the instance
SSH into the instance and unmount the volume:Remove or comment out the corresponding line in
Unmount the volume
/etc/fstab to prevent boot
errors after detachment.Detach from the Dashboard
Navigate to Project → Volumes → Volumes. Click Actions → Manage Attachments
on the target volume, then click Detach Volume.
Troubleshooting
Volume fails to attach — availability zone mismatch
Volume fails to attach — availability zone mismatch
Cause: The volume and instance are in different availability zones. Volumes can
only be attached to instances in the same zone.Resolution:If the zones do not match, create a new volume in the correct availability zone,
or migrate the instance.
Check volume availability zone
Check instance availability zone
Device not visible inside instance after attach
Device not visible inside instance after attach
Cause: The guest OS did not detect the hot-plug event, or the virtio driver
is not loaded.Resolution:If the device still does not appear, verify that the instance’s kernel supports
virtio block devices. Modern Linux kernels include this by default.
Rescan SCSI bus inside instance
Cannot unmount — device is busy
Cannot unmount — device is busy
Cause: A process inside the instance still has files open on the mounted volume.Resolution:Stop or kill the listed processes, then retry
Find processes using the mount
umount. Alternatively:Force unmount (use with caution)
Next Steps
Extend a Volume
Increase volume capacity online without detaching or stopping the instance
Volume Snapshots
Create point-in-time snapshots for fast recovery and volume cloning
Create a Volume
Provision a new volume with the appropriate size and storage tier
Volume Backups
Create full and incremental backups for long-term data retention