> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ibee.co.in/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ibee.co.in/docs/_mcp/server.

# Attach volumes

> Add Block Storage volumes to a Cloud VM and mount them inside the guest.

Attach a [Block Storage](/docs/infrastructure/block-storage) volume to a Cloud VM when you need persistent storage that survives plan changes and VM deletion (deleting a VM detaches its data volumes automatically and keeps them). Volumes attach as additional disks (`vdb`, `vdc`, …) alongside the root disk (`vda`).

## When to use a separate volume

* Your data should outlive the VM (databases, file servers, user uploads).
* You want to grow capacity independently of CPU and RAM.
* You need to move data between VMs (detach from one, attach to another).
* You want snapshot scope flexibility — capture data volumes selectively ([Selective volumes capture mode](/docs/tools/snapshots/create-a-snapshot)).

For ephemeral data that lives and dies with the VM, the included root disk on each [instance type](/docs/infrastructure/cloud-vms/instance-types) is fine.

## Attach a volume

### 1. Create the volume

If you don't already have one, create a volume in the **same region** as the VM. See [Create a volume](/docs/infrastructure/block-storage/create-a-volume).

### 2. Attach from Block Storage

Volumes are attached from the **Block Storage** page — the VM detail page doesn't have a volumes section. Open **Block Storage**, click the volume, then click **Attach to Server** and pick the VM. See [Attach and detach a volume](/docs/infrastructure/block-storage/attach-and-detach-a-volume) for the full steps.

### 3. Wait for the attachment to complete

The activity feed shows `VM attach_volume operation accepted` followed by `VM attach_volume operation completed`. The volume now appears as a new block device inside the guest.

## Mount the volume inside the guest (Linux)

Use the commands on the volume's **Mount Instructions** tab in **Block Storage**, or follow these standard steps the first time you attach a fresh volume.

```bash
# 1. Confirm the new device
lsblk

# 2. (First time only) Create a filesystem
sudo mkfs.ext4 /dev/vdb

# 3. Create a mount point
sudo mkdir -p /mnt/volume_<id>

# 4. Mount it
sudo mount /dev/vdb /mnt/volume_<id>

# 5. Persist across reboots — use UUID for stability
echo "UUID=$(blkid -s UUID -o value /dev/vdb) /mnt/volume_<id> ext4 defaults 0 0" | sudo tee -a /etc/fstab
```

> **Warning**
>
> **Use UUID-based fstab entries.** Device names like `/dev/vdb` can change after detach/reattach or restore. Mounting by UUID keeps the path stable.

The IBEE portal surfaces these exact steps in **Snapshots → Recovery Point Details → Mount Instructions** after a restore, including the device path, suggested mount point, and the four-step sequence above.

## Mount the volume inside the guest (Windows)

1. Open **Disk Management**.
2. Bring the new disk **Online** and **Initialize** it (GPT for >2 TB).
3. Right-click the unallocated space → **New Simple Volume** and follow the wizard.
4. Assign a drive letter and format as NTFS.

## Detach a volume

1. Unmount inside the guest first (`sudo umount /mnt/volume_<id>`) to avoid filesystem corruption.
2. On the volume's **Block Storage** page, click **Detach**.
3. The activity feed shows `VM detach_volume operation accepted` → `completed`.

A detached volume keeps its data and can be reattached to any VM in the same region.

## Volumes and snapshots

When you take a snapshot, you choose the **Capture Mode**:

| Mode                     | What's captured                                                   |
| ------------------------ | ----------------------------------------------------------------- |
| **Root volume only**     | Just the boot disk. Attached data volumes are skipped.            |
| **All attached volumes** | Root disk plus every attached data volume.                        |
| **Selective volumes**    | Root is always included; pick which attached data volumes to add. |

After restore, captured data volumes are auto-attached to the target VM. Mount instructions are surfaced in the snapshot detail view. See [Create a snapshot](/docs/tools/snapshots/create-a-snapshot).

## Troubleshooting

**`lsblk` doesn't show the new device**
Wait 10–20 seconds after the activity feed reports completion, then rerun. If it still doesn't appear, reboot the VM.

**`mount` fails with "wrong fs type"**
The volume isn't formatted yet. Run `sudo mkfs.ext4 /dev/vdX` on the **first** attach only.

**Volume is read-only after restore**
The platform restores the volume but doesn't auto-mount it inside the guest. Open **Snapshots → Recovery Point Details → View instructions** for the exact mount command for that volume.

## Related pages

* [Block Storage overview](/docs/infrastructure/block-storage)
* [Create a volume](/docs/infrastructure/block-storage/create-a-volume)
* [Attach and detach a volume](/docs/infrastructure/block-storage/attach-and-detach-a-volume)
* [Create a snapshot](/docs/tools/snapshots/create-a-snapshot)